Commit 5c58423
docs(skills): state which record each validation rule type is judged against (#15046)
The rule-type table in skills/objectstack-data/rules/validation.md said what
each type is for and when it fails, but never which record the predicate is
evaluated on -- and the answer is not uniform across the six. An author who
generalises "validations[] holds invariants" reaches for `format` to guard
stored data and silently gets a write gate instead.
Adds one column, "Judged against", each cell measured from evaluateRule's
dispatch in packages/objectql/src/validation/rule-validator.ts:
- script / cross_field -> ctx.merged, the prior row overlaid with the write
- format / json_schema -> ctx.data, the write payload, behind a
`field in data` guard, so an omitted field is
never judged
- state_machine -> ctx.data value against ctx.previous, same guard;
the insert leg checks initialStates instead
- conditional -> its `when` on ctx.merged, then the nested rule
re-dispatched through the same switch
Table only: no prose, heading, example or tool-choice changes. Net lines 0.
Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox
Co-authored-by: Claude <noreply@anthropic.com>1 parent b17cdea commit 5c58423
1 file changed
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
0 commit comments