Skip to content

feat(design): add design conformance checks - #7827

Open
BillLeoutsakosvl346 wants to merge 2 commits into
stagingfrom
feat/design-conformance-check
Open

BillLeoutsakosvl346 wants to merge 2 commits into
stagingfrom
feat/design-conformance-check

Conversation

@BillLeoutsakosvl346

@BillLeoutsakosvl346 BillLeoutsakosvl346 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add bun run check:design --base origin/staging --head HEAD to check committed changes against central EMCN components, tokens, recipes and artwork ownership. Approved building blocks remain free to combine; new violations and central-system changes notify.
  • Integrate tool 3.3.1 / design-conformance/1.3.0 with root dependencies, script tests, lint, type checking and CI. Unchecked files and reasons appear in the check log and an expandable CI summary. Both finding types launch as warnings; missing revisions and other operational failures fail CI. PRs use immutable base/head SHAs, and pushes cover all pushed commits.
  • Add agent guidance and run the committed check before pushes in /ship and /babysit. Keep the legacy policies and maintainer replay commands; historical datasets and reports remain outside the repository.

Type of Change

  • New feature / repository tooling

Testing

  • Bun 1.4.1 frozen-lockfile installation; 569 script tests across 29 suites passed, including 226 design regressions.
  • Root lint, all 46 repository audits, block-registry and docs-manifest checks, and full root type checking passed.
  • Clean-checkout frozen-lockfile installation verified for the unchanged dependency set. CLI and CI regressions cover parser failures, oversized files, diagnostic escaping and bounded summaries; unchecked inputs remain non-violations.
  • This PR's design check completed with 0 usage violations and 1 intentional system-change warning for introducing the contract registry. Retain that warning for review. The changed EMCN guidance Markdown is reported as one unchecked input.
  • The frozen development-data evaluation flagged 78 of 1,000 PRs, left 922 quiet, had zero operational failures and produced byte-identical reports in reversed order. Detection rules and contracts match the evaluated release; the reporting improvements do not change notification decisions. This is development-data validation, not an unseen-accuracy claim.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced — expected contract-registry notification documented above
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@BillLeoutsakosvl346
BillLeoutsakosvl346 requested a review from a team as a code owner September 14, 2026 22:38
@vercel

vercel Bot commented Sep 14, 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 14, 2026 10:52pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; both previous findings are resolved and no new actionable defect remains.

Findings

  1. P2 Non-TSDoc comments violate policy

Summary

The PR introduces a repository-wide design-conformance checker and integrates it with CI, local shipping workflows, documentation, linting, type checking, and regression coverage.

  • Compares committed UI changes against central EMCN components, recipes, tokens, and artwork ownership.
  • Reports usage violations and central-system changes as warnings while preserving operational failures as CI failures.
  • Resolves immutable comparison revisions for pull-request and push workflows.
  • Makes skipped-source diagnostics actionable in command output and CI summaries.
  • Updates all previously flagged fixture suppression comments to TSDoc form.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Committed UI changes] --> B[Resolve immutable base and head]
  B --> C[Design conformance analysis]
  C --> D{Result}
  D -->|No findings| E[Exit 0]
  D -->|Usage or system warnings| F[Exit 1 locally]
  F --> G[CI records warnings and succeeds]
  D -->|Operational failure| H[Exit 2 and fail CI]
  C --> I[Unchecked diagnostics]
  I --> J[Complete check log and JSON report]
  I --> K[Bounded CI summary]
Loading

Reviews (2) · Last reviewed commit: "fix(design): explain unchecked source di..."

Comment thread scripts/design-conformance/conformance.ts
@@ -0,0 +1,418 @@
/* biome-ignore-all lint/suspicious/noTemplateCurlyInString: Fixtures contain literal proposed JavaScript templates. */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Non-TSDoc comments violate policy

This module-level block comment violates the repository directive that documentation comments use TSDoc and that non-TSDoc comments are not introduced. The same pattern appears at the start of scripts/check-design-conformance-composition.test.ts and scripts/check-design-conformance-refactors.test.ts. Use a compliant suppression form or restructure the fixtures to avoid the file-level suppression. This repository requirement must be satisfied before merging.

Context Used: CLAUDE.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile

Both findings are fixed in the latest commit: unchecked diagnostics now identify files and reasons in the check log and CI summary without becoming design violations, and all four fixture suppression comments use TSDoc form. Added regressions for skipped sources, output escaping and summary limits; all 569 script tests and 46 repository audits pass.

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