From 26c90e55c29fa19f21d047a7bfa935716fb96eb3 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 25 Aug 2026 08:36:36 +0000 Subject: [PATCH 1/3] docs(skills): teach the flow value-expression function vocabulary in objectstack-automation --- skills/objectstack-automation/SKILL.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/skills/objectstack-automation/SKILL.md b/skills/objectstack-automation/SKILL.md index 0d00cf9cdc..9a0d019da1 100644 --- a/skills/objectstack-automation/SKILL.md +++ b/skills/objectstack-automation/SKILL.md @@ -839,11 +839,22 @@ them right the first time: - `{var}` / `{record.title}` — variable / record field - `{record.tags.0}` — **array index** (e.g. a `multiple: true` lookup, stored as an array) - `{$User.Id}` / `{NOW()}` / `{TODAY() + 30}` — current user / date macros + - `{round(x)}` `{floor(x)}` `{ceil(x)}` `{abs(x)}` `{min(a, b)}` `{max(a, b)}` + — the numeric six, mirrored **1:1 from the CEL stdlib**: same names and + same semantics as in a condition. `round` is **integer-only** (there is no + `round(x, 2)`); for N decimals write the CEL idiom `{round(x * 100) / 100}` + — also how you land a computed value on a `scale: 2` field. - anything without `{…}` is a **literal** ❌ `body: '{{ai_reply}}'` — double-brace is the *formula / template-field* dialect, **not** flow values ❌ `ticket: '$source.id'` — a bare `$ref` is a literal string, not interpolated ✅ `body: '{ai_reply}'`, `ticket: '{source.id}'` + ❌ `total: '{ROUND(x, 2)}'` / `'{Math.round(x)}'` / `'{(x).toFixed(2)}'` — any + other name in call position **fails the node** with a named error listing the + supported set (and, when one is close, the spelling you meant). Unlike a + condition's unknown function, this is **not** caught by the build: it fires at + run time, and a `fault` edge does **not** catch it — the expression itself is + wrong, so re-running can never succeed. 7. **`create_record`'s `outputVariable` holds the created RECORD, not its id.** Reference a field explicitly. From 3da41ede1517edb3562bf135f6a4045a0e10405a Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 25 Aug 2026 08:39:26 +0000 Subject: [PATCH 2/3] compress the value-expression function teaching to minimize published-catalog cost --- skills/objectstack-automation/SKILL.md | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/skills/objectstack-automation/SKILL.md b/skills/objectstack-automation/SKILL.md index 9a0d019da1..7979b4eb04 100644 --- a/skills/objectstack-automation/SKILL.md +++ b/skills/objectstack-automation/SKILL.md @@ -839,22 +839,18 @@ them right the first time: - `{var}` / `{record.title}` — variable / record field - `{record.tags.0}` — **array index** (e.g. a `multiple: true` lookup, stored as an array) - `{$User.Id}` / `{NOW()}` / `{TODAY() + 30}` — current user / date macros - - `{round(x)}` `{floor(x)}` `{ceil(x)}` `{abs(x)}` `{min(a, b)}` `{max(a, b)}` - — the numeric six, mirrored **1:1 from the CEL stdlib**: same names and - same semantics as in a condition. `round` is **integer-only** (there is no - `round(x, 2)`); for N decimals write the CEL idiom `{round(x * 100) / 100}` - — also how you land a computed value on a `scale: 2` field. + - `{round(x)}` `{floor(x)}` `{ceil(x)}` `{abs(x)}` `{min(a,b)}` `{max(a,b)}` — + mirror the CEL stdlib 1:1. `round` is **integer-only** (no `round(x, 2)`); + for N decimals write `{round(x * 100) / 100}` (scale 2) - anything without `{…}` is a **literal** ❌ `body: '{{ai_reply}}'` — double-brace is the *formula / template-field* dialect, **not** flow values ❌ `ticket: '$source.id'` — a bare `$ref` is a literal string, not interpolated ✅ `body: '{ai_reply}'`, `ticket: '{source.id}'` - ❌ `total: '{ROUND(x, 2)}'` / `'{Math.round(x)}'` / `'{(x).toFixed(2)}'` — any - other name in call position **fails the node** with a named error listing the - supported set (and, when one is close, the spelling you meant). Unlike a - condition's unknown function, this is **not** caught by the build: it fires at - run time, and a `fault` edge does **not** catch it — the expression itself is - wrong, so re-running can never succeed. + ❌ `'{ROUND(x, 2)}'` / `'{Math.round(x)}'` / `'{(x).toFixed(2)}'` — any other + name in call position **fails the node** with a named error naming the + supported set. The build does **not** catch these (conditions are checked, + value expressions are not) and a `fault` edge cannot route it. 7. **`create_record`'s `outputVariable` holds the created RECORD, not its id.** Reference a field explicitly. From 9ca33534e6fc58a762757a4a33b66bf8e0c6a3f5 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 25 Aug 2026 12:09:03 +0000 Subject: [PATCH 3/3] raise the automation skill token ceiling 12511 -> 12643 under the #11348 ruling The flow value-expression function vocabulary (round/floor/ceil/abs/min/max) fails at runtime, not at flow-save, so the published teaching is the only guard. Maintainer ruling 2026-08-25 accepted option B1 (raise the ceiling); the ruling is quoted verbatim beside the raised entry. --- scripts/check-skills-token-ratchet.mjs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/check-skills-token-ratchet.mjs b/scripts/check-skills-token-ratchet.mjs index 23d1d47c0a..187be7f406 100644 --- a/scripts/check-skills-token-ratchet.mjs +++ b/scripts/check-skills-token-ratchet.mjs @@ -166,7 +166,13 @@ export const CEILINGS = new Map([ // CEILING_BASIS.strippedInternalIds. `(was N)` is the ceiling this replaced. ['skills/objectstack-ai/SKILL.md', 6806], // -18 (was 6824) ['skills/objectstack-api/SKILL.md', 6331], // -11 (was 6342) - ['skills/objectstack-automation/SKILL.md', 12511], // -32 (was 12543) + // 12511 -> 12643 (#11348): the flow value-expression section documented the + // expression surface but not the function vocabulary (round/floor/ceil/abs/ + // min/max); an unknown function fails at RUNTIME, not at flow-save, so the + // published teaching is the only guard. +132 tokens, compressed to minimum. + // Maintainer ruling 2026-08-25 (option B1, raise the ceiling), verbatim and + // untranslated: 「我看到了,你分析过了,接受你的建议」. + ['skills/objectstack-automation/SKILL.md', 12643], ['skills/objectstack-data/SKILL.md', 13783], // -34 (was 13817) ['skills/objectstack-formula/SKILL.md', 6002], // -53 (was 6055) ['skills/objectstack-i18n/SKILL.md', 6338], // -11 (was 6349)