Skip to content

Commit 3890dfe

Browse files
committed
docs(skills): pay the formula skill's two teachings down first, raise by the remainder
Three restatements in skills/objectstack-formula/SKILL.md are cut, each keeping its other home: the has() paragraph's null-check sentence (the cheat-sheet Null check row), the template section's shared/expression.zod.ts sentence (Core contract and See also), and the translation-table note's per-matched-row clause (the section 5 previous table). The token ceiling moves by the measured remainder only, 5997 -> 6008, under the standing ruling recorded as 6513306068. Changeset for the two cards. Claude-Session: https://claude.ai/code/session_01ADHkmSXPDB46NVRepWVrL3 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6879097 commit 3890dfe

3 files changed

Lines changed: 33 additions & 5 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): `objectstack-formula` teaches `label()` over a multi-select and the `timestamp()` refusal over a date field
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The `label(record.f)` row of the `objectstack-formula` built-ins table now says what a select with `multiple: true` reads: each selected value's option label in the reader's locale, in the order the record stores them, joined with `, `; an empty selection reads `''`, as null does.
11+
12+
The built-ins line that lists `timestamp(s)` now says that `timestamp()` parses only a full ISO instant, so over a `date` field (its `YYYY-MM-DD` text) the build refuses it as `date-text-call`, inside `+ duration(…)` arithmetic too, and that a date is shifted with `isoDate(addDays(record.d, n))`. Both are the behaviour `@objectstack/formula` already ships; the skill only teaches it. One eval case covers each.
13+
14+
Paid down first under the standing ruling 「A:先削重复,余额按实测提高」 (ruling record 6513306068): three restatements were cut, each keeping another home — the `has()` paragraph's null-check sentence (the cheat-sheet `Null check` row), the template section's `shared/expression.zod.ts` sentence (Core contract and See also), and the translation-table note's per-matched-row clause (the §5 `previous` table). The token ceiling moves by the measured remainder, +11 (5997 → 6008).

‎scripts/check-skills-token-ratchet.mjs‎

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,23 @@ export const CEILINGS = new Map([
662662
// raise path is the standing 2026-10-27 ruling, verbatim and untranslated:
663663
// 「A:先削重复,余额按实测提高」 (ruling record 6513306068).
664664
['skills/objectstack-data/SKILL.md', 6665],
665-
['skills/objectstack-formula/SKILL.md', 5997], // -53 (was 6055), then -5 A2′ (was 6002)
665+
// 5997 -> 6008 (the formula skills follow-ups of PRs #34443 and #34447): the
666+
// `label(record.f)` row teaches a multi-select (`multiple: true`) reading each
667+
// selected label in stored order, joined with `, `, and the built-ins line
668+
// teaches that `timestamp()` over a `date` field is refused (`date-text-call`)
669+
// and that a date shifts with `isoDate(addDays(record.d, n))`. Raise path the
670+
// standing ruling 「A:先削重复,余额按实测提高」 (ruling record 6513306068,
671+
// letter B). PAID DOWN FIRST — three restatements cut, each keeping its other
672+
// home (listed in the PR body): the `has()` paragraph's null-check sentence
673+
// (the cheat-sheet `Null check` row), the template section's
674+
// `shared/expression.zod.ts` sentence (Core contract and See also), and the
675+
// translation-table note's per-matched-row clause (§5's table). Arithmetic in
676+
// priced bytes (stamp line excluded), against `main`'s 23952 (headroom 9): the
677+
// text adds 321, the cuts remove 243, so the LANDED priced text is 24030
678+
// bytes -> ceil(24030 / 4) = 6008; the ceiling moves +11, the measured
679+
// remainder only. Pinned AT the measurement.
680+
// ceil(($(wc -c < skills/objectstack-formula/SKILL.md) - 20) / 4) == ceil(24030 / 4)
681+
['skills/objectstack-formula/SKILL.md', 6008], // -53 (was 6055), then -5 A2′ (was 6002), then +11 (was 5997)
666682
['skills/objectstack-i18n/SKILL.md', 6333], // -11 (was 6349), then -5 A2′ (was 6338)
667683
// 12705 -> 12984 (2026-08-31 app-repo-principles raise, see the block above).
668684
// The largest of the five and the frame the other four are read under: what an

‎skills/objectstack-formula/SKILL.md‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ ADR-0068 — spec field docs write predicates like `current_user.positions`.
9191
### `has()` is NOT a null check
9292

9393
`has(record.x)` is **true whenever the key exists**, even when its value is
94-
`null`. To check for "value present and non-blank" use the stdlib helper
95-
`isBlank()` or compare to `null` explicitly.
94+
`null`.
9695

9796
Every server-evaluated predicate — validation rules, `requiredWhen`, option
9897
`visibleWhen`, `readonlyWhen`, hook `condition`, the flow trigger record —
@@ -402,7 +401,7 @@ When migrating Salesforce-flavor metadata, apply these rules in order:
402401

403402
> ⚠️ `OLD.x` and `ISCHANGED(x)` both land on `previous.x`, which is `null` on an
404403
> insert event and **fails the write** there unless guarded by `previous != null
405-
> &&`; on update and delete events it is bound per matched row — see §5.
404+
> &&` (§5).
406405
407406
> ⚠️ **Flow conditions are the exception to row 1.** The engine spreads the
408407
> trigger record's fields, nulls included, to top level wherever no flow variable
@@ -466,7 +465,6 @@ a bare string (auto-wrapped) or their helper, and read the same variable scope.
466465
| `cron` | `` cron`0 6 * * MON` `` | 5- or 6-field cron, or one of `@yearly` `@annually` `@monthly` `@weekly` `@daily` `@hourly` `@reboot` | `Job.schedule.expression` (canonical) |
467466
| `template` | `` tmpl`Hello {{ record.first_name }}` `` | `{{ path }}` or `{{ path \| formatter[:arg] }}` — double braces only, no conditionals; the formatter whitelist is `TEMPLATE_FORMATTERS`, exported from `@objectstack/formula` | `system/email-template` `subject` / `bodyHtml` / `bodyText`, `ai/model-registry` `promptTemplate.system` / `.user`, `Object.titleFormat` (a save and `os validate` refuse it; move it to `nameField`, ADR-0079) |
468467

469-
`shared/expression.zod.ts` declares both surfaces and their carriers.
470468
Missing template paths render as the empty string. Move logic into a CEL field.
471469
A `currency` argument is a
472470
literal code (`currency:EUR`); only an email template may read it from the send's

0 commit comments

Comments
 (0)