Skip to content

Commit 1183e97

Browse files
claude[bot]claude
andauthored
docs(skills): state the formula catalog's real membership rule — the bare-callable public subset (#15519)
`skills/objectstack-formula/SKILL.md` claimed "Only the functions above are callable" and called `CEL_STDLIB_FUNCTIONS` "the canonical list". Both read as a complete registry of what resolves. Measurement says otherwise: receiver-only methods (`s.split(',')`, `list.map(...)`) resolve when called on a value, and four bare primitives (`bytes`, `dyn`, `type`, `uint`) resolve but are withheld from the catalogue by an authoring decision. The correction states the membership rule the engine's own docblock already carries as load-bearing (`packages/formula/src/validate.ts`), and keeps the sentence that was true and useful: an unknown name still fails `os build` with a no-matching-overload type error. The engine is untouched — no edit to `CEL_STDLIB_FUNCTIONS` or `packages/formula/**`, and the four withheld primitives are named as withheld, never added to any list the skill presents as callable. Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox Co-authored-by: Claude <noreply@anthropic.com>
1 parent 53edffe commit 1183e97

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

‎skills/objectstack-formula/SKILL.md‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ in `coalesce(..., '')`.
131131

132132
Registered automatically by `@objectstack/formula`, which ships `dist` only —
133133
there is no `src/` to read in an installed app. Its exported
134-
`CEL_STDLIB_FUNCTIONS` is the canonical list, pinned by two tests: every entry
135-
resolves at runtime, and this table documents them all.
134+
`CEL_STDLIB_FUNCTIONS` is the advertised bare-callable subset, pinned by two
135+
tests: every entry resolves at runtime, and this table documents them all.
136136

137137
**Dates**
138138

@@ -194,10 +194,15 @@ Plus CEL built-ins: `has(x)`, `size(x)`, `int(x)`, `string(x)`, `bool(x)`,
194194
If you need a helper that doesn't exist, prefer adding it to the stdlib
195195
(small, pure, dependency-free) over inlining a complex CEL expression.
196196

197-
> **Only the functions above are callable.** An UNKNOWN function — `PRIOR()`, a
198-
> legacy `ISBLANK()`, a typo'd `isBlnk()` — **fails `os build`** with a
199-
> "no matching overload" type error, rather than silently no-op'ing the
200-
> predicate at run time. Use `previous.x` (not `PRIOR()`), `isBlank()` (not `ISBLANK()`).
197+
> **The list above is `CEL_STDLIB_FUNCTIONS` — the bare-callable public subset:**
198+
> the names you may write as `fn(x)`. Receiver methods (`s.split(',')`,
199+
> `list.map(...)`) are called on a value, never bare, and are not in this table;
200+
> four bare primitives (`bytes`, `dyn`, `type`, `uint`) resolve but are withheld
201+
> from the catalogue by an authoring decision — don't reach for them. An UNKNOWN
202+
> function — `PRIOR()`, a legacy `ISBLANK()`, a typo'd `isBlnk()` — **fails
203+
> `os build`** with a "no matching overload" type error, rather than silently
204+
> no-op'ing the predicate at run time. Use `previous.x` (not `PRIOR()`),
205+
> `isBlank()` (not `ISBLANK()`).
201206
202207
---
203208

0 commit comments

Comments
 (0)