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..7281ad429ba --- /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 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 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`. + +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 ec8d5e6aae4..d35ac30d680 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 53ab5ad1006..b5c33feb781 100644 --- a/skills/objectstack-automation/SKILL.md +++ b/skills/objectstack-automation/SKILL.md @@ -69,9 +69,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 +80,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 +94,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 +131,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 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