From e9222c66071a8728de1e84993ea7c0a15f4d6a88 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 1 Dec 2026 15:00:12 +0000 Subject: [PATCH 1/2] docs(skills): the objectstack-automation entry carries a save notice's translation key and names the gate that judges a grant made from a flow The save_notice row says where its message is translated (flows.{flow}.notices.{node_id}.message, in the saver's locale). The identity-elevation bullet names the delegated-administration gate, the user it judges and granted_by, and limits the runAs: 'user' route to a position or a permission set. Paid for in the same file by three restatements; the file goes from 10703 to 10702 bytes and its ratchet row stays at 2669. Claude-Session: https://claude.ai/code/session_01WGufzeatqKfTRUzTJVa9jQ Co-authored-by: Claude --- ...40-automation-notice-key-elevation-gate.md | 19 +++++++++++++++++++ skills/objectstack-automation/SKILL.md | 15 +++++++-------- 2 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 .changeset/38940-automation-notice-key-elevation-gate.md diff --git a/.changeset/38940-automation-notice-key-elevation-gate.md b/.changeset/38940-automation-notice-key-elevation-gate.md new file mode 100644 index 00000000000..1fc701d9568 --- /dev/null +++ b/.changeset/38940-automation-notice-key-elevation-gate.md @@ -0,0 +1,19 @@ +--- +'@objectstack/skills': patch +--- + +docs(skills): the objectstack-automation entry carries a save notice's translation key and names the gate that judges a grant made from a flow + +Clause-②: no +Metadata-protocol: none + +Two facts the entry file pointed at and did not carry. Text only: no schema, rule or runtime behaviour changes here. + +`skills/objectstack-automation/SKILL.md`: + +- The `save_notice` row of the node table says where its message is translated: under `flows.{flow}.notices.{node_id}.message`, read in the locale of the person who saved. Before, the key stood only in objectstack-data `rules/lifecycle.md` § Save Notice, so a builder who loaded the automation skill alone shipped the notice in one language. +- The identity-elevation bullet of § Failure routing & `runAs` says who decides a grant made from a `runAs: 'user'` flow: the delegated-administration gate judges it as the user whose write fired the flow (past an approval, the decider) and records that user as the grant's `granted_by`, or refuses it. A grant refused there is the rule at work, not a defect. The bullet now limits that route to a position or a permission set, the two the gate governs. It used to read as the route for all four identity objects; an invitation or a membership changes through the organization endpoints, as `references/examples-flows.md` says. + +The file does not grow (10703 bytes to 10702). The new text is paid for inside the file by three restatements: the routing table's "Routing a new record to a queue or a person" row (§ Assignment rules now stands in the entry under those words, and the table's first row sends the rest of each section to `references/examples-flows.md`), the pointer under `### Flow Node Types` (the same first row names control-flow nodes and that file), and the `notify` section's "TypeScript: the same literal" aside (§ Flows says a JSON block is the `defineFlow` literal). The `save_notice` row also says "this save" where it said "this create/update" beside "record create/update trigger". + +Two links left the entry with those lines: `references/examples-flows.md#assignment-rules` and `#flow-node-types`. Both headings are still in that file, which the routing table links whole. diff --git a/skills/objectstack-automation/SKILL.md b/skills/objectstack-automation/SKILL.md index 53ab5ad1006..e4970e446f6 100644 --- a/skills/objectstack-automation/SKILL.md +++ b/skills/objectstack-automation/SKILL.md @@ -45,7 +45,6 @@ Open the file for what you are writing before you write it. |:--|:--| | Each flow type's use, control-flow nodes, an installed package's flow, and the rest of each section below | [examples-flows.md](./references/examples-flows.md) | | Triggers (record change, schedule, date sweep, inbound webhook), `requires` capabilities | [Triggers](./references/examples-flows.md#triggers--event-driven-automation) | -| Routing a new record to a queue or a person | [Assignment rules](./references/examples-flows.md#assignment-rules) | | An approval, a send-back, an escalation, a state machine | [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` | | A vendor integration or callback | [integration-recipes.md](./references/integration-recipes.md) | @@ -69,9 +68,7 @@ lists `automation` and `triggers`. ### Flow Node Types -Control flow and every node's `config`: -[Flow Node Types](./references/examples-flows.md#flow-node-types). A human -sign-off is an `approval` node (`type: 'approval'`). +A human sign-off is an `approval` node (`type: 'approval'`). #### Data Operations @@ -82,7 +79,7 @@ sign-off is an `approval` node (`type: 'approval'`). | `update_record` | Modify records | | `delete_record` | Remove records | | `get_record` | Fetch records by filter (**no `query_record`**) | -| `save_notice` | Tell the saver what this create/update started — record create/update trigger only, not after a pause: **objectstack-data** `rules/lifecycle.md` § Save Notice | +| `save_notice` | Tell the saver what this save started — record create/update trigger only, not after a pause; translated under `flows.{flow}.notices.{node_id}.message` in the saver's locale: **objectstack-data** `rules/lifecycle.md` § Save Notice | #### External Integration @@ -96,7 +93,7 @@ sign-off is an `approval` node (`type: 'approval'`). ### `notify` -As JSON (TypeScript: the same literal, a `FlowNode`): +As JSON: ```json { "id": "tell_owner", "type": "notify", "label": "Notify Owner", "config": { @@ -133,8 +130,10 @@ fan-out. node. - **Elevation stops at identity assignment**: a `runAs: 'system'` write of `sys_user_position`, `sys_user_permission_set`, `sys_invitation` or - `sys_member` is refused `PERMISSION_DENIED`: grant from a `runAs: 'user'` - flow. + `sys_member` is refused `PERMISSION_DENIED`. Grant a position or permission + set from a `runAs: 'user'` flow: the delegated-administration gate judges it + as the user whose write fired the flow (past an approval, the decider) and + records them as `granted_by`, or refuses it. - **A `runAs: 'system'` sweep must pin its organization**, or it reads and writes across every tenant. - **Who may START a flow: `requiredPermissions: ['…']` on the flow.** Gate an From 385c9745e6725d3ddbc98a958292ad6e184cd2f1 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 1 Dec 2026 16:14:28 +0000 Subject: [PATCH 2/2] docs(skills): the automation entry keeps its route to the assignment-rules reference; the grant is judged as the user the run acts for The routing table's "Routing a new record to a queue or a person" row is back: it is the entry's one task-keyed route to the reference's assignment-rules section, not a restatement. The elevation bullet uses the code's phrase, "the user the run acts for". The entry is now 10810 bytes (10783 priced, 2696 tokens); its ratchet row moves 2669 -> 2696, the measured remainder after the two restatement cuts, under the standing raise ruling (record 6513306068, letter B). The changeset follows. Claude-Session: https://claude.ai/code/session_01WGufzeatqKfTRUzTJVa9jQ Co-authored-by: Claude --- ...40-automation-notice-key-elevation-gate.md | 6 +++--- scripts/check-skills-token-ratchet.mjs | 20 ++++++++++++++++++- skills/objectstack-automation/SKILL.md | 5 +++-- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/.changeset/38940-automation-notice-key-elevation-gate.md b/.changeset/38940-automation-notice-key-elevation-gate.md index 1fc701d9568..7281ad429ba 100644 --- a/.changeset/38940-automation-notice-key-elevation-gate.md +++ b/.changeset/38940-automation-notice-key-elevation-gate.md @@ -12,8 +12,8 @@ Two facts the entry file pointed at and did not carry. Text only: no schema, rul `skills/objectstack-automation/SKILL.md`: - The `save_notice` row of the node table says where its message is translated: under `flows.{flow}.notices.{node_id}.message`, read in the locale of the person who saved. Before, the key stood only in objectstack-data `rules/lifecycle.md` § Save Notice, so a builder who loaded the automation skill alone shipped the notice in one language. -- The identity-elevation bullet of § Failure routing & `runAs` says who decides a grant made from a `runAs: 'user'` flow: the delegated-administration gate judges it as the user whose write fired the flow (past an approval, the decider) and records that user as the grant's `granted_by`, or refuses it. A grant refused there is the rule at work, not a defect. The bullet now limits that route to a position or a permission set, the two the gate governs. It used to read as the route for all four identity objects; an invitation or a membership changes through the organization endpoints, as `references/examples-flows.md` says. +- The identity-elevation bullet of § Failure routing & `runAs` says who decides a grant made from a `runAs: 'user'` flow: the delegated-administration gate judges it as the user the run acts for (past an approval, the decider) and records that user as the grant's `granted_by`, or refuses it. A grant refused there is the rule at work, not a defect. The bullet now limits that route to a position or a permission set, the two the gate judges for a delegate and stamps with `granted_by`. It used to read as the route for all four identity objects; an invitation or a membership changes through the organization endpoints, as `references/examples-flows.md` says. -The file does not grow (10703 bytes to 10702). The new text is paid for inside the file by three restatements: the routing table's "Routing a new record to a queue or a person" row (§ Assignment rules now stands in the entry under those words, and the table's first row sends the rest of each section to `references/examples-flows.md`), the pointer under `### Flow Node Types` (the same first row names control-flow nodes and that file), and the `notify` section's "TypeScript: the same literal" aside (§ Flows says a JSON block is the `defineFlow` literal). The `save_notice` row also says "this save" where it said "this create/update" beside "record create/update trigger". +The file grows by 107 bytes (10703 to 10810). Part of the new text is paid for inside the file by cutting what the entry said twice: the pointer under `### Flow Node Types` (the routing table's first row names control-flow nodes and the same file), the `notify` section's "TypeScript: the same literal" aside (§ Flows says a JSON block is the `defineFlow` literal), and "create/update" beside "record create/update trigger" in the `save_notice` row, which now says "this save". The routing table is unchanged; its "Routing a new record to a queue or a person" row is still the route to § Assignment rules of `references/examples-flows.md`. -Two links left the entry with those lines: `references/examples-flows.md#assignment-rules` and `#flow-node-types`. Both headings are still in that file, which the routing table links whole. +One link left the entry with the cut pointer: `references/examples-flows.md#flow-node-types`. The heading is still in that file, which the routing table links whole. diff --git a/scripts/check-skills-token-ratchet.mjs b/scripts/check-skills-token-ratchet.mjs index 2d96caafde5..9c816b949a1 100644 --- a/scripts/check-skills-token-ratchet.mjs +++ b/scripts/check-skills-token-ratchet.mjs @@ -940,7 +940,25 @@ export const CEILINGS = new Map([ // this tree) -> 2669 tokens; the row follows the measurement down, inside the 2670 that ruling // record 7168461386 authorises and ruling record 7176941587 keeps. // ceil(($(wc -c < skills/objectstack-automation/SKILL.md) - 27) / 4) == ceil(10676 / 4) - ['skills/objectstack-automation/SKILL.md', 2669], + // 2669 -> 2696 (the `save_notice` row's translation key, and the gate that judges a grant made + // from a flow): RAISED. Raise path: the standing ruling 「A:先削重复,余额按实测提高」 (ruling + // record 6513306068, letter B). The `save_notice` row of `#### Data Operations` gains + // `flows.{flow}.notices.{node_id}.message`, read in the saver's locale; the identity-elevation + // bullet of `### Failure routing & runAs` gains the delegated-administration gate, the user it + // judges and `granted_by`, and sends only a position or a permission set to a `runAs: 'user'` + // flow. PAID DOWN FIRST, each cut keeping its other home: the pointer sentence under `### Flow + // Node Types` (the routing table's first row names control-flow nodes and the same file), the + // `notify` section's "TypeScript: the same literal" aside (§ Flows: "a JSON block is that + // literal"), and "create/update" said twice in the `save_notice` row. NOT a cut: the routing + // table's "Routing a new record to a queue or a person" row, the entry's one task-keyed route + // to § Assignment rules of `references/examples-flows.md`; and the state-introspection route + // stays for the reason the block above gives. Arithmetic in priced bytes (stamp line + // excluded), against `main`'s 10676 (headroom 0): the row +72 and the bullet +187, the cuts + // -107 and -45, net +107 -> 10783 -> 2696 tokens. The row moves +27, the measured remainder, + // pinned AT the measurement. The entry is over the 2670 of ruling record 7168461386 by this + // raise and by no more than it. + // ceil(($(wc -c < skills/objectstack-automation/SKILL.md) - 27) / 4) == ceil(10783 / 4) + ['skills/objectstack-automation/SKILL.md', 2696], // 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 e4970e446f6..b5c33feb781 100644 --- a/skills/objectstack-automation/SKILL.md +++ b/skills/objectstack-automation/SKILL.md @@ -45,6 +45,7 @@ Open the file for what you are writing before you write it. |:--|:--| | Each flow type's use, control-flow nodes, an installed package's flow, and the rest of each section below | [examples-flows.md](./references/examples-flows.md) | | Triggers (record change, schedule, date sweep, inbound webhook), `requires` capabilities | [Triggers](./references/examples-flows.md#triggers--event-driven-automation) | +| Routing a new record to a queue or a person | [Assignment rules](./references/examples-flows.md#assignment-rules) | | An approval, a send-back, an escalation, a state machine | [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` | | A vendor integration or callback | [integration-recipes.md](./references/integration-recipes.md) | @@ -132,8 +133,8 @@ fan-out. `sys_user_position`, `sys_user_permission_set`, `sys_invitation` or `sys_member` is refused `PERMISSION_DENIED`. Grant a position or permission set from a `runAs: 'user'` flow: the delegated-administration gate judges it - as the user whose write fired the flow (past an approval, the decider) and - records them as `granted_by`, or refuses it. + as the user the run acts for (past an approval, the decider) and records + them as `granted_by`, or refuses it. - **A `runAs: 'system'` sweep must pin its organization**, or it reads and writes across every tenant. - **Who may START a flow: `requiredPermissions: ['…']` on the flow.** Gate an