From adfe3a48fea83b598e20bb095f5e547d0824a27f Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 4 Sep 2026 19:23:01 +0000 Subject: [PATCH] =?UTF-8?q?docs(skills):=20state=20the=20formula=20catalog?= =?UTF-8?q?'s=20real=20membership=20rule=20=E2=80=94=20the=20bare-callable?= =?UTF-8?q?=20public=20subset?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `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. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox --- skills/objectstack-formula/SKILL.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/skills/objectstack-formula/SKILL.md b/skills/objectstack-formula/SKILL.md index f5df2d3c43..f233ebe4fa 100644 --- a/skills/objectstack-formula/SKILL.md +++ b/skills/objectstack-formula/SKILL.md @@ -131,8 +131,8 @@ in `coalesce(..., '')`. Registered automatically by `@objectstack/formula`, which ships `dist` only — there is no `src/` to read in an installed app. Its exported -`CEL_STDLIB_FUNCTIONS` is the canonical list, pinned by two tests: every entry -resolves at runtime, and this table documents them all. +`CEL_STDLIB_FUNCTIONS` is the advertised bare-callable subset, pinned by two +tests: every entry resolves at runtime, and this table documents them all. **Dates** @@ -194,10 +194,15 @@ Plus CEL built-ins: `has(x)`, `size(x)`, `int(x)`, `string(x)`, `bool(x)`, If you need a helper that doesn't exist, prefer adding it to the stdlib (small, pure, dependency-free) over inlining a complex CEL expression. -> **Only the functions above are callable.** An UNKNOWN function — `PRIOR()`, a -> legacy `ISBLANK()`, a typo'd `isBlnk()` — **fails `os build`** with a -> "no matching overload" type error, rather than silently no-op'ing the -> predicate at run time. Use `previous.x` (not `PRIOR()`), `isBlank()` (not `ISBLANK()`). +> **The list above is `CEL_STDLIB_FUNCTIONS` — the bare-callable public subset:** +> the names you may write as `fn(x)`. Receiver methods (`s.split(',')`, +> `list.map(...)`) are called on a value, never bare, and are not in this table; +> four bare primitives (`bytes`, `dyn`, `type`, `uint`) resolve but are withheld +> from the catalogue by an authoring decision — don't reach for them. An UNKNOWN +> function — `PRIOR()`, a legacy `ISBLANK()`, a typo'd `isBlnk()` — **fails +> `os build`** with a "no matching overload" type error, rather than silently +> no-op'ing the predicate at run time. Use `previous.x` (not `PRIOR()`), +> `isBlank()` (not `ISBLANK()`). ---