From ec0711a220f93f273185d1d9502a8d2fe3c8a6cc Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 22:36:36 +0000 Subject: [PATCH 1/2] docs(skills): teach the record write's text envelope and its organization-language key Claude-Session: https://claude.ai/code/session_01ADHkmQ4vgatNKAwYizZLG3 Co-authored-by: Claude --- .changeset/34434-skills-flow-record-text.md | 14 ++++++++++++ scripts/check-skills-token-ratchet.mjs | 24 ++++++++++++++++++++- skills/objectstack-automation/SKILL.md | 14 ++++++------ skills/objectstack-i18n/SKILL.md | 9 +++++--- 4 files changed, 51 insertions(+), 10 deletions(-) create mode 100644 .changeset/34434-skills-flow-record-text.md diff --git a/.changeset/34434-skills-flow-record-text.md b/.changeset/34434-skills-flow-record-text.md new file mode 100644 index 00000000000..7195ccb5d0b --- /dev/null +++ b/.changeset/34434-skills-flow-record-text.md @@ -0,0 +1,14 @@ +--- +'@objectstack/skills': patch +--- + +docs(skills): teach a flow record write's text envelope and its organization-language key + +Clause-②: no +Metadata-protocol: none + +`objectstack-automation` now says that a `create_record` / `update_record` `fields` value takes a third form beside the literal and the CEL envelope: the text envelope `{ dialect: 'template', source }`, for a sentence people read. Its `source` is a text slot, it is written in the organization's language (the Localization setting when somebody set it, else the app's `i18n.defaultLocale`), never in the language of the person who started the run, a missing translation writes the authored text, and a Localization setting that cannot be read fails the node. A bare string stays a literal and is never translated. + +`objectstack-i18n` names the key that translation lives at, `flows.FLOW.records.NODE_ID.fields.FIELD`, beside the other keys that sit deeper than their group's `label`, and says `os i18n extract --no-objects-only` scaffolds it. + +To pay for the text, `objectstack-automation` drops four sentences that are said elsewhere: the CEL callout's pointer to `objectstack-formula` (the skill's description already says to load it), the state-introspection route after the State Machines pointer (the reference page lists it), the Trigger Configuration lead-in listing a flow's top-level keys (the examples reference shows whole flows), and the pure-function row of the `functions` example (the same item says a flow function is a pure compute step). diff --git a/scripts/check-skills-token-ratchet.mjs b/scripts/check-skills-token-ratchet.mjs index 5914db2d453..7cd6badca4b 100644 --- a/scripts/check-skills-token-ratchet.mjs +++ b/scripts/check-skills-token-ratchet.mjs @@ -612,7 +612,29 @@ export const CEILINGS = new Map([ // status to a flow door: +37 bytes, no further restatement left to cut). // Pinned AT the measurement. // ceil(($(wc -c < skills/objectstack-automation/SKILL.md) - 20) / 4) == ceil(27443 / 4) - ['skills/objectstack-automation/SKILL.md', 6861], + // 6861 -> 6880 (2026-11-16, card #34434, the skills follow-up of #34062): + // silently-wrong item 1 teaches the third `create_record` / `update_record` + // `fields` form, the text envelope `{ dialect: 'template', source }`: written + // in the organization's language (Localization setting, else the app's + // `i18n.defaultLocale`), never the run starter's; untranslated, the authored + // text; an unreadable setting fails the node; a bare string stays a literal. + // Raise path the standing ruling 「A:先削重复,余额按实测提高」 (ruling record + // 6513306068, letter B). PAID DOWN FIRST — four restatements cut, each keeping + // its other home: the CEL callout's "Contract, stdlib, legacy → CEL table: + // objectstack-formula" (the frontmatter description's "load + // objectstack-formula alongside"); the state-introspection route after the + // State Machines pointer (references/state-machines-and-approvals.md + // § Introspection); the Trigger Configuration lead-in naming the flow's + // `label` / `type` / `nodes` / `edges` (references/examples-flows.md's whole + // flows); item 3's `// pure — the default` function row (the same item's "A + // flow `function` is a PURE compute step"). Arithmetic in priced bytes (stamp + // line excluded), against `main`'s 27431 (headroom 3): the diff's added lines + // carry 565 bytes and its removed lines 479 (a trimmed line counted on both + // sides), net +86, so the LANDED priced text is 27517 bytes -> + // ceil(27517 / 4) = 6880; the ceiling moves +19, the measured remainder only. + // Pinned AT the measurement. + // ceil(($(wc -c < skills/objectstack-automation/SKILL.md) - 20) / 4) == ceil(27517 / 4) + ['skills/objectstack-automation/SKILL.md', 6880], // 13783 -> 13892 (2026-08-31 app-repo-principles raise, see the block above). // The invariant-vs-transition-gate choice, placed in the field-conditional-rule // bullet list where the tool is actually picked. Both wrong picks are silent: diff --git a/skills/objectstack-automation/SKILL.md b/skills/objectstack-automation/SKILL.md index 5e3d9490eb6..373efe60209 100644 --- a/skills/objectstack-automation/SKILL.md +++ b/skills/objectstack-automation/SKILL.md @@ -27,7 +27,7 @@ Also vendor-integration callbacks and **assignment rules**. > **Predicates and conditions are CEL** — every `condition` / `guard` / > `entryCondition` / filter `value` is an **Expression** envelope: a plain CEL > string, or the `P\`...\`` / `cel\`...\`` tag (author-time validation); pick one -> per file. Contract, stdlib, legacy → CEL table: **objectstack-formula**. +> per file. --- @@ -251,6 +251,12 @@ Most are caught by `objectstack build`: is refused with its `{{ }}` spelling. A date or the run user has no hole: assign it first (`assignments: { v: { dialect: 'cel', source: 'current_user.id' } }`), then write `{{ v }}`. + `create_record` / `update_record` `fields` also take a text slot, marked + `{ dialect: 'template', source }`, for a sentence people read. It is written + in the organization's language (Localization setting if set, else + `i18n.defaultLocale`; key: **objectstack-i18n**), never the run starter's; + untranslated, the authored text; an unreadable setting fails the node. A + bare string stays a literal, never translated. 2. **`create_record`'s `outputVariable` holds the created RECORD, not its id.** ❌ `fields: { ref: { dialect: 'cel', source: 'newRec' } }` @@ -294,7 +300,6 @@ Most are caught by `objectstack build`: ```ts defineStack({ functions: { - 'helpdesk.aiTriageStub': (ctx) => ({ ai_category: 'other' }), // pure — the default 'billing.sync': { handler: syncBilling, effect: 'writes' }, } }); ``` @@ -307,7 +312,7 @@ Most are caught by `objectstack build`: --- -→ State Machines & Approvals: [references/state-machines-and-approvals.md](./references/state-machines-and-approvals.md) — its state-introspection route is `GET /api/v1/meta/object/:name/state/:field?from=:state`. +→ State Machines & Approvals: [references/state-machines-and-approvals.md](./references/state-machines-and-approvals.md). --- @@ -406,9 +411,6 @@ the **start node `config`**: ### Trigger Configuration — on the `start` node -A flow around it also owns `label`, `type`, `nodes` and the `edges` -`FlowSchema` requires: - ```typescript { id: 'start', diff --git a/skills/objectstack-i18n/SKILL.md b/skills/objectstack-i18n/SKILL.md index 704e985165d..351380d4493 100644 --- a/skills/objectstack-i18n/SKILL.md +++ b/skills/objectstack-i18n/SKILL.md @@ -183,11 +183,14 @@ book once carried stays retired), `metadataForms`, `settingsCommon`; `reports`, `datasets.{dataset}.{dimensions,measures}.{member}` (a member's `synonyms` have no key: one authored list carries every language), and a joined report's block headings sit at `reports.{report}.blocks.{block_name}.{label,description}`, keyed by the block's required `name`. -Two keys sit deeper than their group's `label`: a `page:tabs` item at +Three keys sit deeper than their group's `label`: a `page:tabs` item at `pages.{page}.components.{tabs_id}.items.{value}.label` (by the item's `value`; an item without -one has no key) and an approval step at `flows.{flow}.approvals.{node_id}.label`. +one has no key), an approval step at `flows.{flow}.approvals.{node_id}.label`, and the text a +`create_record` / `update_record` writes into a field marked `{ dialect: 'template', source }` at +`flows.{flow}.records.{node_id}.fields.{field}`, picked in the organization's language (the +Localization setting if set, else `i18n.defaultLocale`; never the run starter's). `os i18n extract --no-objects-only` scaffolds every group above but `messages` and -`settingsCommon`, both keys included. The `inlineTitle` and report-block keys, as the +`settingsCommon`, all three keys included. The `inlineTitle` and report-block keys, as the shipped `app-crm` and `app-showcase` bundles spell them for `zh-CN`: ```typescript From 0085ff5a84825294524e14d9b558250353c69981 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 23:24:40 +0000 Subject: [PATCH 2/2] docs(skills): keep the state-introspection route the REST doc-spelling test pins Claude-Session: https://claude.ai/code/session_01ADHkmQ4vgatNKAwYizZLG3 Co-authored-by: Claude --- .changeset/34434-skills-flow-record-text.md | 2 +- scripts/check-skills-token-ratchet.mjs | 30 ++++++++++----------- skills/objectstack-automation/SKILL.md | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.changeset/34434-skills-flow-record-text.md b/.changeset/34434-skills-flow-record-text.md index 7195ccb5d0b..9a4399afaea 100644 --- a/.changeset/34434-skills-flow-record-text.md +++ b/.changeset/34434-skills-flow-record-text.md @@ -11,4 +11,4 @@ Metadata-protocol: none `objectstack-i18n` names the key that translation lives at, `flows.FLOW.records.NODE_ID.fields.FIELD`, beside the other keys that sit deeper than their group's `label`, and says `os i18n extract --no-objects-only` scaffolds it. -To pay for the text, `objectstack-automation` drops four sentences that are said elsewhere: the CEL callout's pointer to `objectstack-formula` (the skill's description already says to load it), the state-introspection route after the State Machines pointer (the reference page lists it), the Trigger Configuration lead-in listing a flow's top-level keys (the examples reference shows whole flows), and the pure-function row of the `functions` example (the same item says a flow function is a pure compute step). +To pay for the text, `objectstack-automation` drops three sentences that are said elsewhere: the CEL callout's pointer to `objectstack-formula` (the skill's description already says to load it), the Trigger Configuration lead-in listing a flow's top-level keys (the examples reference shows whole flows), and the pure-function row of the `functions` example (the same item says a flow function is a pure compute step). diff --git a/scripts/check-skills-token-ratchet.mjs b/scripts/check-skills-token-ratchet.mjs index 7cd6badca4b..6df337bc6f1 100644 --- a/scripts/check-skills-token-ratchet.mjs +++ b/scripts/check-skills-token-ratchet.mjs @@ -612,29 +612,29 @@ export const CEILINGS = new Map([ // status to a flow door: +37 bytes, no further restatement left to cut). // Pinned AT the measurement. // ceil(($(wc -c < skills/objectstack-automation/SKILL.md) - 20) / 4) == ceil(27443 / 4) - // 6861 -> 6880 (2026-11-16, card #34434, the skills follow-up of #34062): + // 6861 -> 6903 (2026-11-16, card #34434, the skills follow-up of #34062): // silently-wrong item 1 teaches the third `create_record` / `update_record` // `fields` form, the text envelope `{ dialect: 'template', source }`: written // in the organization's language (Localization setting, else the app's // `i18n.defaultLocale`), never the run starter's; untranslated, the authored // text; an unreadable setting fails the node; a bare string stays a literal. // Raise path the standing ruling 「A:先削重复,余额按实测提高」 (ruling record - // 6513306068, letter B). PAID DOWN FIRST — four restatements cut, each keeping + // 6513306068, letter B). PAID DOWN FIRST — three restatements cut, each keeping // its other home: the CEL callout's "Contract, stdlib, legacy → CEL table: // objectstack-formula" (the frontmatter description's "load - // objectstack-formula alongside"); the state-introspection route after the - // State Machines pointer (references/state-machines-and-approvals.md - // § Introspection); the Trigger Configuration lead-in naming the flow's - // `label` / `type` / `nodes` / `edges` (references/examples-flows.md's whole - // flows); item 3's `// pure — the default` function row (the same item's "A - // flow `function` is a PURE compute step"). Arithmetic in priced bytes (stamp - // line excluded), against `main`'s 27431 (headroom 3): the diff's added lines - // carry 565 bytes and its removed lines 479 (a trimmed line counted on both - // sides), net +86, so the LANDED priced text is 27517 bytes -> - // ceil(27517 / 4) = 6880; the ceiling moves +19, the measured remainder only. - // Pinned AT the measurement. - // ceil(($(wc -c < skills/objectstack-automation/SKILL.md) - 20) / 4) == ceil(27517 / 4) - ['skills/objectstack-automation/SKILL.md', 6880], + // objectstack-formula alongside"); the Trigger Configuration lead-in naming + // the flow's `label` / `type` / `nodes` / `edges` (references/examples-flows.md's + // whole flows); item 3's `// pure — the default` function row (the same item's + // "A flow `function` is a PURE compute step"). The state-introspection route + // after the State Machines pointer is NOT a cut: packages/rest's + // meta-state-route-doc-spelling test pins this file as one of its teaching + // sites. Arithmetic in priced bytes (stamp line excluded), against `main`'s + // 27431 (headroom 3): the diff's added lines carry 441 bytes and its removed + // lines 261 (a trimmed line counted on both sides), net +180, so the LANDED + // priced text is 27611 bytes -> ceil(27611 / 4) = 6903; the ceiling moves +42, + // the measured remainder only. Pinned AT the measurement. + // ceil(($(wc -c < skills/objectstack-automation/SKILL.md) - 20) / 4) == ceil(27611 / 4) + ['skills/objectstack-automation/SKILL.md', 6903], // 13783 -> 13892 (2026-08-31 app-repo-principles raise, see the block above). // The invariant-vs-transition-gate choice, placed in the field-conditional-rule // bullet list where the tool is actually picked. Both wrong picks are silent: diff --git a/skills/objectstack-automation/SKILL.md b/skills/objectstack-automation/SKILL.md index 373efe60209..8144f0f9378 100644 --- a/skills/objectstack-automation/SKILL.md +++ b/skills/objectstack-automation/SKILL.md @@ -312,7 +312,7 @@ Most are caught by `objectstack build`: --- -→ State Machines & Approvals: [references/state-machines-and-approvals.md](./references/state-machines-and-approvals.md). +→ State Machines & Approvals: [references/state-machines-and-approvals.md](./references/state-machines-and-approvals.md) — its state-introspection route is `GET /api/v1/meta/object/:name/state/:field?from=:state`. ---