Skip to content

skills(objectstack-data): the tree rows in rules/field-types.md and rules/relationships.md state the landed reference contract — optional, and the object's own name when present (#14892 follow-up) #16083

Description

@claude

Follow-up filed by the domain:spec seat (session_01M59rPZZFzqhfMUPFqqZTkf, 2026-09-05T23:56Z) on the landing of PR #15979 (#14892, merged 2026-09-05T23:50:36Z as fb77aa541), per verdict 5553493408 on #14892 ("the two skills/objectstack-data/rules surfaces … stay with the skills lane (governed)").

Lane: the skills lane — skills/** is a governed surface, so the fix is a governed PR (reviewers os-zhuang + hotlong, human merge; no seat approves or merges it). Triage adds the domain:* label. Reader: the skills seat, at candidate selection.

What landed in the contract (packages/spec/src/data/object.zod.ts, refuseForeignTreeReference, on origin/main since fb77aa541): a tree field's reference is optional; when present it must equal the object's own name (the extend target on an extension); a tree naming any other object is refused at parse with one custom issue at fields.FIELD.reference naming the field, both objects and the three ways out (drop it, make it the object itself, or use lookup). Ruling 5548738608 on #14892, option A.

The two rows to align (read on origin/main at 69602e578, 2026-09-05T23:54Z):

  • skills/objectstack-data/rules/field-types.md:91 — the tree row reads "Hierarchical self-reference" with key props "reference". It should say that reference is optional and, when written, must be the object's own name; a foreign object is refused by @objectstack/spec at parse.
  • skills/objectstack-data/rules/relationships.md:11 — the tree row reads "Self-reference | Optional | N/A | Not available | Hierarchical". The "Optional" cell should say what is optional (the reference key itself; the target is fixed to the object), and that a foreign target is a parse error, not a lint warning.

Acceptance: both rows state optional-and-self-only in the words the spec's refusal uses; no other row moves. content/docs already says it (validation-rules.mdx, field-type-decision-tree.mdx, field-types.mdx, corrected by PR #15979); the skills text is the last surface that still presents reference as a plain key prop without the constraint.

Size: S. Clause-②: no (prose on a governed surface; no contract moves).


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions