feat(qa): executable runtime UI contracts + generic contract runner#575
Merged
Conversation
Agent-native QA layer: surfaces declare their invariants as data (docs/design/ui-contract/surfaces/*.contract.json) — anchors, computed geometry, theme wiring, and deep-link-forced states with copy that must agree with reality. One generic Playwright runner executes every manifest per theme x viewport; adding a surface means adding a manifest, not writing spec code. Tier B runs the runner per-PR against the preview. The first contract encodes this week's two shipped failures as clauses: the 70px mobile collapse (geometry: gridTracks/minWidthPx) and the mislabeled dark captures (theme.storageKey — runner and shell read the same key, so key drift fails loudly). Proof: 5/5 against the live bundle in 6.1s; flipping gridTracks to a wrong value fails exactly the two mobile variants; restored, 5/5. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
HomenShum
enabled auto-merge (squash)
July 17, 2026 20:39
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
✅ Dogfood Visual QA Gate: PASSED
ArtifactsDownload the Generated by Dogfood QA Gate |
HomenShum
pushed a commit
that referenced
this pull request
Jul 17, 2026
A second agent proposed building .ui/contract.json + a Playwright drift verifier + /.well-known/agent-ui.json from scratch. The first two exist (PR #575); the ledger entry points at the substrate and scopes the real delta: a build-time projection of repo contracts into a served public affordance manifest, version discipline, and two more surface contracts. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Demo: walkthrough of the surfaces this PR changed is available as a workflow artifact ( |
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.
Summary
Agent-native QA: the third contract layer beside the static design manifest (
src/design/designSystem.ts) and the visual-evidence store. Surfaces now declare invariants as data —docs/design/ui-contract/surfaces/*.contract.json— and one generic Playwright runner (tests/e2e/ui-contract-runner.spec.ts) executes every manifest against the live DOM per theme × viewport. Adding a surface = adding a manifest, zero new spec code. Tier B runs the runner per-PR against the preview.The seed contract for
decision-workspaceencodes:gridTracks: 1+minWidthPx: 300clauses (computed style, not overflow booleans)storageKey: nodebench:redesign:theme; runner and shell read the same key, so the key drift that shipped mislabeled dark captures now fails loudlyexpectText/forbidTextcopy agreementVerification
gridTracksto 2 fails exactly the two mobile variants; restored → 5/5Prior art: repo's own UI-contract evidence schema + designSystem manifest+audit pattern, agents.md / MCP progressive-discovery (machine-readable affordances), Storybook play functions, ARIA AX-tree.
🤖 Generated with Claude Code