Skip to content

feat(design): add advisory conformance check and local Studio - #8396

Closed
BillLeoutsakosvl346 wants to merge 71 commits into
stagingfrom
codex/design-system-rollout-v2
Closed

BillLeoutsakosvl346 wants to merge 71 commits into
stagingfrom
codex/design-system-rollout-v2

Conversation

@BillLeoutsakosvl346

@BillLeoutsakosvl346 BillLeoutsakosvl346 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add a warning-only design diff check to the existing Test and Build workflow. Product findings become file/line warnings; an inspection failure fails the check.
  • Derive design facts from EMCN source, globals.css, and the central packages/emcn/src/design-ownership.json decisions for each inspected revision. The full scanner publishes the EMCN inventory and detected Extras in scan.json.
  • Add a separate, local-only Design Studio under tools/design-studio. An explicit refresh builds the catalog and previews; the Studio is absent from Sim's deployed routes.
  • Keep landing, docs, Monaco presentation, provider branding, and intentional block palettes outside product checks. Browser desktop screens remain in scope.

This is a replacement draft for #8313, rebased by merging current staging into a new branch. It changes tooling and design guidance, not product rendering. It will not be merged automatically.

Use

bun run check:design --base origin/staging --working-tree
bun run check:design --base origin/staging --head HEAD
bun run design:scan --repo . --working-tree --output /tmp/sim-design-scan
bun run studio:refresh
bun run studio:dev

The diff command includes staged, unstaged, and nonignored new product files. CI compares immutable revisions. Findings are advisory; failed inspection is an error. A full scan and Studio refresh are deliberate local commands, and their reports and captures stay outside the repository. Every detected Extra enters Studio without an approval gate. A renderable indicative sample is labeled separately from a live source preview; fixture gaps remain visible.

Verification on merged staging

  • bun run test:scripts: 821 tests across 43 files passed.
  • bun run check:audits: all 52 audits passed, including the new dead-code audit.
  • Design and Studio type checks, root lint and format checks, and frozen lockfile install passed.
  • Immutable design diff against origin/staging: 23 central system-change findings, zero product findings, 805 unchecked diagnostics, and zero inspection failures. The 23 findings reflect the introduction of ownership and contract metadata; findings are warning-only.
  • Current full scan: 2,308 styling findings, 2,251 control/source candidates, 2,887 styling diagnostics, and zero inspection failures. Studio refresh publishes 759 EMCN export/variant entries and all 2,308 detected Extras. Its 237 fixture gaps remain visible, so the refresh exits 1 for incomplete preview coverage.
  • The merge includes staging's expanded script test discovery and dead-code gate. Studio's direct dependencies are declared, and its local Next cache is excluded from that audit.

Coverage limits

New public EMCN exports and finite variants are discovered from source. Exports needing providers or required props may need a Studio fixture adapter. Unsupported static flows remain visible as unchecked; a failed inspection cannot look like a clean result. Indicative Extra previews show detected styling but do not assert a source-backed rendering. See scripts/design-conformance/README.md and scripts/design-studio/README.md.

Bill Leoutsakos and others added 30 commits September 25, 2026 17:24
@vercel

vercel Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docs Ready Ready Preview Sep 29, 2026 2:38am UTC

Request Review

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile review this PR

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete.

@greptile-apps

greptile-apps Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[High risk] Adds design conformance checking and local Studio tooling.

The PR appears safe to merge based on this review.

Summary

The PR adds an advisory design-conformance check to CI and a separate local Design Studio. Since the previous review, it changed the Studio import to the established alias and added a fixture-edit freshness regression test. No new actionable issue was identified.

Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Source[EMCN and product source] --> Check[Design diff check]
  Check --> Warnings[CI warnings and report]
  Source --> Scan[Local full scan]
  Scan --> Refresh[Studio refresh]
  Refresh --> Catalog[Local Studio catalog]
Loading

Reviews (2) · Last reviewed commit: "fix(design-studio): verify fixture fresh..."

Comment thread tools/design-studio/_lib/manifest.ts
Comment thread tools/design-studio/_lib/manifest.ts Outdated
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile review this PR

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete.

This branch was successfully deployed

1 active deployment
Preview — 0bfe4f7b Deployed Sep 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant