Repository navigation
Commit b3863b7
docs(skills): objectstack-formula teaches label() over a multi-select and the timestamp() refusal over a date field (#34484)
<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9171vgqqqLwGXb1ijPmb3ta)_
Fixes #34444
Fixes #34450
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:对外发布的 `objectstack-formula` 技能补两句已上线行为——`label()`
用在多选字段上会按读者语言读出每个已选项的标签、按存储顺序用 `, ` 连接(空选择读 `''`);`timestamp()`
只认完整时间戳文本,对日期字段会被构建拒绝(`date-text-call`),日期平移要写
`isoDate(addDays(record.d, n))`。各配一条 eval。
- 为什么改:这两项行为分别由 #34443、#34447 落地,但 AI 作者只读技能、不读文档页;不教的话会继续给每个选项建一个字段,或写出
`timestamp(record.borrow_date) + duration('168h')` 这种每行都失败的公式。
- 风险与回滚:只改技能文本、eval、token 棘轮一行和 changeset,不动任何代码与契约。先删三处重复内容付账,余下 +11
token 按维护者常设裁决「A:先削重复,余额按实测提高」抬上限(5997 → 6008)。回滚即 revert。
- 先看:`skills/objectstack-formula/SKILL.md`(`label(record.f)` 行与 `Plus
CEL built-ins` 段,以及三处删除)、`scripts/check-skills-token-ratchet.mjs` 的
formula
行注释、`skills/objectstack-formula/evals/cel-predicates-formulas.json` 新增的
11、12 两条。
- 两分钟验证:`node scripts/check-skills-token-ratchet.mjs`,预期 formula 行读
`6008 / 6008`,全部文件在上限内。
- 需要你做的:审批这个受治理 PR(Tier H,`skills/**`);席位会在 L1 与达档契约复审通过后补席位记录再请审。
## What changes
`skills/objectstack-formula/SKILL.md`, the published formula skill, now
teaches two behaviours `@objectstack/formula` already ships:
1. **`label()` over a multi-select** (#34444, the `Skills-docs:`
follow-up of PR #34443). The `label(record.f)` row adds: a multi-select
(`multiple: true`) reads each selected label in stored order, joined
with `, `; `''` for null *or an empty selection*. Wording follows
`content/docs/data-modeling/formulas.mdx` as PR #34443 landed it.
2. **`timestamp()` over a date field is refused** (#34450, the
`Skills-docs:` follow-up of PR #34447). The built-ins line that lists
`timestamp(s)` adds: `timestamp()` parses only a full ISO instant, so
over a `date` field (`YYYY-MM-DD`) the build refuses it
(`date-text-call`), `+ duration(…)` included; shift a date with
`isoDate(addDays(record.d, n))`. Wording follows the formulas page row
PR #34447 landed and the `firstDateTextCall` docblock in
`packages/formula/src/cel-engine.ts` (a `datetime` field's text is an
instant and is not refused, so the sentence names the `date` field
only).
`skills/objectstack-formula/evals/cel-predicates-formulas.json` gains
one case per card (ids 11 and 12).
**Token ceiling — paid down first, raised by the measured remainder.**
The file sat at headroom 9. Under the standing maintainer ruling of
2026-10-27, verbatim and untranslated, 「A:先削重复,余额按实测提高」 (ruling record
6513306068, letter B), three restatements were cut, each keeping another
home:
| Cut | Its other home |
|:---|:---|
| `has()` paragraph: "To check for "value present and non-blank" use the
stdlib helper `isBlank()` or compare to `null` explicitly." | the
cheat-sheet `Null check` row (`record.foo == null` or
`isBlank(record.foo)`) and the next paragraph's "`!= null` is the whole
guard" |
| template section: "`shared/expression.zod.ts` declares both surfaces
and their carriers." | Core contract ("declared as `Expression` /
`ExpressionInput` in `shared/expression.zod.ts`"), the table's
`Carriers` column, and See also |
| translation-table note: "on update and delete events it is bound per
matched row — see §5" | the §5 `previous` table's `after*` / `before*` /
bulk rows; the note keeps its pointer `(§5)` |
Arithmetic in priced bytes (stamp line excluded), against `main`'s
23952: the text adds 321, the cuts remove 243, landed 24030 →
`ceil(24030 / 4)` = 6008. The row moves 5997 → 6008 (+11), pinned at the
measurement, with the arithmetic in the row comment. No re-wrap was used
to pay.
**Line and token readings (os-dev.md, `skills/**`):**
| | before | after |
|:---|---:|---:|
| `skills/objectstack-formula/SKILL.md` lines | 492 | 493 |
| `skills/objectstack-formula/SKILL.md` tokens | 5988 | 6008 |
| all `skills/**/SKILL.md` lines (whole package) | 4592 | 4593 |
| all `skills/**/SKILL.md` tokens | +0 elsewhere | +20 (this file only)
|
Net line budget set at the claim: +4 on the SKILL.md; used +1.
## Tests
No code changes. The two eval cases are the exercise: id 11 asserts
`label(record.no_margin_reasons)` and refuses a hand-built
`joinNonEmpty`; id 12 asserts `isoDate(addDays(record.borrow_date, 7))`
and refuses `timestamp(record.borrow_date)`. No existing test was
changed.
## Acceptance notes
- Fold: one PR for two cards that edit the same file (claim 6931123459
on #34444, member claim 6931145551 on #34450); one commit per card plus
one paydown commit.
- Model tier: the `--tier` reading is MANDATORY `CONTRACT_REVIEW_TIER`
for `skills/**`; this PR was authored at `TIER_DEFAULT` under the
proactive low-headroom downgrade (claim `Container & model:` line). The
compensating control is the at-tier contract review routed by the seat
to the review seat. Contract review owed.
- Out of scope: the "Shift a date" row of the Dates table already names
`addDays`; it is unchanged.
## Verification
`node scripts/pm/dispatch-gates.mjs --commands` derives 66 commands for
this diff. They run serially under the verify lock after a full `pnpm
build`; the `CMD :: exit N` ledger and its `--ran` reconciliation are
posted as a PR comment on the final head when the run ends.
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(not touched)
- [x] 2. Every name I added uses the casing for its kind. (no names
added)
- [x] 3. No formatter ran. (the only script edit is a comment block and
one number in `scripts/check-skills-token-ratchet.mjs`; CI's lint job
judges it)
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request. (a two-card fold of the same file, both claims name this
branch)
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed. (not touched)
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English. (the 维护者速读 block
excepted)
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01ADHkmSXPDB46NVRepWVrL3
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent d11756a commit b3863b7
4 files changed
Lines changed: 58 additions & 7 deletions
File tree
- .changeset
- scripts
- skills/objectstack-formula
- evals
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
684 | 684 | | |
685 | 685 | | |
686 | 686 | | |
687 | | - | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
688 | 704 | | |
689 | 705 | | |
690 | 706 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | | - | |
| 94 | + | |
96 | 95 | | |
97 | 96 | | |
98 | 97 | | |
| |||
213 | 212 | | |
214 | 213 | | |
215 | 214 | | |
216 | | - | |
| 215 | + | |
217 | 216 | | |
218 | 217 | | |
219 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
220 | 222 | | |
221 | 223 | | |
222 | 224 | | |
| |||
399 | 401 | | |
400 | 402 | | |
401 | 403 | | |
402 | | - | |
| 404 | + | |
403 | 405 | | |
404 | 406 | | |
405 | 407 | | |
| |||
463 | 465 | | |
464 | 466 | | |
465 | 467 | | |
466 | | - | |
467 | 468 | | |
468 | 469 | | |
469 | 470 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
103 | 123 | | |
104 | 124 | | |
105 | 125 | | |
0 commit comments