From 04953ef84ded0cc0a33710813ff7d532ca09dfbb Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Wed, 2 Sep 2026 17:57:57 -0700 Subject: [PATCH] chore(ci): narrow the UI consistency check-run agent The Macroscope UI consistency agent had grown from a styling guard into a general review: it accumulated PR-specific rules (contrast tokens, environment routing, MenuPopup width defaulting, scroll-fade geometry) and instructed the agent to inspect emitted CSS, trace selector consumers, and verify runtime behavior on every run. That made each run expensive. Cut the prompt to the three things it was meant to guard: use the ui/ primitives, keep styling as Tailwind on the owning component instead of global CSS, and keep components composable, using the composer banner stack as the reference shape. Drop git_tools and github_api_read_only, narrow include to .tsx/.css, lower effort to medium, and cap spend per run. Co-Authored-By: Claude Fable 5 --- .../check-run-agents/ui-consistency.md | 88 ++++++------------- 1 file changed, 26 insertions(+), 62 deletions(-) diff --git a/.macroscope/check-run-agents/ui-consistency.md b/.macroscope/check-run-agents/ui-consistency.md index c2f2c57c1cf2..7005b21ac587 100644 --- a/.macroscope/check-run-agents/ui-consistency.md +++ b/.macroscope/check-run-agents/ui-consistency.md @@ -1,92 +1,56 @@ --- title: UI Consistency model: claude-opus-5 -effort: high +effort: medium input: full_diff tools: - browse_code - - git_tools - - github_api_read_only - modify_pr include: - - "apps/web/src/**/*.ts" - "apps/web/src/**/*.tsx" - "apps/web/src/**/*.css" +exclude: + - "apps/web/src/**/*.test.tsx" conclusion: failure -showToolCalls: true +maxBudgetPerRun: 10 --- # UI consistency review -Review changed web UI code and directly affected call sites for consistency with the shared component system, Tailwind ownership, and the behavioral constraints below. Apply these rules when a pull request creates, moves, or modifies controls or styling. Do not demand unrelated repository-wide cleanup. +This is a styling guard for `apps/web`, not a general review. Review only the changed lines in the diff and answer three questions. Do not build the project, inspect emitted CSS, trace selector consumers across the codebase, or ask for screenshots. If the diff does not make a violation obvious, there is no finding. -The goal is not to minimize CSS or class counts at any cost. The goal is to put each behavior in the smallest correct owner while preserving interaction, theming, accessibility, layout, and browser behavior. +## 1. Shared primitives over custom controls -## Shared controls and variants +Product UI must use the primitives in `apps/web/src/components/ui` (`Button`, `Input`, `InputGroup`, `Select`, `Toggle`, `Menu`, `Dialog`, `Tooltip`, `ScrollArea`, and the rest of that directory) instead of rebuilding them. -- Prefer the core UI primitives in `apps/web/src/components/ui` over native controls or locally reconstructed primitives. In ordinary product UI, a raw `