Skip to content

Commit af46d3b

Browse files
committed
docs(skills): pitfall 2 names Modify All as a field-permission grant and asks for requiredPermissions on the gated action
readonly: true is the arm that binds every non-system caller; a field permission without editable binds only a caller no held set grants it, and Modify All grants it. The elevated body skips the caller's edit right, so the gated action declares requiredPermissions. Paid down in the same file: pitfall 1's retired-tool sentence (taught under Tool metadata) and the duplicated agents-are-internal lead. Claude-Session: https://claude.ai/code/session_01Utp6CazXu8zyYD5PC6J2u7 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 7611288 commit af46d3b

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎.changeset/35068-gated-action-field-lock.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ docs(skills): objectstack-ai teaches that an AI-gated action guards its own door
77
Clause-②: no
88
Metadata-protocol: none
99

10-
objectstack-ai's Common Pitfalls gains "Gating the action, not the state". `ai.requiresConfirmation` guards the action's door, and an agent can still write the same field with `update_record` or any data write. An irreversible transition is a gated `script` action, whose body writes elevated, over a field a non-system write cannot set: `readonly: true` (the value is stripped) or field permissions that leave the caller no `editable` on it (refused `403`). A declarative `operation: 'update'` action and a `flow` action under `runAs: 'user'` write as the caller, so the lock stops them too. `readonlyWhen` and a `state_machine` rule bind the elevated body as well, so neither is the door; a `state_machine` dead-end still makes the reached state final for every writer. objectstack-automation's `references/state-machines-and-approvals.md` points to it.
10+
objectstack-ai's Common Pitfalls gains "Gating the action, not the state". `ai.requiresConfirmation` guards the action's door, and an agent can still write the same field with `update_record` or any data write. An irreversible transition is a gated `script` action, whose body writes elevated, over a field a non-system write cannot set. `readonly: true` binds every non-system caller (the value is stripped); a field permission without `editable` (refused `403`) binds only a caller no held set grants it, and Modify All grants it. The body skips the caller's edit right, so the action declares who may run it in `requiredPermissions`. A declarative `operation: 'update'` action and a `flow` action under `runAs: 'user'` write as the caller, so the lock stops them too. `readonlyWhen` and a `state_machine` rule bind the elevated body as well, so neither is the door; a `state_machine` dead-end still makes the reached state final for every writer. objectstack-automation's `references/state-machines-and-approvals.md` points to it.
1111

1212
The resolution ladder for `skill.tools[]` names four sources: the fourth is `MCP_FILE_TOOL_NAMES`, the MCP door's file tools, resolved only for a skill MCP can offer (`mcpPrompt` not `false`).
1313

‎skills/objectstack-ai/SKILL.md‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ Agent → Skill → Tool
3636
└─ Autonomous actor with role, instructions, and guardrails
3737
```
3838

39-
Agents are platform-internal (☁️ `ask` / `build`; reference section at the
40-
bottom). **Skills are your entry point** — you extend the platform by authoring
41-
skills, and a skill reaches tools by naming them.
39+
**Skills are your entry point** — agents are platform-internal (reference
40+
section at the bottom), so you extend the platform by authoring skills, and a
41+
skill reaches tools by naming them.
4242

4343
---
4444

@@ -337,18 +337,18 @@ there is **no top-level `temperature` / `maxTokens`** on an agent
337337
`enableActionApproval: true` (approval queue ☁️), `ai.requiresConfirmation` on
338338
the **action** (its door only, pitfall 2), or `approval: 'always'` on an MCP
339339
tool binding. AI metadata edits are already gated: they land as drafts a
340-
human must publish (ADR-0033).
341-
⚠️ `requiresConfirmation` on the **tool** was REMOVED (ADR-0033 §2; retired
342-
above). There is no `requireApprovalFor` field.
340+
human must publish (ADR-0033). There is no `requireApprovalFor` field.
343341
2. **Gating the action, not the state.** `ai.requiresConfirmation` guards the
344342
action's own door only: an agent can still write the field it changes with
345343
`update_record` or any data write, and the write lands. An irreversible
346344
transition is a gated action **plus a lock on that field**: a `script`
347345
action, whose body writes elevated (`isSystem`), over a field a non-system
348-
write cannot set — `readonly: true` (the value is stripped,
349-
**objectstack-data** → `readonly`) or field permissions leaving the caller
350-
no `editable` on it (refused `403`; any set granting it wins,
351-
**objectstack-data** `rules/security.md`). A declarative
346+
write cannot set. `readonly: true` binds every non-system caller (the value
347+
is stripped, **objectstack-data** → `readonly`); a field permission without
348+
`editable` (refused `403`) binds only a caller no held set grants it, and
349+
Modify All grants it, so an admin's agent still writes the field. The body
350+
skips the caller's edit right: declare who may run the action in its
351+
`requiredPermissions` (ADR-0066). A declarative
352352
`operation: 'update'` action, and a `flow` action under `runAs: 'user'`,
353353
write as the caller, so the lock stops them too. `readonlyWhen` and a
354354
`state_machine` rule bind the elevated body as well, so neither is the

0 commit comments

Comments
 (0)