Skip to content

Commit 6925b87

Browse files
docs(skills): the lint table and the repeater row name the parent field group, not inlineEdit (#36280)
<!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XC63go34oEMBFaBgqpoDC8N)_ Fixes #36252 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:照着数据技能里的「检查规则表」写应用的作者和 AI,以前读到的是「明细子表没开行内编辑就会被提示」,而检查实际看的是「主表有没有用字段分组把明细放进表单」;现在这三条规则,以及字段类型表里「可重复项」那一行,都按实际判断来写。 - 为什么做:属于「对外发布的技能包教的内容要和运行时一致」这条线,替按技能生成应用的作者和 AI 解决「去调一个已经不起作用的开关、却猜不到检查什么时候报」的问题。 - 出错会怎样:只改技能文字和一条变更说明,不动检查本身;写错的话作者读到的仍是一段不准的说明,直接回退这个 PR 即可。 - 要你做什么:无。 ## What changes State at head `a5ea2daa9` (one commit on `origin/main` `c30ce97cd`). Text only, in the published catalog; the rule ids and the lint are unchanged. `skills/objectstack-data/references/lint-rules.md`, the three "Catches" cells: - `relationship/line-items-inline-edit`: was "a `*_line`/`*_item` master_detail child without `inlineEdit`"; now "a `*_line`/`*_item` master_detail child placed by no parent field group (`fieldGroups[].relatedList`)". - `relationship/inline-edit-needs-bulk`: was "`inlineEdit` while the parent's or child's `enable.apiMethods` omits `'bulk'`"; now "a child a group places while the parent's or child's `enable.apiMethods` omits `'bulk'`". - `relationship/association-inline-edit`: was "an association (comment/audit/activity) marked `inlineEdit` (clutters the parent form — use a detail-page related list)"; now "an association (comment/audit/activity) a group places (leave it a tab)". `skills/objectstack-data/rules/field-types.md`, seat-added scope (seat comment 7073941454 on PR #36250), the `repeater` row: "a typed list is a child object (`master_detail`, `inlineEdit: 'grid'`)" becomes "a typed list is a `master_detail` child a parent `fieldGroups[].relatedList` names". Three punctuation trims in the same section pay for it (the section's intro line and the `composite` and `repeater` rows: an em dash becomes a comma or a colon, two spaced slashes close up); no teaching is removed. Changeset `.changeset/36252-lint-rules-field-group.md`: `@objectstack/skills` patch. This agrees with the rule that PR #36250 teaches in `rules/relationships.md`: a parent field group naming the child places it in the record details and the entry form, and `inlineEdit` only picks how the rows are edited. <details><summary>Each claim against the lint source (origin/main c30ce97)</summary> - None of the three rules reads `inlineEdit`. In `packages/lint/src/data-model-rules.ts` the word occurs only in comments and in one unrelated `fix` string (see Acceptance notes). - R5, `relationship/line-items-inline-edit` (severity `suggestion`): fires on a `master_detail` field of an object whose name matches `LINE_ITEM_RE` when `isGroupPlaceableRelationship(def)` holds and `formInlines(...)` is false. `formInlines` is `isGroupPlaceableRelationship(def)` and `fieldGroupsPlaceRelationship(parent.fieldGroups, child, field)`, which reads each parent group's `relatedList` (a bare child name, or `object.field`). Its `fix` line adds a `relatedList` group to the parent's `fieldGroups`. - `lintInlineEditBulk`, `relationship/inline-edit-needs-bulk` (severity `warning`): for every group-placeable relationship that a parent field group places, it warns once per object, parent or child, whose declared `enable.apiMethods` does not allow `bulk`. - R6, `relationship/association-inline-edit` (severity `warning`): fires on a relationship of an association-named object when `formInlines(...)` is true, i.e. a parent field group places it. Its message says to leave it a tab of the record page; its `fix` removes the group. - `repeater` row: the spec's own route sentence for a typed list (`EMBEDDED_JSON_TYPED_LIST` in `packages/spec/src/data/authoring-key-lint.ts`) reads: a child object whose `master_detail` field points back at this object; a field group on this object whose `relatedList` names that child edits its rows as an inline grid on this object's form. </details> ## Evals No eval case pins the old wording, so none is changed. Searched `skills/*/evals/*.json` for the three rule ids, for the old cell wording, and for `repeater` and "typed list": zero hits. Three cases mention `inlineEdit` for other reasons (objectstack-data case 2 and objectstack-ui views case 6, both rewritten by PR #36250; objectstack-ui record-page case 1, see Acceptance notes). No eval round was run (a round is the eval seat's). ## Tests All readings at head `a5ea2daa9`. <details><summary>Token ratchet, size and line budget</summary> - `skills/objectstack-data/references/lint-rules.md`: 49 lines and 3735 bytes before, 49 lines and 3736 bytes after; 934 tokens before and after (ceiling 934, headroom 0). - `skills/objectstack-data/rules/field-types.md`: 267 lines and 14163 bytes before, 267 lines and 14162 bytes after; 3541 tokens before and after (ceiling 3541, headroom 0). - Whole package: every `SKILL.md` summed is 4947 lines before and after (none is touched); the ratchet's bundle total is 288824 tokens after, and the same before by the per-file identity above (both files keep their token count; the before total was not run separately). - `node scripts/check-skills-token-ratchet.mjs`: exit 0, "60 authored bundle file(s) within their ceilings". No ceiling row is moved. - Diff: 3 files, +16 / -6; net added lines 10 (changeset 10, skills 0), inside the card's budget of 12. </details> <details><summary>Derived gates and the skill-evals test</summary> - `node scripts/pm/dispatch-gates.mjs --commands`: 48 commands. All 48 ran under `os-verify-lock.sh`; 43 answered exit 0 on the first pass, and 5 answered exit 3 (PREREQUISITE NOT MET, nothing built yet): `check:doc-formula-expressions`, `check:dts-closure`, `check:dual-build-cjs-loads`, `check:lean-entry-closure`, `check:sourcemap-no-sources-content`. After `pnpm build` (120 tasks successful) the same five commands answered exit 0. - `--ran` reconciliation: "48 derived famil(ies) accounted for, 48 run, 0 NOT-MEASURED", exit 0. - `pnpm --filter @objectstack/scenarios exec vitest run --maxWorkers=2 test/skill-evals/skill-evals.test.ts`: Test Files 1 passed (1), Tests 38 passed (38); lock line `VERDICT command-exit 0`. - `node scripts/pm/overlap-check.mjs --branch=claude/issue-36252-lint-rules-field-group`: `VERDICT clean exit 0`; PR #36158 shares `rules/field-types.md` and merges cleanly with this branch. - No ablation: the diff changes no behaviour a test pins. </details> ## Acceptance notes - Precision limit, declared: the `line-items-inline-edit` cell does not spell the rule's one precondition, that the FK is one a group may place. A line-item FK that itself declares `relatedList: true` or `false` is never flagged, because a group naming it would be refused. The cell stays at the table's summary level, like its `*_line`/`*_item` shorthand for the ten suffixes the lint matches. - The `line-items-inline-edit` cell uses the file's one byte of headroom (3735 to 3736 bytes, 934 tokens either way). The `field-types.md` edit is one byte smaller than before, so PR #36158's measured row for that file cannot be pushed up by this change. - Out of scope, not changed here (lint source): `packages/lint/src/data-model-rules.ts`, the `fix` line of `field/embedded-sub-fields`, still says to make the typed list a child object and that `inlineEdit: 'grid'` edits it inline. The spec's route sentence and that rule's explanation text already name the parent field group. Read, not run. - Out of scope, not changed here (skills, same family): `skills/objectstack-data/rules/relationships.md` § Detail-page related lists and `skills/objectstack-ui/rules/record-page.md` item 2 still teach that a `master_detail` child with no `relatedList` is a body table by default, and objectstack-ui eval `record-page.json` case 1 expects that answer. `packages/spec/src/data/related-list-body-table.ts` says it is a tab by default and a body table only when a parent field group names it. Read against the spec source, not run. ## Verification Read first, by risk: 1. `skills/objectstack-data/references/lint-rules.md`, the three changed rows (the published claim about when each rule fires). 2. `skills/objectstack-data/rules/field-types.md`, the `repeater` row and the two byte-paying lines beside it. 3. `.changeset/36252-lint-rules-field-group.md`. Two-minute check: `node scripts/check-skills-token-ratchet.mjs` exits 0 and prints `lint-rules.md 934 / 934 (+0)` and `field-types.md 3541 / 3541 (+0)`; then `grep -c "inlineEdit" skills/objectstack-data/references/lint-rules.md` prints `0` (it printed `3` on `origin/main` `c30ce97cd`; the rule ids are spelled `inline-edit` and are unchanged). --- _Generated by [Claude Code](https://claude.ai/code/session_01FEkQ5kDGa1ViantgrfH797)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent 28749e3 commit 6925b87

