Repository navigation
docs(skills): the formula skill teaches that a date field is its ISO text and goes through date() before a timestamp-only call - #32970
Conversation
…text and goes through date() before a timestamp-only call Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cz86V9eAwERKXrJUmi
|
我已批准,席位审核之后就可以落地 |
|
domain:skills#1 · os-elon-musk · session_016WV4cwhy7iXYvfs2NorugV Contract reviewServed-tier: PR #32970 for card #32818: one commit on ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
The note does not contradict its neighbours. "No date arithmetic" at L170 to L172 is about a number or another date, and the examples that hand a bare date field to The card's three asks. The Dates line: met. The refusal word: the skill has no refusal list, so it is named in the note, which is what the card's "if it does" allows. The eval: met.
Attempts to break the taught guidance.
Findings. No must-fix and no should-fix.
Implemented-by: VERDICT: PASS |
|
domain:skills#1 · os-elon-musk · session_016WV4cwhy7iXYvfs2NorugV 维护者速读(席位终稿)
席位核对 — ACCEPT · domain:skills#1 · head
|
Requested by Elon · project thread
domain:skills#1 · os-elon-musk · session_016WV4cz86V9eAwERKXrJUmi
Fixes #32818
Clause-②: no
Metadata-protocol: none
维护者速读
objectstack-formula技能的「Dates」一节新增一段四行提示:日期、日期时间字段在表达式里是它的 ISO 文本;直接交给只收时间戳的函数或方法,构建会拒绝(date-text-call);先用date()包一层,写成isoDate(date(record.start_at))、date(record.start_date).getFullYear();和文本拼接、和文本字面量比较则直接用文本。另加一条评测题,期望答案是isoDate(date(record.start_at))。isoDate(record.start_at)这类写法。技能原先只在表格里有一句「Text in?isoDate(date(s))」,没说日期字段本身就是文本,客户的 agent 照旧写法会直接撞上拒绝。skills/objectstack-formula/SKILL.md第 165 至 168 行(新增提示);第 222 行(删掉的重复开头句,最大的一处删减);skills/objectstack-formula/evals/cel-predicates-formulas.json第 10 题。node scripts/check-skills-token-ratchet.mjs,应看到skills/objectstack-formula/SKILL.md 5948 / 5997 (-49)。skills/**需受管审批人批准),之后席位落地。What changes
One new note in
skills/objectstack-formula/SKILL.md, § ObjectStack CEL standard library, Dates, directly under the function table (L165-168):The skill has no list of refusal words, so
date-text-callis named inside the note, where an author who meets the refusal will search for it.Five cuts in the same file pay for it. Each row names the cut text and where its content still lives:
isoDate(t)/isoDatetime(t)rowisoDate(date(s))"daysBetween(start, end)" rowdaysBetween(a, b)") and thedaysBetween(a, b)row of the function tableCEL_STDLIB_FUNCTIONS, the bare-callable public subset: the names you may write asfn(x)."CEL_STDLIB_FUNCTIONSis the advertised bare-callable subset … this table documents them all"nowfromEvalContext, so they are safe inside one."now()row (L155): "Pinned per evaluation run; deterministic in build"update(id)and onupdate({multi: true})alike."No line was re-wrapped to buy room: cuts 2, 4 and 5 remove whole lines, cut 3 removes one whole line and the head of the next, cut 1 shortens one table cell.
One new eval, id 10 in
skills/objectstack-formula/evals/cel-predicates-formulas.json: astart_dayformula over thestart_atdatetime field.must_containisisoDate(date(record.start_at))and theFtag;must_not_containis the bareisoDate(record.start_at)and a brace-wrapped field..changeset/32818-formula-skill-date-wrap.md:'@objectstack/skills': patch.Counts
skills/objectstack-formula/SKILL.mdskills/**/SKILL.mdtogetherTests
Skill prose, one eval fixture and one changeset. No package code changes, so no test is added and no ablation applies.
What the note teaches was measured against main's built
@objectstack/formula(validateExpression('value', …)on an object with adatefieldstart_dateand adatetimefieldstart_at, thencelEngine.evaluateon the text row a read door serves):Probe output
Acceptance notes
isoDate(date(record.start_at)).date-text-call-fail-closedand the others) are not listed: they share thedate-text-callstem an author will search for.Verification
Head
15262bb3(origin/main25ee5076merged in: already up to date at push time).node scripts/check-skills-token-ratchet.mjs: exit 0,skills/objectstack-formula/SKILL.md 5948 / 5997 (-49).pnpm check:pm-skill-ratchet: exit 0 (it prices.claude/**, which this PR does not touch).pnpm --filter @objectstack/spec run check:skill-docs,check:skill-refs,check:skill-examples: exit 0 each (check:skill-examples: 345 prose examples type-check; its first run exited 3 until the@objectstack/client-reactclosure was built).pnpm --filter @objectstack/formula exec vitest run --maxWorkers=2 src/skill-catalog-sync.test.ts src/cel-stdlib-drift.test.ts: exit 0.node scripts/pm/dispatch-gates.mjs --ran:46 derived famil(ies) accounted for — 44 run, 2 NOT-MEASURED. All 44 exit 0.pnpm check:dual-build-cjs-loads,pnpm check:lean-entry-closure, reason: both exit 3 (prerequisite not met) without a whole-tree build, which this prose-only diff does not otherwise need. CI runs them.must_containstrings are both taught verbatim by the edited SKILL.md.Generated by Claude Code