Skip to content

docs(skills): the data skill says precision is total digits and decimal places are scale - #39247

Queued
objectstack-fleet[bot] wants to merge 1 commit into
mainfrom
claude/project-thread-ujg6kn
Queued

objectstack-fleet[bot] wants to merge 1 commit into
mainfrom
claude/project-thread-ujg6kn

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

Fixes #39213

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:数据技能的字段类型表里,数字和百分比两行现在写明「precision 是总位数、至少 1,小数位用 scale」。
  • 为什么做:应用内助手照旧表把「不要小数」写成总位数为 0,发布后除 0 以外的值全被拒;平台已经拒收这种写法,技能要教对的写法。
  • 出错会怎样:只是技能文字,没有运行时行为变化;写错了撤回这一个改动即可。
  • 要你做什么:这是对外发布的技能,需要你批准;同时技能 token 上限按实测抬了 10 个。

What changes

  • skills/objectstack-data/rules/field-types.md: the number row and the percent row (the only two lines under skills/** that name precision) now say precision is the total digit count, at least 1, and that decimal places are scale. This follows PRECISION_LOWER_BOUND_MESSAGE in packages/spec/src/data/field.zod.ts on main.
  • The currency row is unchanged. It names neither precision nor scale, so the skill still does not teach scale on a currency field, where the spec refuses it.
  • Same file, two restatements cut to pay for the text: the word "equivalent" before the Field.* factory (the same sentence says "same schema"), and "and it implies nothing about the column" (the paragraph's bold opening already says required is not the NOT NULL dial).
  • scripts/check-skills-token-ratchet.mjs: the file's row moves 4566 to 4576, pinned at the measurement.
  • One patch changeset for @objectstack/skills.

Size readings

before (main 57d7b96) after
rules/field-types.md 346 lines, 18262 bytes, 4566 tokens 346 lines, 18304 bytes, 4576 tokens
all skills/*/SKILL.md together 2146 lines, 121252 bytes unchanged

The gloss adds 100 bytes (50 a row). The two cuts remove 58 (11 and 47). Net +42 bytes, which is +10 tokens.

Token ratchet raise

The remainder after the cuts is 10 tokens. The row is raised by that measured remainder under the standing ruling of 2026-10-27, verbatim: 「A:先削重复,余额按实测提高」 (ruling record 6513306068), and under the standing note 7216253348 on the ratchet card for a remainder of at most 10 tokens, the maintainer's words of 2026-11-27 05:20Z, verbatim: 「后续遇到这种问题,能适当放宽token 的限制」.

Tests

No test changes: the diff is skill text, a ratchet row and a changeset. The skill's eval files were searched for a precision or scale expectation and none exists, so no eval contradicts the spec and none was edited.

Local run at head 5339e262, the 67 families node scripts/pm/dispatch-gates.mjs --commands derives from this diff; --ran reconciliation: 67 derived famil(ies) accounted for.

  • 61 exited 0, among them node scripts/check-skills-token-ratchet.mjs (61 authored bundle file(s) within their ceilings) and its --self-test, pnpm check:role-word, pnpm check:skill-links, pnpm check:skill-identifier-liveness, pnpm check:skill-compatibility, pnpm check:doc-authoring, pnpm check:published-files, pnpm check:nul-bytes, node scripts/check-empty-changeset.mjs --base origin/main.
  • NOT MEASURED, 5 families, exit 3 PREREQUISITE NOT MET (they read built dist/ and this diff builds no package): check:doc-formula-expressions, check:dts-closure, check:dual-build-cjs-loads, check:lean-entry-closure, check:sourcemap-no-sources-content. CI owns them.
  • NOT MEASURED, 1 family: pnpm check:pm-dispatch-gates did not finish inside a 240 s local limit (exit 124). CI owns it.

All six are derived only because the diff touches a file under scripts/ (the ratchet row).

Live check

One paired probe, one repetition per arm, claude -p on the container's subscription login (oauth_token, no API key set), --model haiku --effort medium, tools limited to reading files. Each arm is a scratch directory holding the objectstack-data bundle under .claude/skills/: the base arm with rules/field-types.md from main 57d7b96, the head arm with this branch's.

Question asked: write the field definitions for quantity, a number holding whole units with no decimal places, and discount, a percent shown with no decimal places.

arm answer notional cost
base scale: 0 on both, with a comment that the percent row does not list scale and should be confirmed against the installed spec $0.010
head scale: 0 on both, no hedge $0.006

Neither arm wrote precision: 0 in this one repetition, so the probe does not reproduce the card's failure on the base text. It shows the head text gives the right spelling and removes the doubt on percent. skill-evals was not run: no eval case of the bundle asks about digit counts or decimal places, so there is no touched case to select.

Acceptance notes

  • The card's acceptance reads "The number row (and any other row naming precision) says total digits, at least 1, decimal places are scale." Both rows naming it now say so in the same words.
  • The refusal sentence also covers rating and slider. Their rows list neither key and are left as they are.
  • The currency row does not say that precision is accepted there or that scale is refused. Adding that is new teaching outside this card's acceptance; noted, not filed.

Verification

Read first: skills/objectstack-data/rules/field-types.md lines 51 and 53 (the gloss), then lines 11 and 334 (the two cuts), then the row comment in scripts/check-skills-token-ratchet.mjs.

Two-minute check: node scripts/check-skills-token-ratchet.mjs prints 61 authored bundle file(s) within their ceilings, and wc -c skills/objectstack-data/rules/field-types.md prints 18304.


Generated by Claude Code

…places are scale

Claude-Session: https://claude.ai/code/session_01Utp6CbSkUoxdjW4XWwxBn4
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Dec 3, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CYUove7YBXgHy4iEsr

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 5339e2629130d1613ef23cf47aab6c936b469ba3
Local-runs: none
Scope: skills/objectstack-data/rules/field-types.md + scripts/check-skills-token-ratchet.mjs
Security-touching: no
Rule-change-verified: none

Inputs read: card #39213 (body and its 4 comments: first touch, unblock 7365687157, claim 7365744569, dev report 7366203157), PR #39247 (body, 3 files, net diff against main), the check-runs on this head, and, to judge the diff, packages/spec/src/data/field.zod.ts on main, ruling record 6513306068 and standing note 7216253348. The PR has no comments. The remainder of the diff (.changeset/39213-data-skill-precision-total-digits.md) is the lane seat's ACCEPT.

① Derived judgments

  • Accept-set: unchanged. The diff edits skill prose and one ratchet constant; no schema, no runtime code. Right.
  • Public surface: one published skill file, skills/objectstack-data/rules/field-types.md, 18262 to 18304 bytes (measured on both refs). Wording only; no key is added to or removed from what the skill teaches as authorable except that the percent row now names scale in its gloss. scale IS accepted on percent on main (FieldSchema.scale describe: "Applies to number, percent, rating and slider fields"; the only type refusal is currency), so the new teaching is inside the spec's accept-set. Right.
  • Gate verdicts: every check-run on the head concluded success or skipped, among them Lint · repo & tooling gates, Lint · docs & code guards, Check Changeset, Governed Surface Queue Guard and PR-body guards. No red, none pending.

② Semver level

One patch changeset for @objectstack/skills, matching a wording-only change to a published skill. Clause-②: no and Metadata-protocol: none on the PR body and the changeset agree with the diff: nothing narrows, nothing in the metadata protocol moves. The changeset's claim "which the spec now refuses" holds on main (precision: z.number().int().min(1, { message: PRECISION_LOWER_BOUND_MESSAGE })). Right.

③ Boundary flags

  • open_questions: empty in the dev report. Nothing to answer.
  • Dev flag, out-of-scope finding "the currency row does not say that precision is accepted there and scale is refused" (carrier: none, noted not filed): agreed as out of scope. The card's acceptance covers rows NAMING precision; the currency row names neither key, and the diff adds no scale teaching to it, so the skill does not steer anyone into the currency refusal. No escalation.
  • Dev deviations (model-named trailer refused by the pre-push hook and amended before publication; worktree built by hand): process only, nothing in the tree. No action.
  • SQL push-down: not applicable, the diff carries no query or data-access code.

④ Design judgment

No must-fix, no should-fix.

skills/objectstack-data/rules/field-types.md, against PRECISION_LOWER_BOUND_MESSAGE and the precision / scale describes on main, and against the scenario of #39173 (an author writing precision: 0 for "no decimals"):

  • The gloss, precision (total digits, ≥ 1; decimal places are scale), is true on both rows. Spec: "precision must be a positive integer: it is the total digit count ... on a number, percent, rating or slider field they are scale (a whole number declares scale: 0, not precision: 0)". It closes the card's scenario: the reader who wants zero decimals is pointed at scale, and told 0 is not a legal precision.
  • These are the only two lines under skills/** naming precision (the diff and the head file agree), so the acceptance "the number row and any other row naming precision" is met in full.
  • Cut 1, "equivalent" before the Field.* factory: no teaching lost; "same schema" follows in the same sentence.
  • Cut 2, "and it implies nothing about the column": no teaching lost. The bold opener (required is not the NOT NULL dial) and the next sentence (the physical constraint is a separate explicit opt-in, storage: { notNull: true }) state the same thing, and the conclusion drawn from it (tightening required is safe, existing null rows stay readable) is intact. The em-dash aside became a colon and a full stop; meaning unchanged.

Nits (no effect on correctness or the contract; fix on a prose face or leave as a follow-up):

  • N1 (nit) — the percent row's gloss says decimal places are scale, but scale is not in that row's own key list (min, max, precision, percentDisplay), while the number row lists it. The key is valid on percent and the gloss itself names it, so nothing false is taught; a reader treating the Config column as the key inventory could still doubt it. Listing it costs 9 bytes, which would put the file past the 10-token allowance without a further cut, so it is left to a follow-up rather than asked of this head.
  • N2 (nit) — on percent the same row uses the word "scale" twice in two senses: "seeds, defaults, API values use that scale" (the storage scale, fraction or whole points) and the key scale. The spec counts a percent's scale on the PERCENTAGE-POINT value as displayed (scale: 2 means 12.34%, whatever the storage), and counts precision on that same displayed value. The gloss does not say so; a reader reasoning from the stored fraction could write scale: 4 for 12.34%. That declaration is accepted and only over-wide, and the gap predates this PR; the card's acceptance asks for exactly the words written. Follow-up material, not this card.

scripts/check-skills-token-ratchet.mjs (enforces the hits file), sentence by sentence against the rule its comment cites:

  • 4566 to 4576: ceil(18304 / 4) is 4576 exactly, measured on the head file; the base file measures 18262, ceil 4566, the old row. The row is pinned AT the measurement with zero headroom, as ruling record 6513306068 part 2 requires.
  • Paid down first: the diff shows two same-file restatement deletions, +100 bytes of gloss against 58 cut, net +42, which matches the measured byte delta. Ruling 6513306068 asks for a visible same-file deletion and the 2026-10-27 ruling quoted in the PR body; the body quotes 「A:先削重复,余额按实测提高」 verbatim. Met.
  • Standing note 7216253348 (ratchet card check-skills-token-ratchet: say when a ceiling sits above the measured tokens (a raise outlived by a later shrink) #37630): in scope when the PR's own legitimate change puts the file no more than 10 tokens over the row's ceiling; the raise goes to the measured value and no further; the row comment cites the note and the maintainer's 05:20Z words and gives before and after numbers. The overage is exactly 10, the raise is exactly to the measurement, and the comment carries the note id, the verbatim words 「后续遇到这种问题,能适当放宽token 的限制」 and 4566 / 4576. Met, at the limit and not past it.
  • The row comment's account of the two cuts matches the diff. The 47 bytes attributed to the second cut include the punctuation change around it; the total is what the measurement shows.

Implemented-by: claude/project-thread-ujg6kn
Reviewed-by: session_01Utp6CYUove7YBXgHy4iEsr

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CYUove7YBXgHy4iEsr

维护者速读

  • 做了什么:数据技能的字段类型表里,number 和 percent 两行的 precision 后面加了一句说明:「总位数,至少 1;小数位用 scale」,与 spec 的报错一致。货币那一行不提这两个键,所以不会教人在货币上写 scale。
  • 词元上限:先在同一文件删掉两处重复说法,抵掉 58 字节;净增 42 字节,正好 +10 词元。棘轮行 4566 → 4576,按你 11-27 的「后续遇到这种问题,能适当放宽token 的限制」(笔记 7216253348)放宽。
  • 风险:低;只改技能文案和棘轮那一行。
  • 要你做什么:批准并入队(skills/** 和棘轮脚本属于 Tier H)。

席位核对

ACCEPT — head 5339e2629130d1613ef23cf47aab6c936b469ba3 (#39213, zone data-p2).

  • Shape: draft → main; Fixes #39213 leads; Clause-②: no, Metadata-protocol: none; one patch changeset for @objectstack/skills.
  • Content: both rows match PRECISION_LOWER_BOUND_MESSAGE on main (fix(spec)!: a field's precision: 0 is refused at save and publish, naming scale #39211); the currency row names neither key; no eval names precision or scale.
  • Ratchet: 18262 → 18304 bytes, ceil/4 4566 → 4576 (+10, at the measurement), paid down first by two same-file restatement cuts (58 B); raise path ruling record 6513306068 + standing note 7216253348 (≤10 tokens).
  • Contract review: CONTRACT_REVIEW_TIER PASS 7366622150 on this head (rules face), no must-fix, no should-fix.
  • L1: zone read the full diff (3 files, +31/−6); the two cuts lose no teaching (each has its home in the same sentence/paragraph).
  • Gates: CI on this head 29 success / 18 expected skip / 0 failed.
  • Accepted deviations: N1 the percent row's gloss names scale but its key list omits it (accepted on percent; true as written); N2 percent "scale" in two senses (pre-existing). Noted, not filed: the currency row could say scale is refused there.
  • Landing: GOVERNED (check-governed-merges.mjs --pr 39247: skills/** + a script path outside the low-risk arm) → hand-off to the approver.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CYUove7YBXgHy4iEsr

维护者速读

  • 做了什么:数据技能的字段类型表里,number 和 percent 两行的 precision 后面加了一句说明:「总位数,至少 1;小数位用 scale」,与 spec 的报错一致。货币那一行不提这两个键,所以不会教人在货币上写 scale。

  • 词元上限:先在同一文件删掉两处重复说法,抵掉 58 字节;净增 42 字节,正好 +10 词元。棘轮行 4566 → 4576,按你 11-27 的「后续遇到这种问题,能适当放宽token 的限制」(笔记 7216253348)放宽。

  • 风险:低;只改技能文案和棘轮那一行。

  • 要你做什么:批准并入队(skills/** 和棘轮脚本属于 Tier H)。

  • 为什么交给你:check-governed-merges 判为 Tier H(skills/** 加上低风险放权之外的棘轮脚本),需要人工合并。

  • 记录:席位 ACCEPT(上一条评论),契约复核 PASS 7366622150,Head-sha 5339e2629130d1613ef23cf47aab6c936b469ba3。

席位意见:ACCEPT。

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Dec 3, 2026
@objectstack-fleet
objectstack-fleet Bot requested a review from os-zhuang December 3, 2026 03:31
@os-zhuang
os-zhuang marked this pull request as ready for review December 3, 2026 03:31
@os-zhuang
os-zhuang added this pull request to the merge queue Dec 3, 2026
Any commits made after this event will not be merged.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Data skill: field-types.md lists number precision without saying it is the total digit count (≥ 1) and that decimal places are scale

2 participants