FrontUI Web
Make web UI tidy, alive, and anti-AI-slop. Then audit the frontend. Web only.
When to use
Trigger on any request to build, redesign, restyle, or review web UI, or to audit web frontend security. Do not trigger for native mobile (Android/iOS) UI.
Workflow (default mode: ASK FIRST, then change code)
- Discover — inspect the project before assuming. Identify framework, styling approach, existing tokens, component library, and build tool. Use file search and read
package.json. - Brief — ask at most 4 short questions only if unknown: product type and audience, mood keywords, brand colors if any, light/dark/both. If already provided, skip.
- Propose — present a short design direction: palette (from
references/palettes.mdor a custom one), shape language, type pairing, motion level, and a list of planned changes. Wait for approval. - Implement — only after approval. Make small, reviewable edits. Keep existing architecture and naming. Never invent features, fake data, or dependencies. Never add emoji.
- Verify — run the contrast validator, gradient checker, slop linter, and the project lint/build/test. Report what passed and what did not.
- Audit — when asked or as the final step, run the vulnerability checklist and scanner, produce the severity-rated report, and ask before applying fixes.
Modes
design— UI/UX improvement only (default).audit— vulnerability report only, no edits.palette— recommend colors only.lint— run the anti-slop linter only.
Load by step
- Anti-slop rules and tells: read
references/anti-slop.md. - Color tokens, contrast rules, palette workflow: read
references/color-system.md. - Ready palettes: read
references/palettes.md. - Shape, spacing, layout, icons: read
references/shape-and-layout.mdandreferences/typography.md. - Motion and states: read
references/motion.mdandreferences/components-states.md. - Accessibility baseline: read
references/accessibility.md. - Framework specifics: read
references/framework-notes.md. - Security checklist: read
references/vuln-checklist.md. - Headers/CSP: read
references/security-headers.md. - Report format: read
references/report-template.md.
Run by step
- Validate contrast:
node scripts/contrast-check.mjs <tokens.css|json>. - Generate tokens from a base hue:
node scripts/palette-gen.mjs --hue <0-360> [--name <n>]. - Flag clashing gradients:
node scripts/gradient-check.mjs <file-or-dir>. - Anti-slop lint:
node scripts/slop-lint.mjs <path> [--json]. - Vulnerability scan:
node scripts/vuln-scan.mjs <path> [--json].
All scripts are Node 18+, zero dependencies, print human-readable output, support --json, and exit non-zero on failure.
Rules
- Default: ASK FIRST. Do not edit code before the user approves the direction.
- Never use emoji in UI.
- Never default to purple/indigo/violet-to-blue gradients.
- Keep semantic colors separate from brand colors.
- Respect
prefers-reduced-motion. - Keep the final answer concise.