Skip to content

docs(skill): react-tier component prop contract (AI authors props, not guesses) - #2477

Merged
os-zhuang merged 1 commit into
mainfrom
feat/react-blocks-contract
Jun 30, 2026
Merged

os-zhuang merged 1 commit into
mainfrom
feat/react-blocks-contract

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Answers the gap: when AI writes a kind:'react' page, does it know each component's params? Now yes — from a generated contract, not by guessing.

  • Source of truth: skills/objectstack-ui/contracts/react-blocks.contract.json — per-block props with name, type, kind (data/controlled/callback), required, description.
  • Generator: contracts/build-ref.mjs → references/react-blocks.md (the AI-facing reference).
  • SKILL now tells the build agent: do not guess props — read the contract.

Phase 1 covers ObjectForm / ListView / ObjectGrid / ObjectMasterDetailForm / ObjectChart / Block, authored accurately from the real registry inputs + the components' callback/controlled types. data props mirror the registry inputs (the html-tier contract); controlled/callback are the React interaction surface. Follow-up: more blocks + an os build prop-validation gate (phase 2).

🤖 Generated with Claude Code

… not guesses)

Defines + generates the contract for the components injected into kind:'react'
page source: a single source-of-truth JSON (contracts/react-blocks.contract.json)
listing each block's props — name, type, kind (data/controlled/callback),
required, description — and a generator (build-ref.mjs) that emits the AI-facing
reference (references/react-blocks.md). The objectstack-ui SKILL now points the
build agent at it: 'do not guess props — read the contract'.

Phase 1 covers the core blocks (ObjectForm, ListView, ObjectGrid,
ObjectMasterDetailForm, ObjectChart, Block) accurately from the real registry
inputs + component callback/controlled types. data props mirror the registry
inputs (the html-tier contract); controlled/callback are the React surface.
Follow-up: more blocks + an os build prop-validation gate (phase 2).
@os-zhuang os-zhuang added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Jun 30, 2026
@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 Ready Ready Preview, Comment Jun 30, 2026 7:34am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation size/m labels Jun 30, 2026
const contract = JSON.parse(readFileSync(join(here, 'react-blocks.contract.json'), 'utf8'));
const out = join(here, '..', 'references', 'react-blocks.md');

const esc = (s) => String(s).replace(/\|/g, '\\|');

This branch was successfully deployed

1 active deployment
Preview — 92538bc1 Deployed Jun 30, 2026 by vercel[bot]
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 skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants