Review Tailwind
Review the Tailwind CSS v4 setup in front-app for alignment with current official best practices - CSS-first configuration, build integration, and lint enforcement for developer experience. Your reply must be a plan of suggested changes: concise, actionable, structured - not only prose.
Invocation
Text after the slash command is additional scope/focus (e.g. "theme only", "lint rules") - narrow the review accordingly.
Ground truth (mandatory)
Your pre-trained knowledge of Tailwind may be outdated (v4 changed the configuration model fundamentally). Do not draft suggestions from memory alone.
- Resolve "Tailwind CSS" via the Context7 MCP (
resolve-library-id → query-docs): CSS-first @theme/@import "tailwindcss" configuration, Vite plugin usage, v4 utility and variant behavior, content detection (no content array).
- For anything Context7 lacks, use Firecrawl search/scrape restricted to the official domain (
tailwindcss.com/docs) - upgrade guide, theme variables reference, compatibility notes for @tailwindcss/vite at the installed version.
- Version currency: catalog
tailwindcss, @tailwindcss/vite, eslint-plugin-better-tailwindcss in pnpm-workspace.yaml vs latest stable; flag deprecated class/config patterns.
- Cite the retrieved source next to every finding; label anything unverifiable as Unverified.
Scope artifacts
Analysis axes
- CSS-first config: theme tokens defined via
@theme in CSS (not legacy tailwind.config.js); design-token naming coherent; no dead config files from v3 era.
- Build integration: Vite plugin present and correctly ordered; no PostCSS leftovers; production output size sane (unused utilities not shipped).
- Lint enforcement: better-tailwindcss rules active (class order, no contradictory/duplicate classes, invalid classes); entry-point context resolution intact (single root oxlint pass contract per AGENTS.md).
- Class hygiene: consistent variants ordering; dark-mode strategy uniform (media vs class) with matching
@custom-variant if used; no arbitrary-value abuse where a token exists.
- Version currency: new v4 features worth adopting; deprecated utilities flagged by current docs.
DX & AI-agentic workflow
Verify agent-friendliness: lint errors for class issues are machine-readable through pnpm lint:agent; theme tokens documented so agents reuse tokens instead of inventing arbitrary values.
Steps
- Collect ground truth before reading config.
- Read stylesheet entry, vite plugin wiring, lint settings; sample components for class patterns.
- Walk each analysis axis; note findings or explicit one-line "no issues".
- Compose the plan grouped Critical / Improvements / Optional with what, where, why, and source citations.
Output format
- Critical - broken styles pipeline, lint context broken, v3/v4 mixing.
- Improvements - token/theme and lint alignment with current guidance.
- Optional - nice-to-haves; prefix pure polish with Nit:.
Read-only review: produce the plan only; implement nothing unless explicitly asked afterwards.
1---2name: review-tailwind3description: Tailwind CSS v4 review (CSS-first config, Vite plugin integration, better-tailwindcss lint rules) against current official Tailwind best practices. USE WHEN: user runs /review-tailwind or explicitly asks for this review. DO NOT USE WHEN: reviewing app code, other dev dependencies, or implementing features.4---56# Review Tailwind78Review the Tailwind CSS v4 setup in `front-app` for alignment with current official best practices - CSS-first configuration, build integration, and lint enforcement for developer experience. Your reply must be a **plan of suggested changes**: concise, actionable, structured - not only prose.910## Invocation1112Text after the slash command is additional scope/focus (e.g. "theme only", "lint rules") - narrow the review accordingly.1314## Ground truth (mandatory)1516Your pre-trained knowledge of Tailwind may be outdated (v4 changed the configuration model fundamentally). **Do not draft suggestions from memory alone.**17181. Resolve "Tailwind CSS" via the **Context7 MCP** (`resolve-library-id` → `query-docs`): CSS-first `@theme`/`@import "tailwindcss"` configuration, Vite plugin usage, v4 utility and variant behavior, content detection (no `content` array).192. For anything Context7 lacks, use **Firecrawl search/scrape restricted to the official domain** (`tailwindcss.com/docs`) - upgrade guide, theme variables reference, compatibility notes for `@tailwindcss/vite` at the installed version.203. Version currency: catalog `tailwindcss`, `@tailwindcss/vite`, `eslint-plugin-better-tailwindcss` in [pnpm-workspace.yaml](../../../pnpm-workspace.yaml) vs latest stable; flag deprecated class/config patterns.214. Cite the retrieved source next to every finding; label anything unverifiable as **Unverified**.2223## Scope artifacts2425- Global stylesheet entry (`apps/front-app/src/**/*.css`, `@import "tailwindcss"` / `@theme` blocks)26- [apps/front-app/vite.config.ts](../../../apps/front-app/vite.config.ts) (`@tailwindcss/vite` plugin position)27- [.oxlintrc.json](../../../.oxlintrc.json) - `better-tailwindcss` plugin settings, especially `entryPoint` resolved from repo root28- Dark mode strategy; component class usage across [apps/front-app/src/](../../../apps/front-app/src/)29- [.claude/rules/frontend/tailwind.md](../../../.claude/rules/frontend/tailwind.md) ↔ `.cursor` twin3031## Analysis axes3233- **CSS-first config**: theme tokens defined via `@theme` in CSS (not legacy `tailwind.config.js`); design-token naming coherent; no dead config files from v3 era.34- **Build integration**: Vite plugin present and correctly ordered; no PostCSS leftovers; production output size sane (unused utilities not shipped).35- **Lint enforcement**: better-tailwindcss rules active (class order, no contradictory/duplicate classes, invalid classes); entry-point context resolution intact (single root oxlint pass contract per AGENTS.md).36- **Class hygiene**: consistent variants ordering; dark-mode strategy uniform (media vs class) with matching `@custom-variant` if used; no arbitrary-value abuse where a token exists.37- **Version currency**: new v4 features worth adopting; deprecated utilities flagged by current docs.3839## DX & AI-agentic workflow4041Verify agent-friendliness: lint errors for class issues are machine-readable through `pnpm lint:agent`; theme tokens documented so agents reuse tokens instead of inventing arbitrary values.4243## Steps44451. Collect ground truth before reading config.462. Read stylesheet entry, vite plugin wiring, lint settings; sample components for class patterns.473. Walk each analysis axis; note findings or explicit one-line "no issues".484. Compose the plan grouped Critical / Improvements / Optional with **what**, **where**, **why**, and source citations.4950## Output format51521. **Critical** - broken styles pipeline, lint context broken, v3/v4 mixing.532. **Improvements** - token/theme and lint alignment with current guidance.543. **Optional** - nice-to-haves; prefix pure polish with **Nit:**.5556Read-only review: produce the plan only; implement nothing unless explicitly asked afterwards.