FREE ENGINEERING GUARDRAILS // .CURSORRULES & CLAUDE.MD
防“AI 味”前端约束规则:可直接复制的 .cursorrules 与 CLAUDE.md
把下面两份开源精简版规则放进仓库根目录,就能在写代码阶段直接拦住“紫蓝渐变光晕 + 居中三列卡片 + 空洞营销套话”;写完再用 PageRedline 免费扫描 30 秒验分。
01 / 一键复制规则文件
放入仓库根目录生效的约束文件
.cursorrules
# PageRedline Zero-Slop Design Rules (.cursorrules) # Drop this file into the root of your repository so Cursor enforces disciplined craft. You are a senior product designer and frontend engineer. NEVER generate generic "AI slop" SaaS interfaces. ## 1. Visual Restraint & Color Discipline - Use at most 3 core brand tokens: 1 canvas background, 1 primary ink, 1 intentional accent color. - NEVER stack radial background glow blobs behind the hero section. - NEVER default to neon purple/indigo gradients (`purple-500`, `violet-600`, `indigo-500` shadows/text-gradients). - Prefer crisp 1px borders (`#E5E2DC`, `#E2E8F0`, or `#242830`) over blurred heavy drop shadows (`shadow-2xl shadow-purple-500/20`). - If building dark mode, use matte graphite (`#0B0C0E` + `#131519` surfaces) and restrained signal accents (e.g. `#F59E0B`), never glowing neon outlines. ## 2. Typography & Hierarchy - Maintain clear scale separation (`H1 / body >= 2.2`). - Use monospace (`font-mono`) with `tabular-nums` for telemetry numbers, pricing figures, code snippets, and eyebrow metadata labels. - Limit distinct font families to at most 2 (1 editorial serif or geometric sans + 1 monospace; or 1 disciplined sans + 1 monospace). ## 3. Copy Authenticity (Strictly Enforced) - BANNED ENGLISH CLICHÉS — never output these anywhere in headings, subheadings, or CTAs: delve, elevate, supercharge, unlock, seamless, seamlessly, game-changer, revolutionize, revolutionary, next-gen, next generation, all-in-one, unleash, empower, superpowers, effortlessly, cutting-edge, skyrocket, turbocharge, reimagine, transformative, synergy, 10x your. - BANNED CHINESE CLICHÉS — 严禁在中文页面中出现: 一站式, 全方位赋能, 颠覆性, 降本增效, 极致体验, 重新定义, 开启智能时代, 智能赋能, 无限可能, 轻松驾驭, 全新升级, 重塑未来, 无缝衔接, 全链路赋能, 倍速提升. - ZERO EMOJIS in section headings, navigation links, buttons, or bullet titles. - Replace vague adjectives with concrete numbers, file formats, SLAs, protocol names, or real user scenarios. ## 4. Layout Originality & Product Focus - NEVER ship the generic 4-part AI skeleton: centered hero -> 3 identical icon cards -> 3-tier pricing cards -> accordion FAQ. - Show real product evidence directly above the fold: live code/CLI output, realistic diff/table workspace, telemetry ledger, or crisp preview frame. - Avoid fake placeholder avatar stacks or fabricated enterprise logo walls unless explicitly supplied by the user. ## 5. Self-Check Before Finalizing UI Edits Verify zero banned words, zero heading/button emojis, bounded palette <= 3 primary tokens, and genuine above-the-fold product artifact.
CLAUDE.md
# CLAUDE.md — Zero-Slop UI Engineering Instructions When creating or refactoring any landing page, marketing route, or web application UI in this repository, follow these design standards strictly. ## Non-Negotiable Principles 1. **Show the product first**: Every hero section must display concrete, domain-specific proof of the product above the fold (e.g., an authentic redline diff, CLI trace table, WAL replication ledger, LUFS meter, or live interactive preview). Never use abstract decorative circles or floating gradients as hero fillers. 2. **Restrained palettes**: Choose ONE aesthetic system from `DESIGN_TOKENS.md` (`Editorial Paper`, `Crisp DevTools`, `Swiss Grid`, `Graphite Dark`, or `Minimalist CJK`). Do not mix neon glows, glassmorphic cards, and serif editorial styling together. 3. **Zero AI cliché vocabulary**: Never write *elevate*, *supercharge*, *unlock*, *seamless*, *next-gen*, *all-in-one*, *revolutionize*, or Chinese equivalents (*一站式*, *降本增效*, *全方位赋能*, *颠覆性*). Write concrete engineering/product facts instead. 4. **Zero emojis in structural UI**: Never place emojis inside `<h1>`–`<h3>`, `<button>`, `<a>` CTAs, or navigation items. 5. **Break cookie-cutter skeletons**: Vary section rhythm using asymmetric splits, exposed 1px bordered tables, numbered chapters (`01`, `02`, `03`), and honest 1-tier or 2-tier pricing blocks. ## Pre-Delivery Review Before finishing any UI change: - Search modified `.tsx` files for any banned clichés or Unicode pictographic emojis. - Confirm every number in metrics uses `tabular-nums`. - Confirm all buttons and links have accessible contrast >= 4.5:1.
02 / 5 项定量检查阈值
PageRedline 静态扫描器核验的硬性红线指标
| 检测指标 | 克制达标线 |
|---|---|
| 品牌主色令牌数 | ≤ 3 个(1 背景 + 1 主墨色 + 1 强调色) |
| H1 与正文字号比 | ≥ 2.2×(清晰建立首屏视觉主次) |
| 字体族数量上限 | ≤ 2 种(1 衬线或几何无衬线 + 1 等宽体) |
| 结构化标题/按钮 Emoji | 严格 0 个(避免廉价营销感) |
| Hero 紫/靛渐变光晕 | 0 个无意义背景光斑,优先用 1px 实线分割 |
03 / 自动扣分禁用词表(中英共 39 词)
以下词汇出现在标题或按钮中会直接触发静态扣分
English Banned Clichés (24)
delveelevatesuperchargeunlockseamlessseamlesslygame-changergame changerrevolutionizerevolutionarynext-gennext generationall-in-oneunleashempowersuperpowerseffortlesslycutting-edgeskyrocketturbochargereimaginetransformativesynergy10x your
中文高频 AI 套话禁用词 (15)
一站式全方位赋能颠覆性降本增效极致体验重新定义开启智能时代智能赋能无限可能轻松驾驭全新升级重塑未来无缝衔接全链路赋能倍速提升
需要完整设计系统与 5 套 90+ 模板源码?