Skip to content

docs(adr): ADR-0082 — react-tier component contract governance#2490

Merged
os-zhuang merged 1 commit into
mainfrom
docs/adr-0082-react-contract-governance
Jun 30, 2026
Merged

docs(adr): ADR-0082 — react-tier component contract governance#2490
os-zhuang merged 1 commit into
mainfrom
docs/adr-0082-react-contract-governance

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

What

A capstone ADR recording the governance model that the react-tier contract work converged on — now fully implemented and merged, but spread across many small PRs (framework #2478/#2480/#2482/#2484/#2485/#2488/#2489, objectui #2113/#2115) with no single document recording why it's built this way.

Why

Multiple prior memos flagged "架构结论(待 ADR)" — the design was deferred to a decision repeatedly. Now that the chain is real and closed, this ADR captures it so future contributors don't re-litigate: where the source of truth lives, why the registry is only a subset, why conformance is a ratchet and not a per-PR gate, and what each gate enforces.

The model (recorded)

  • Spec zod schema = the protocol source of truth. The AI-facing contract (react-blocks.md) is generated from it — zero-drift, never hand-authored.
  • Registry inputs = the designer palette (a subset). spec-only is a soft signal (panel gap); frontend-only is the actionable one (undocumented extension).
  • React-interaction props live in a thin overlay, not the spec (callbacks / controlled / binding escape-hatches). Declaring a genuine binding there is how a frontend-only prop is closed → baseline now 0 frontend-only.
  • Conformance = a build-time baseline ratchet (build-console.sh, warn-only), not a per-PR gate — the manifest only exists at console-build time.
  • Authoring correctness = a hard gate at os validate (missing-required → error, typo → warning).
  • Dogfood golden page proves the chain closes.

Plus the alternatives rejected (copy props into spec / per-PR hard gate / hand-authored contract / registry-as-source).

Docs-only; all cross-ADR links verified to resolve.

🤖 Generated with Claude Code

Records the model that the spec↔contract↔conformance↔prop-gate work converged
on (now implemented + merged across framework #2478/#2480/#2482/#2484/#2485/#2488/
#2489 and objectui #2113/#2115), so future contributors don't re-litigate it:

- the spec zod schema is the protocol source of truth; the AI-facing contract is
  GENERATED from it (zero-drift), never hand-authored;
- registry inputs are the designer palette (a curated subset) — spec-only is a
  soft signal, frontend-only is the actionable one;
- React-interaction props (callbacks/controlled/binding escape-hatches) live in a
  thin overlay, not the spec; declaring a genuine binding there is how a
  frontend-only prop is closed (baseline now 0 frontend-only);
- conformance is a build-time baseline ratchet (build-console.sh, warn-only),
  not a per-PR gate — the manifest only exists at console-build time;
- authoring correctness is a hard gate at os validate (missing-required = error,
  typo = warning); and the dogfood golden page proves the chain closes.

Captures the alternatives rejected (copy props into spec / per-PR hard gate /
hand-authored contract / registry-as-source).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Building Building Preview, Comment Jun 30, 2026 2:32pm

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation size/m labels Jun 30, 2026
@os-zhuang os-zhuang merged commit ef6d2e7 into main Jun 30, 2026
14 of 15 checks passed
@os-zhuang os-zhuang deleted the docs/adr-0082-react-contract-governance branch June 30, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant