Skip to content

Commit 133ce6d

Browse files
committed
docs(skills): the objectui action-block rule teaches variant 'danger' for a destructive action; destructive is the Button primitive's word
The "Actions Are Node Types" rule in skills/objectui/rules/protocol.md gains one line: "variant": "danger" draws the action block red and asks its confirmText question through the destructive confirm button; destructive is the Button primitive's word (variant="destructive" in React) and is refused on an action block at save, naming the rename. Paid in the same file under the skills token ratchet (4357 -> 4366 of 4368): a provenance sentence about the retired dataSource measurement route and a sentence restating the props-envelope rule, both stated elsewhere in the file, are deleted. One patch changeset for @objectstack/skills. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2dPRZXfgE1A2Vct3FU
1 parent 72b08ee commit 133ce6d

2 files changed

Lines changed: 19 additions & 4 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the objectui action-block rule teaches `variant: 'danger'` for a destructive action and that `destructive` is the Button primitive's word, refused on an action block
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
- **Before.** `rules/protocol.md` taught `action:button` without its `variant`. An agent that wanted a red delete button had only the Button primitive's `destructive` to copy from the React examples, and `variant: 'destructive'` on an action block is refused at save with the rename to `danger`.
11+
- **Now.** The "Actions Are Node Types" rule carries one line: `"variant": "danger"` draws the action block red and asks its `confirmText` question through the destructive confirm button; `destructive` stays the Button primitive's word (`variant="destructive"` in React) and is refused on an action block. Paid in the same file: a provenance sentence about the retired `dataSource` measurement route and a sentence restating the `props` envelope rule, both stated elsewhere in the file, are gone.
12+
- No schema, key or behaviour changes.

‎skills/objectui/rules/protocol.md‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,7 @@ the same bag, and `SchemaRenderer` evaluates it and then **hoists every key onto
137137
the node** (`type` / `id` excepted) before the renderer runs — so it is read by
138138
every namespace, not just `element:*`. Measured on `origin/main` `f1c27f037`
139139
with a host scope carrying `data = { label: "Evaluated Title" }` (published
140-
through `PredicateScopeProvider`). The `dataSource` wiring this was first
141-
measured through is retired; the envelope readings below are unchanged by that:
140+
through `PredicateScopeProvider`):
142141

143142
| node | rendered card header |
144143
|---|---|
@@ -159,8 +158,7 @@ one this skill teaches. The last row above is real and is the only spelling that
159158
carries an expression into a key a `ui:*` / `page:*` renderer reads, but whether
160159
`properties` is an official authoring channel for those namespaces is an open
161160
contract question, so it is recorded here rather than
162-
recommended. What is *not* open: a `${...}` on the node is never evaluated, and a
163-
key under `props` never reaches a `ui:*` / `page:*` renderer at all.
161+
recommended.
164162

165163
## Rule: No Schema Property Invention
166164

@@ -274,6 +272,11 @@ component refuses a node-level `actionType` / `target` as mis-layered
274272
}
275273
```
276274

275+
**Destructive actions:** `"variant": "danger"` draws the button red and asks its
276+
`confirmText` question through the destructive confirm button. `destructive` is
277+
the Button primitive's word (`variant="destructive"` in React); on an action
278+
block the spec refuses it at save, naming the rename.
279+
277280
**❌ DO NOT** use function references or inline callbacks in JSON schemas, and
278281
**❌ DO NOT** author an `events` bag. `BaseSchema` declares no `events` member and no
279282
renderer reads `schema.events`: a typed literal refuses it, and one

0 commit comments

Comments
 (0)