3 files changed

Lines changed: 16 additions & 6 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the lint table and the `repeater` row name the parent field group, not `inlineEdit`, as what places a child's rows
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
objectstack-data's `references/lint-rules.md` said three `os lint` rules trigger on `inlineEdit`. They read the parent's field groups, and the rows now say so: `relationship/line-items-inline-edit` catches a line-item `master_detail` child that no parent field group places (`fieldGroups[].relatedList`), `relationship/inline-edit-needs-bulk` a placed child whose parent or child withholds `'bulk'`, and `relationship/association-inline-edit` an association a group places. `rules/field-types.md` pointed a typed list at a child object with `inlineEdit: 'grid'`; it now points at a `master_detail` child that a parent `fieldGroups[].relatedList` names. Text only; the rule ids and the lint are unchanged, and each file pays for its new wording in its own bytes.

‎skills/objectstack-data/references/lint-rules.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ Data-model rules (in addition to naming/label/i18n):
1212
| `relationship/missing-reference` | error | lookup/master_detail without a `reference` target |
1313
| `relationship/master-detail-required` | warning; error under `controlled_by_parent` | a `master_detail` that isn't `required` (under `controlled_by_parent`, the only one may be `required: false`: the optional master) — or, under `controlled_by_parent`, is `readonly`/`system` |
1414
| `relationship/delete-behavior` | suggestion | `master_detail` without an explicit `deleteBehavior` |
15-
| `relationship/line-items-inline-edit` | suggestion | a `*_line`/`*_item` master_detail child without `inlineEdit` |
16-
| `relationship/inline-edit-needs-bulk` | warning | `inlineEdit` while the parent's or child's `enable.apiMethods` omits `'bulk'` |
15+
| `relationship/line-items-inline-edit` | suggestion | a `*_line`/`*_item` master_detail child placed by no parent field group (`fieldGroups[].relatedList`) |
16+
| `relationship/inline-edit-needs-bulk` | warning | a child a group places while the parent's or child's `enable.apiMethods` omits `'bulk'` |
1717
| `relationship/line-item-should-be-master-detail` | suggestion | a line-item-shaped child using `lookup` instead of `master_detail` |
18-
| `relationship/association-inline-edit` | warning | an association (comment/audit/activity) marked `inlineEdit` (clutters the parent form — use a detail-page related list) |
18+
| `relationship/association-inline-edit` | warning | an association (comment/audit/activity) a group places (leave it a tab) |
1919
| `rollup/missing-summary` | suggestion | a parent of numeric master_detail children with no roll-up `summary` |
2020
| `field/select-missing-options` | warning | a `select`/`multiselect`/`radio` with no `options` (or options source) |
2121
| `object/missing-name-field` | suggestion | an object with no `nameField` (ADR-0079's canonical title pointer) and no name-like field (`name`/`title`/`subject`/`label`/`full_name`/`display_name`/`code`) |

‎skills/objectstack-data/rules/field-types.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,12 @@ only; in a grid a declared target leaves the same-named `autofill` copy.
115115

116116
## Embedded (JSON sub-objects)
117117

118-
Stored as JSON on the parent row — no separate table / FK:
118+
Stored as JSON on the parent row, no separate table/FK:
119119

120120
| Type | When to Use |
121121
|:-----|:------------|
122-
| `composite` | Single embedded JSON object, **untyped** — a field declares no sub-fields (`fields` / `subFields` are refused) |
123-
| `repeater` | Embedded JSON **array**, **untyped** — no sub-fields or `columns`; a typed list is a child object (`master_detail`, `inlineEdit: 'grid'`) |
122+
| `composite` | Single embedded JSON object, **untyped**: a field declares no sub-fields (`fields`/`subFields` are refused) |
123+
| `repeater` | Embedded JSON **array**, **untyped**: no sub-fields or `columns`; a typed list is a `master_detail` child a parent `fieldGroups[].relatedList` names |
124124
| `record` | Name-keyed **map** of embedded sub-objects (insertion order = display order; ADR-0007) |
125125

126126
## Calculated

0 commit comments

Comments
 (0)