feat: make UI AST the canonical governed UI contract#40
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description: UI AST V2 Cutover
Use this content when opening the PR. Reference: docs/plans/ui-ast-v2-cutover-rfc.md.
Title
feat: make UI AST the canonical governed UI contract
Strategy check
What changed
--astfirst and only fall back to legacy--contractinput for migration compatibility.migrate-ui-astto deterministically import legacyweb.surface.contractfiles into AST drafts.compile,prepare-generation, andprepare-runtimeAST-first on bundle format3.0.ast/normalized.json,surfaces/<surface>/ast.json, andsurfaces/<surface>/platforms.json, withderived/contract.normalized.jsonkept only for compatibility.Why it matters
This makes the semantic contract explicit and reviewable before rendering. Models, validators, runtime consumers, and downstream repos now meet on one bounded artifact instead of inferring meaning from implementation-shaped input. It also creates a clear migration path off the legacy contract model without pretending both models are long-term co-equals.
Contract and enforcement notes
web.surface.contractinput to UI AST v2 input.Not in scope
Tests
packages/interfacectl-validator:node --test test/authoring-contract.test.mjs test/ui-ast.test.mjspackages/interfacectl-cli:node --test test/color-deprecation.test.mjs test/compile.test.mjs test/prepare-generation.test.mjs test/prepare-runtime.test.mjs test/generation-adapter.test.mjs test/migrate-ui-ast.test.mjsReview checklist
--contractsupport is described as migration-only compatibility.3.0canonical files are AST-first and compatibility output is explicit.