Repository navigation
docs(skills): the objectstack-data field-types rule teaches percentDisplay and lookupAutofill, and the fields page teaches lookupAutofill - #28487
Conversation
…aches percentDisplay The `percent` row of `skills/objectstack-data/rules/field-types.md` now lists `percentDisplay`: unset or `'bar'` draws the progress bar, `'plain'` prints the number alone, for a rate or a probability. The addition is paid inside the file's token ceiling by deleting the `Select with Default` example, which restated the Selection section's own option example (label, value, color, default). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvc9vjAiGhyhnLTp34
…ofill on a lookup pick `skills/objectstack-data/rules/field-types.md` lists `lookupAutofill` on the `lookup` and `master_detail` rows and teaches it under the Relational table: the pair shape, which targets a pick fills, which sources it copies, the overwrite rule, that the fill is client-side only, and that a declared target leaves a line-item grid column's same-named `autofill` copy. Paid inside the file's token ceiling by deleting the `Email with Uniqueness` example (the unique scope lives in `rules/indexing.md`), the `Lookup (Many-to-Many)` example (the multi-value lookup lives in `SKILL.md`, and its `max: 10` is the numeric bound, not a selection cap) and the vector paragraph, whose `vectorConfig` trap folds into the invented-key list at the top of the file. `content/docs/data-modeling/fields.mdx` gains the key in the relationship property table, a product-lookup example and a `Lookup-pick autofill` section with the same rules in full, pointing at the generated Field reference. Changeset: `@objectstack/skills` patch. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvc9vjAiGhyhnLTp34
|
domain:skills#1 · os-tesla · session_01L9qibzCtJt8Q2Z63fyRNix Contract reviewServed-tier: Inputs read: cards #28256 and #28246 (body and every comment, the os-dev-report 6550627372 included), PR #28487 body, file list and the net diff ① Derived judgments
② Semver level
Clause-②: no ③ Boundary flagsThe os-dev-report (comment 6550627372 on #28256) carries
No flag escalates beyond the one card-to-file above. ④ Design judgmentCheck-runs on
|
…the master-detail bound names its two conditions Two should-fixes from the contract review of the fields page's Lookup-pick autofill section: the source type rule now says "the same type and multiplicity (a list only into a list)", the first refusal of the stack's type rule; and the bound reads "whose relationshipField is set and whose every column carries its type", the two conditions under which the master-detail renderer skips the child-schema fetch. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvc9vjAiGhyhnLTp34
|
domain:skills#1 · os-tesla · session_01L9qibvc9vjAiGhyhnLTp34 Verification update · head
|
|
domain:skills#1 · os-tesla · session_01L9qibzCtJt8Q2Z63fyRNix Contract reviewServed-tier: Inputs read: cards #28256 and #28246 (body and every comment, the os-dev-report 6550627372 included), PR #28487 body, file list and the net diff ① Derived judgments
② Semver level
Clause-②: no ③ Boundary flagsThe os-dev-report (comment 6550627372 on #28256) carries
No flag escalates beyond the one card-to-file above. ④ Design judgmentCheck-runs on The delta
|
|
domain:skills#1 · os-tesla · session_01L9qibzCtJt8Q2Z63fyRNix 维护者速读
席位意见:契约复审 PASS。第一轮提了两条文档措辞的建议修改(来源规则漏了单值和多值必须一致;主从表的边界条件),dev 已在新 head 上改好,复审重新确认。复审另外发现 席位核对ACCEPT · seat
|
Requested by Tesla · project thread
Fixes #28256
Fixes #28246
Clause-②: no
Metadata-protocol: none
维护者速读
percent行新增percentDisplay(不填或'bar'画进度条,'plain'只显示数字,用于比率和概率);lookup/master_detail行列出lookupAutofill,表下新增一段教它(选中一条记录后,把它的指定字段带入本记录,默认不覆盖用户已填的值);文档站fields.mdx的关系字段小节同步教lookupAutofill。Select with Default、Email with Uniqueness、Lookup (Many-to-Many)),并把vectorConfig提示并入文件顶部「不要臆造键」列表,被删的规则在技能别处仍各有一处;回滚即 revert 本 PR。skills/objectstack-data/rules/field-types.md(Relational 表下的lookupAutofill段、percent行、三处删除),content/docs/data-modeling/fields.mdx(新小节 Lookup-pick autofill),.changeset/28256-data-skill-percent-display-lookup-autofill.md。node scripts/check-skills-token-ratchet.mjs,预期退出 0,field-types.md读数 3206/3207。skills/**,Tier H)——席位完成契约复审后,由授权账号 Approve,再由席位落地。What changes
Two p3 skill-teaching cards folded into one
skills/objectstack-dataPR, one commit per card.#28256 — the
percentrow teachespercentDisplay(skills/objectstack-data/rules/field-types.md, Numbers table). The row's Config column now listspercentDisplay— the read-only face: unset or'bar'draws a progress bar,'plain'the number alone, for a rate or a probability. Read againstpackages/spec/src/data/field.zod.ts:1597(z.enum(['bar', 'plain']).optional(), the describe) and the rendererui/packages/fields/src/index.tsx:978-988(PercentCellRenderer: only the literalplaindrops the bar; every read-only host draws this one renderer, the relay sitesui/packages/plugin-grid/src/objectGridGenerateColumns.tsx:358,622,815andui/packages/plugin-detail/src/fieldEnrichment.ts:230copy the key).#28246 — the Relational section teaches
lookupAutofill. Thelookupandmaster_detailrows list the key, and one paragraph under the table teaches it: the pair shape[{ target, source, overwrite? }], single-valuelookup/master_detailonly (field.zod.ts:2647-2667, the superRefine); a pick copies the picked record'ssourceinto this object'starget, in the form and the line-item grid (ui/packages/fields/src/widgets/LookupField.tsx:1061-1085fillDeclaredTargets,ui/packages/components/src/renderers/form/form.tsx:3984-3991onAutofill,ui/packages/fields/src/widgets/GridField.tsx:283-300lookupAutofillPatch); the example[{ target: 'unit_price', source: 'list_price' }]is the describe's own (field.zod.ts:2105);targetis a field of this object an author writes — not the lookup,readonlyor computed — named once (packages/spec/src/data/object.zod.ts:2255-2300refuseDishonestLookupAutofill);sourceis a declared, non-internalfield ofreferencethe target can hold (packages/spec/src/stack.zod.ts:4156-4225collectLookupAutofillErrors, the type rulelookupAutofillTypeMismatchat 4124); the overwrite rule — a pick fills an empty target or an earlier pick's fill,overwrite: truealways replaces (ui/packages/fields/src/widgets/lookupAutofill.tsdeclaredLookupAutofillPatch, the describe atfield.zod.ts:2106); client-side only (field.zod.ts:2107); in a grid a declared target leaves the column's same-namedautofillcopy (GridField.tsx:290-294).content/docs/data-modeling/fields.mdx(the lookup section only, triage's one-PR exception, comment 6531273599): the relationship property table gains alookupAutofillrow, the code block gains a product-lookup example, and a new#### Lookup-pick autofillsubsection before Referential integrity carries the same rules in full — the target rule, the source rule with the type table (same type and multiplicity; a string-valued source into a text target;numberandcurrencyinto each other; a relationship only into a relationship over the same object —stack.zod.ts:4124-4150), the overwrite rule, client-side only, the gridautofillrelation, and the bound that a master-detail collection whose relationship and every column are authored loads no child fields and so sees no pairs (ui/packages/plugin-form/src/MasterDetailForm.tsx:429-435; named in PR #28322's acceptance notes as the text this card should state). It links the generated Field reference, which already carries both keys.Changeset
.changeset/28256-data-skill-percent-display-lookup-autofill.md:@objectstack/skillspatch, both declaration lines.Token ceiling — paid by deletion, never by re-wrap
field-types.mdsat at exactly itscheck-skills-token-ratchetceiling (3207 = ceil(bytes / 4), zero headroom), so every added byte is paid inside the file. Deleted, each with the home that still carries the rule:### Select with Default(251 bytes) — restated the Selection section's own option example in this file (label, value, color,default: true).### Email with Uniqueness(329 bytes) — the unique scope and the field-levelunique: truereading live inrules/indexing.md§ Unique scope — always state it (ADR-0120).### Lookup (Many-to-Many)(117 bytes) — the multi-value lookup lives inSKILL.md(the Many-to-Many row and themultiple: trueblockquote); itsmax: 10read as a selection cap, whileFieldSchema.maxis the numeric bound (field.zod.ts:1532).vectorConfigis refused at parse, folds into the invented-key list in the blockquote at the top of the file (theme,rows,vectorConfig,fileAttachmentConfig); the table row and the example already saydimensionsis the flat key.No line was re-wrapped to buy room.
Readings (bytes · ceil(bytes/4) tokens · lines), base
768ec4bf→ head0984e3e9:skills/objectstack-data/rules/field-types.mdskills/objectstack-databundle, all 15.mdfilesskills/*/SKILL.mdTests
Documentation only — no test file changes. The gates below are the verification; the skill's eval fixtures are unchanged (no eval case was asked) and the eval gate was run.
Acceptance notes
main. Every sentence is read against the spec schema and the renderer cited above; nothing is taught thatmain768ec4bfdoes not do.fields.mdx, not in the skill paragraph, which the token ceiling holds to 639 bytes.percentrow's "Percentage values (0-100)" is untouched. The row's When-to-Use text predates this card; the storage statement (percentScaleOf: a fraction unlessmaxis above 1) is not this card's subject. Noted, not filed.skills/objectstack-data/evals/*(no eval case asked; skills(objectstack-data) eval: hooks-security-seeds-datasources case 3 still answers credentialsRef for a code-declared datasource #28435 ownshooks-security-seeds-datasources.json),skills/*/references/_index.md(open PR feat(spec): one override declaration for code and Studio, with the .custom pairing helpers and the closed overridable-type list (ADR-0146) #28467),skills/objectstack-ui(itsautofill: falseline is correct as is).Verification
All readings at head
0984e3e9(=origin/main768ec4bf+ the two commits).node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack→ 67 families (the docs gates included); every line run with stdin closed, exit codes landed on disk first, thendispatch-gates.mjs --repo objectstack-ai/objectstack --ran FILE→✓ dispatch-gates --ran: 67 derived famil(ies) accounted for — 66 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3). 66 families exit 0, among themcheck-skills-token-ratchet(+--self-test),check:skill-identifier-liveness,check:corpus-claim-drift,check:doc-authoring,check:docs-spec-enumerations,check:doc-anchors,check:docs-single-h1,check:role-word,check:pm-skill-id-lint,check:pm-governed-merges,@objectstack/spec check:docs/check:liveness/check:skill-examples(afterturbo run build --filter='@objectstack/client-react...'under the verify lock),check:closing-keyword-parity,check:empty-changeset,check:changeset-no-major.pnpm check:dual-build-cjs-loads, exit 3 (PREREQUISITE NOT MET — it needs every package'sdist, a fullpnpm build); the diff touches no package entry. CI runs it.pnpm --dir ui run check:skill-eval-tokens --self-test(29 cases) andpnpm --dir ui run check:skill-eval-tokens→ exit 0,Every must_contain token is taught by its own skill bundle(theobjectstack-dataevals still find every token they grade).node scripts/pm/dispatch-gates.mjs --tieron the two surfaces:claude-fable-5-1MANDATORY (skills/**, no one-line exit); this thread runs on that tier.--ran).Dogfood: not run — the title carries no
!andClause-②carries no(narrowing)arm.Human Minimum
packages/specholds no runtime logic. (No schema touched.)pnpm lintpasses (CI-owned repo scan; no.tstouched).main, one pull request. (Two cards, folded by the dispatch order; one branch, one PR.)packages/spectouched: its generated artifacts are regenerated and committed. (Not touched.)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code