Commit fef3216
`refuseForeignTreeReference` (packages/spec/src/data/object.zod.ts) makes a
`tree` field's `reference` optional and, when written, equal to the declaring
object's own name — the `extend` target on an extension. Any other object is
refused at parse with one issue at `fields.<field>.reference`. The published
skill still listed `reference` as a bare key prop, so a client agent reading it
had no way to know either half of the rule.
Two rows, no new section:
- `rules/field-types.md` — the Relational table's `tree` row now states
optional-and-self-only and that a foreign object is refused at parse.
- `rules/relationships.md` — the `tree` row's bare "Optional" cell now says
what is optional and contrasts the refusal with the `master_detail` row's
lint-warned cell in the same column.
The token ratchet left `field-types.md` 27 bytes under its ceiling, so the row
is paid for inside the same file: the Media section's "no per-field attachment
config" note restated the top-of-file blockquote, which already refuses
`fileAttachmentConfig` by name, above every table. That file now shrinks.
The `Hierarchical: tree (Self-Reference)` example is unchanged — it already
writes the object's own name (`reference: 'category'` on `category`).
Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 51f080b commit fef3216
2 files changed
Lines changed: 2 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | 109 | | |
113 | 110 | | |
114 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
0 commit comments