Rules for an AI coding agent to filter out generic AI-generated UI designs, text, and code.
JavaScript accessibilityagent-skillsai-agentsai-coding-agentai-slopanti-slopclaude-codecopywritingdesign-rulesui-design
v3.0.0: package antislop as agent skills, plugin, and antislop-ai picker CLI
miqdadbadzubair-design2f5a5adaa1ce
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.jsonnew file mode 100644index 0000000..3a2589f--- /dev/null+++ b/.claude-plugin/marketplace.json@@ -0,0 +1,15 @@+{+ "name": "anti-slop",+ "description": "The antislop skill/plugin: Anti AI Slop, Design & Copy Rules for AI coding agents.",+ "owner": {+ "name": "antislop"+ },+ "plugins": [+ {+ "name": "antislop",+ "source": "./",+ "version": "3.0.0",+ "description": "Anti AI Slop: Design & Copy Rules. A rules filter for AI coding agents that stops generic AI slop UI and copy. Loads as five skills."+ }+ ]+}diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.jsonnew file mode 100644index 0000000..8e5fcbe--- /dev/null+++ b/.claude-plugin/plugin.json@@ -0,0 +1,20 @@+{+ "name": "antislop",+ "displayName": "antislop",+ "version": "3.0.0",+ "description": "Anti AI Slop: Design & Copy Rules. A rules filter for AI coding agents that stops generic AI slop UI and copy. Loads as five skills.",+ "author": {+ "name": "antislop"+ },+ "repository": "https://github.com/miqdadbadjuber/anti-slop",+ "license": "MIT",+ "keywords": ["ai-slop", "design-rules", "copy-rules", "agent-skills", "ui", "accessibility"],+ "skills": ["./skills/"],+ "mcpServers": {+ "antislop-contrast": {+ "command": "python",+ "args": ["${CLAUDE_PLUGIN_ROOT}/skills/antislop-human/contrast-mcp.py"],+ "env": {}+ }+ }+}diff --git a/README.md b/README.mdindex 51dba63..6e868a4 100644--- a/README.md+++ b/README.md@@ -5,6 +5,7 @@<p align="center"><a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-2ea44f?style=for-the-badge" alt="License: MIT"></a><a href="https://github.com/miqdadbadjuber/anti-slop/releases"><img src="https://img.shields.io/github/v/release/miqdadbadjuber/anti-slop?label=version&style=for-the-badge&color=1f6feb" alt="Version"></a>+ <a href="https://skills.sh/miqdadbadjuber/anti-slop"><img src="https://skills.sh/b/miqdadbadjuber/anti-slop" alt="skills.sh"></a></p># antislop@@ -24,64 +25,50 @@ The core prevents slop but cannot invent direction. `DESIGN.md` (yours) supplies## Install-**The easy way (wizard).** Download the core once and tell your agent to read it. The wizard installs the skills you pick and sets up the pointer for you.+antislop is a set of **standard agent skills** (one folder per skill, `SKILL.md`) you can install as a package. The core is always loaded; the skills load only for the task at hand. Pick one of these three paths.++**1. The picker (recommended).** One command, then choose. It shows the antislop banner, lists the skills with the core locked on, and asks for project or global:```bash-curl -o antislop.md https://raw.githubusercontent.com/miqdadbadjuber/anti-slop/main/antislop.md+npx antislop-ai```-> "Read `antislop.md` and follow its install instructions. I want the UI skill."+**2. The skills directory.** antislop is listed on [skills.sh](https://skills.sh/miqdadbadjuber/anti-slop), the open directory for agent skills:-That's it. The pointer block is the source of truth: every later session loads the core plus only the skills you installed. Say "core only" to skip skills entirely. For a permanent setup that needs no first-run chat, add one line to your entry file (`AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, etc.): "For UI or copy work, read `antislop.md`."+```bash+npx skills add miqdadbadjuber/anti-slop+```-**Manual (the 3-file system).**+Add `--all` for every skill, `-g` for a global install, or `--skill <name>` for a single one. Run `--list` first to see what is available.-```-Project root/-├── AGENTS.md (or CLAUDE.md, GEMINI.md, etc.) # router: tells the agent what to read-├── DESIGN.md # direction: the soul of your UI (yours)-└── antislop.md # filter: from this repo-```+skills.sh reads the skill folders straight from this repository, so the listing appears as soon as the repo is live; there is no separate setup step.-```bash-curl -o antislop.md https://raw.githubusercontent.com/miqdadbadjuber/anti-slop/main/antislop.md+**3. The plugin (Claude Code).** Add the marketplace once, then install the plugin:++```text+/plugin marketplace add https://github.com/miqdadbadjuber/anti-slop+/plugin install antislop@anti-slop```-`antislop.md` alone is a complete filter. Skills add depth for one concern at a time; the wizard installs them, or download any you want the same way (`curl -o <skill-name>.md`).+Every skill is a folder of the open Agent Skills standard (`<name>/SKILL.md`), so it drops into Claude Code (`.claude/skills/`), Codex, Antigravity, and any other agent that reads the standard.-`antislop-human` also runs `scripts/contrast-check.py` to verify color pairs you cannot judge by eye. Fetch it the same way, if you want it (optional: the skill falls back to the formula and reference table without it):+**Manual (single file, no packaging).** The core `antislop.md` alone remains a complete filter you can paste into any chat window. Download it and tell your agent to read it; the First-Run wizard inside it installs skills the manual way:```bash-curl -o scripts/contrast-check.py https://raw.githubusercontent.com/miqdadbadjuber/anti-slop/main/scripts/contrast-check.py-```--Then add a pointer block to your entry file, listing exactly the skills you installed:--```md-<!-- antislop: auto-managed block, do not edit -->-## antislop-For UI, copy, people, or mobile layout work, read `antislop.md` (core) and then the skill for the task:-- UI / visual: `antislop-ui.md`-- Copy & text: `antislop-copywriting.md`-- People: `antislop-human.md`-- Mobile / responsive: `antislop-layoutmobile.md`-Before starting, ask the user when antislop applies: during the work, or after it is done.+curl -o antislop.md https://raw.githubusercontent.com/miqdadbadjuber/anti-slop/main/antislop.md```-You can optionally put a dial line in `DESIGN.md` (`Dial: ENERGY 2 / RHYTHM 3 / MOTION 1`) to set the liveliness target directly. No `DESIGN.md`? The agent labels any output *"draft without direction"* instead of passing it off as a deliverable.-## Skills| Skill | What it covers | Ships in ||-------|----------------|----------|+| `antislop` | The core filter: rules, tiers, Delivery Gate, liveliness | v3.0.0 || `antislop-ui` | UI / visual: layout, color, components, decoration, motion, structure | v2.2.0 || `antislop-copywriting` | Copy & text: headlines, CTAs, tone, fake stats, anti-AI-writing patterns, markdown hygiene | v2.3.0 |-| `antislop-human` | Human: contrast, keyboard, focus, states | v2.4.0 |+| `antislop-human` | Human: contrast (with the checker), keyboard, focus, states | v2.4.0 || `antislop-layoutmobile` | Mobile layout: responsive breakpoints, grids, overflow, tap targets, navigation | v2.5.0 |-| `antislop-docs` | Documentation: READMEs, API references, changelogs, tutorials | v2.6.0 (planned) |-| `antislop-identity` | Identity & naming: product names, taglines, brand voice | v2.7.0 (planned) |-Pick what matches the work: UI work → `antislop-ui`, copy work → `antislop-copywriting`, people work → `antislop-human`, mobile layout work → `antislop-layoutmobile`, more than one → "All", or none (the core alone is a complete filter).+Pick what matches the work: UI work → `antislop-ui`, copy work → `antislop-copywriting`, people work → `antislop-human`, mobile layout work → `antislop-layoutmobile`, more than one → install several, or none (the core alone is a complete filter).## Usage Modes@@ -92,7 +79,7 @@ antislop is used one of two ways, chosen at the start of a session:## Roadmap-Heading to **v3.0.0**: the whole system packaged as an installable skill/plugin (Claude Code, Codex, Cursor, etc.) with a `/antislop` router. One skill ships per version until then. See [ROADMAP.md](ROADMAP.md).+**v3.0.0 shipped**: antislop is packaged as installable skills. See [ROADMAP.md](ROADMAP.md). The skill plan that built toward it (one skill per version) is complete; `antislop-docs` and `antislop-identity` are candidates for after v3.## FAQ@@ -100,10 +87,10 @@ Heading to **v3.0.0**: the whole system packaged as an installable skill/pluginNo, a filter. It does not prescribe colors, fonts, or layouts. It rejects technique without purpose and requires liveliness; direction is yours.**Which agents does it work with?**-Any agent that reads plain Markdown: Claude Code, Codex, Cursor, Gemini CLI, and others. No plugin or special packaging is needed in v2.x; v3.0.0 adds installable packaging.+Any agent that reads plain Markdown: Claude Code, Codex, Cursor, Gemini CLI, and others. The packaged install uses the open Agent Skills standard (folder per skill), so skills drop into any tool that reads it. The single-file `antislop.md` still works everywhere else.**What is a "skill"?**-An additive file that goes deeper into one concern (UI, copywriting, accessibility, and so on). It references the core rules by number and never duplicates them, so adding a skill does not change the core.+A folder that goes deeper into one concern (UI, copywriting, accessibility, and so on), holding a `SKILL.md` with its rules. It references the core rules by number and never duplicates them, so adding a skill does not change the core.**What are DURING and AFTER?**The two usage modes: DURING applies the rules while building, AFTER audits finished work. You pick one at the start of a session.diff --git a/ROADMAP.md b/ROADMAP.mdindex fc7286d..516cd56 100644--- a/ROADMAP.md+++ b/ROADMAP.md@@ -4,21 +4,29 @@## Where we are-The latest release is **v2.5.0**. antislop is now a **system**: a lean, always-loaded **core** (`antislop.md`, the complete rules filter, unchanged and backward compatible) plus four **skills**: `antislop-ui` (UI / visual), `antislop-copywriting` (copy & text), `antislop-human` (human / accessibility), and `antislop-layoutmobile` (mobile / responsive). v2.5.0 adds `antislop-layoutmobile`: a mobile layout must reflow into a distinct state, not stay a squeezed desktop. It covers breakpoints, scale, grids, overflow, tap targets, and navigation (bottom nav, hamburger menus, and fixed nav bars that must not cover content).+The latest release is **v3.0.0**. antislop is now a **packaged system**: a lean, always-loaded **core** plus four **skills**, each shipped as a standard agent skill folder (`skills/<name>/SKILL.md`):-The **First-Run Install Wizard** is still the install path: download `antislop.md` once, tell your agent to read it, and the agent walks you through choosing skills, downloads them into the same folder, and sets up the pointer for you. It is an offer, not a requirement: `antislop.md` alone remains a complete filter.+- `antislop`: the core rules filter (rules, tiers, Delivery Gate, liveliness)+- `antislop-ui`: UI / visual+- `antislop-copywriting`: copy & text+- `antislop-human`: human / accessibility, home of the contrast checker+- `antislop-layoutmobile`: mobile / responsive++The system installs three ways from one repo: the interactive picker (`npx antislop-ai`), the skills directory (`npx skills add miqdadbadjuber/anti-slop`, listed on skills.sh), and the Claude Code plugin marketplace (`.claude-plugin/plugin.json`). The contrast checker is also exposed as an MCP tool inside the plugin.++The **First-Run Install Wizard** still lives inside `antislop.md` as the manual path. The single-file core remains a complete filter you can paste into any chat window.The core still contains 38 rules across three tiers (Hard Gate, Purpose-Gate, Quality Locks), a Liveliness Toolkit, a mandatory Delivery Gate, and the two usage modes (During / After). None of that changed.-## Where we are going+## How we got here-antislop grows toward v3.0.0 by adding one concern per version, each as a separate **skill**. The core stays lean; skills stay additive. Versioning follows a simple rule:+v3.0.0 was reached by adding one concern per version, each as a separate **skill**:> Each +0.1 version ships exactly one new skill.-This keeps the filter pull-only-what-you-need, and it makes the v3 packaging mechanical rather than a rewrite. Occasional +0.1 patches ship something that is not a skill, like v2.4.1's plain-English `guide.md`; those do not change the skill plan.+That kept the filter pull-only-what-you-need and made the v3 packaging mechanical rather than a rewrite. Occasional +0.1 patches shipped something that is not a skill, like v2.4.1's plain-English `guide.md`; those did not change the skill plan.-### The skill plan+### The skill plan (complete)| Version | Skill | Concern ||---------|-------|---------|@@ -26,17 +34,18 @@ This keeps the filter pull-only-what-you-need, and it makes the v3 packaging mec| v2.3.0 | `antislop-copywriting` | Copy and text: headlines, CTAs, tone, fake stats, markdown hygiene || v2.4.0 | `antislop-human` | Human: contrast, keyboard, focus, states (home of the contrast checker) || v2.5.0 | `antislop-layoutmobile` | Mobile layout: responsive breakpoints, grids, overflow, tap targets, navigation |-| v2.6.0 | `antislop-docs` | Documentation: READMEs, API references, changelogs, tutorials |-| v2.7.0 | `antislop-identity` | Identity and naming: product names, taglines, brand voice |-### v3.0.0: the skill/plugin+`antislop-docs` and `antislop-identity` are candidates for after v3, not part of the shipped plan.++## v3.0.0: the skill/plugin-- One `SKILL.md` per skill (open Agent Skills standard)-- A `/antislop` router command that loads only the skill the task needs-- Placement for Claude Code, Codex CLI, Antigravity CLI, Gemini CLI, and Cursor-- An optional MCP server for mechanical checks (e.g. contrast)+What v3.0.0 shipped:-Target release: end of Q3 2026.+- One folder per skill, `skills/<name>/SKILL.md` (open Agent Skills standard)+- Two distribution doors from one repo: `npx skills add miqdadbadjuber/anti-slop` (skills.sh) and the `.claude-plugin/plugin.json` marketplace+- A custom picker CLI (`npx antislop-ai`): banner, skill list with the core locked on, project or global choice, installer that writes the skill folders and the pointer+- The contrast checker as an MCP tool inside the plugin+- MIT license## Status@@ -48,9 +57,12 @@ Target release: end of Q3 2026.- [x] v2.4.1 - `guide.md`: plain-English guide for people new to antislop (not a skill); fixes for issues #1, #2, #3, #6, #7- [x] v2.4.2 - skill checklist polarity fix (#9) and docs cleanup, merged from PRs #8 and #10- [x] v2.5.0 - `antislop-layoutmobile` (breakpoints, scale, grids, overflow, tap targets, navigation)-- [ ] v2.6.0 - `antislop-docs`-- [ ] v2.7.0 - `antislop-identity`-- [ ] v3.0.0 - skill/plugin packaging+- [x] v3.0.0 - skill/plugin packaging: `skills/` folders, two doors, picker CLI, MCP contrast tool, MIT license++## After v3++- [ ] `antislop-docs` (skill candidate)+- [ ] `antislop-identity` (skill candidate)## Not in scopediff --git a/antislop.md b/antislop.mdindex fc0419d..b4a6fee 100644--- a/antislop.md+++ b/antislop.md@@ -10,13 +10,15 @@## First-Run Install Wizard-antislop is a system: this core file plus optional **skill files**, one per concern (`antislop-ui`, `antislop-copywriting`, and so on, shipping one per version). This section installs them once. It is an **offer, not a requirement**: if the user prefers, this file alone remains a complete filter.+antislop is a system: this core file plus optional **skills**, one per concern (`antislop-ui`, `antislop-copywriting`, and so on, each a folder with a `SKILL.md`). This section installs them once. It is an **offer, not a requirement**: if the user prefers, this file alone remains a complete filter.**Skip this section** if the project's entry file (`AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, or the equivalent the running tool reads at session start) already contains an antislop pointer block. That means antislop is already installed. Come back only when the user asks to add or remove a skill.If no antislop pointer exists and this file is being read for the first time, run the wizard:-1. **Declare the setup before doing anything.** Tell the user you will (a) download the skill file(s) they choose into the same folder as this file, and (b) append an antislop pointer block at the end of the project's entry file. Get approval. Never modify the entry file silently.+> If the user can use a terminal, the packaged install is better: run `npx antislop-ai` (interactive picker) or `npx skills add miqdadbadjuber/anti-slop`, then skip this section. The steps below are the manual fallback for chat-only setups.++1. **Declare the setup before doing anything.** Tell the user you will (a) download the skill(s) they choose into `skills/<name>/` subfolders next to this file, and (b) append an antislop pointer block at the end of the project's entry file. Get approval. Never modify the entry file silently.2. **Ask which skills to install** (multi-select, in the user's chat language). List only the skills that exist in this version of antislop:- **1. All** (recommended): install every available skill. Choose this when the work spans UI, copy, people, or mobile layout.- **2. `antislop-ui`** (UI / visual): pick this for building or editing a website, web app, or interface: color, layout, components, decoration, motion.@@ -30,24 +32,24 @@ If no antislop pointer exists and this file is being read for the first time, ru- **1. The user supplies direction (recommended).** They write their own `DESIGN.md`, or answer a few direction questions (identity, personality, palette, typography, mood) and the agent transcribes their answers into `DESIGN.md`. The user is the author; the agent only formats. Never invent example content for `DESIGN.md`.- **2. The agent supplies direction, with an honest warning.** The agent writes the direction itself, stating explicitly that agent-generated style tends toward default AI taste, which is the slop antislop filters, so the result is likely monotonous. If chosen, still ask a minimal brief (product, audience, mood) before building.- **3. The user skips direction for now.** Proceed without a `DESIGN.md`. Any UI built this way must be labeled *"draft without direction"* with dials ENERGY 1 / RHYTHM 1 / MOTION 1 (R-37), and is not a shippable deliverable.-4. **Download the chosen skill file(s)** into the same folder as this file, level with it, pinned to the release tag that matches this version so a newer skill never mixes with an older core. When `antislop-human` is chosen, also download its contrast-check script into a `scripts/` subfolder:+4. **Download the chosen skill(s)** into `skills/<name>/` subfolders next to this file, pinned to the release tag that matches this version so a newer skill never mixes with an older core. When `antislop-human` is chosen, also download its contrast-check script into the same skill folder:```bash- curl -o antislop-ui.md https://raw.githubusercontent.com/miqdadbadjuber/anti-slop/v2.5.0/antislop-ui.md- curl -o antislop-copywriting.md https://raw.githubusercontent.com/miqdadbadjuber/anti-slop/v2.5.0/antislop-copywriting.md- curl -o antislop-human.md https://raw.githubusercontent.com/miqdadbadjuber/anti-slop/v2.5.0/antislop-human.md- curl -o antislop-layoutmobile.md https://raw.githubusercontent.com/miqdadbadjuber/anti-slop/v2.5.0/antislop-layoutmobile.md- mkdir -p scripts- curl -o scripts/contrast-check.py https://raw.githubusercontent.com/miqdadbadjuber/anti-slop/v2.5.0/scripts/contrast-check.py+ mkdir -p skills/antislop-ui skills/antislop-copywriting skills/antislop-human skills/antislop-layoutmobile+ curl -o skills/antislop-ui/SKILL.md https://raw.githubusercontent.com/miqdadbadjuber/anti-slop/v3.0.0/skills/antislop-ui/SKILL.md+ curl -o skills/antislop-copywriting/SKILL.md https://raw.githubusercontent.com/miqdadbadjuber/anti-slop/v3.0.0/skills/antislop-copywriting/SKILL.md+ curl -o skills/antislop-human/SKILL.md https://raw.githubusercontent.com/miqdadbadjuber/anti-slop/v3.0.0/skills/antislop-human/SKILL.md+ curl -o skills/antislop-layoutmobile/SKILL.md https://raw.githubusercontent.com/miqdadbadjuber/anti-slop/v3.0.0/skills/antislop-layoutmobile/SKILL.md+ curl -o skills/antislop-human/contrast-check.py https://raw.githubusercontent.com/miqdadbadjuber/anti-slop/v3.0.0/skills/antislop-human/contrast-check.py```5. **Append the pointer block at the END of the project's entry file** (the file the running tool reads at session start: `CLAUDE.md` for Claude Code, `AGENTS.md` for Codex, `GEMINI.md` for Gemini CLI, and so on). If that file does not exist, create it. Never modify existing content:```md<!-- antislop: auto-managed block, do not edit -->## antislopFor UI, copy, people, or mobile layout work, read `antislop.md` (core) and then the skill for the task:- - UI / visual: `antislop-ui.md`- - Copy & text: `antislop-copywriting.md`- - People: `antislop-human.md`- - Mobile / responsive: `antislop-layoutmobile.md`+ - UI / visual: `skills/antislop-ui/SKILL.md`+ - Copy & text: `skills/antislop-copywriting/SKILL.md`+ - People: `skills/antislop-human/SKILL.md`+ - Mobile / responsive: `skills/antislop-layoutmobile/SKILL.md`Before starting, ask the user when antislop applies: during the work, or after it is done.```If an older antislop block exists (even without the marker), replace just that block instead of appending a duplicate.@@ -231,7 +233,7 @@ These rules protect honesty, function, and accessibility. Breaking any of them i- **FORBIDDEN**: em dash character (`—`) in any text- Use comma (`,`), period (`.`), colon (`:`), or parentheses `()` instead- Text must feel natural and human-- **Carve-out**: documentation of this rule is exempt: the numbered section headings in this file (`R-XX — Title` rules and `C-1` to `C-5` principles), the em dash example in Part 1, the rule's own definition, any Delivery Gate item that quotes it, and the `Em Dashes` section in `antislop-copywriting.md`. These are documentation structure, not UI text.+- **Carve-out**: documentation of this rule is exempt: the numbered section headings in this file (`R-XX — Title` rules and `C-1` to `C-5` principles), the em dash example in Part 1, the rule's own definition, any Delivery Gate item that quotes it, and the `Em Dashes` section in the copywriting skill (`skills/antislop-copywriting/SKILL.md`). These are documentation structure, not UI text.#### R-03 — Mobile Responsivenessdiff --git a/cli/.gitignore b/cli/.gitignorenew file mode 100644index 0000000..da6d78d--- /dev/null+++ b/cli/.gitignore@@ -0,0 +1,2 @@+node_modules/+skills/diff --git a/cli/index.mjs b/cli/index.mjsnew file mode 100644index 0000000..59f1e30--- /dev/null+++ b/cli/index.mjs@@ -0,0 +1,106 @@+#!/usr/bin/env node+import pc from 'picocolors'+import { intro, outro, select, multiselect, confirm, isCancel, cancel, log, spinner } from '@clack/prompts'+import { banner } from './lib/banner.mjs'+import {+ CORE,+ skillSourceDir,+ resolveTargets,+ detectConflicts,+ installSkills,+ updatePointers,+} from './lib/install.mjs'++const EXTRA_SKILLS = [+ { value: 'antislop-ui', label: 'antislop-ui', hint: 'UI and visual design rules' },+ { value: 'antislop-copywriting', label: 'antislop-copywriting', hint: 'copywriting and text rules' },+ { value: 'antislop-human', label: 'antislop-human', hint: 'accessibility, with the contrast checker' },+ { value: 'antislop-layoutmobile', label: 'antislop-layoutmobile', hint: 'mobile layout rules' },+]++function stop(message) {+ cancel(message)+ process.exit(0)+}++async function main() {+ if (process.argv.includes('--version') || process.argv.includes('-v')) {+ console.log('antislop 3.0.0')+ return+ }++ console.log(banner())+ intro('Install antislop into your agent setup')++ if (!skillSourceDir()) {+ stop('Could not find the antislop skills. Reinstall the antislop package.')+ }++ log.step('Choose your skills')+ console.log(` ${pc.green('●')} ${pc.bold(CORE)} ${pc.dim('core rules, always on')}`)++ const extra = await multiselect({+ message: 'Extra skills to install',+ options: EXTRA_SKILLS,+ required: false,+ })+ if (isCancel(extra)) stop('Install cancelled.')+ const skills = [CORE, ...(extra ?? [])]++ log.step('Choose where antislop goes')+ const location = await select({+ message: 'Install location',+ options: [+ { value: 'project', label: 'This project', hint: 'only this folder' },+ { value: 'global', label: 'Everywhere', hint: 'all your projects' },+ ],+ })+ if (isCancel(location)) stop('Install cancelled.')++ const targets = resolveTargets(location)+ await log.message(+ 'Installing into:\n' + targets.map((t) => ' ' + t.path).join('\n'),+ { symbol: pc.cyan('│') }+ )++ const conflicts = detectConflicts({ skills, targets })+ let overwrite = false+ if (conflicts.length > 0) {+ const answer = await select({+ message: `${conflicts.length} skill folder(s) already exist. What should I do?`,+ options: [+ { value: 'overwrite', label: 'Overwrite them', hint: 'replace existing files' },+ { value: 'keep', label: 'Keep what is there', hint: 'skip existing folders' },+ ],+ })+ if (isCancel(answer)) stop('Install cancelled.')+ overwrite = answer === 'overwrite'+ }++ const proceed = await confirm({+ message: `Install ${skills.length} skill(s) now?`,+ initialValue: true,+ })+ if (isCancel(proceed) || proceed === false) stop('Install cancelled.')++ const spin = spinner()+ spin.start('Installing skills...')+ const written = installSkills({ skills, targets, overwrite })+ if (location === 'project') {+ updatePointers({ targets })+ }+ spin.stop('Done.')++ const agentCount = new Set(written.map((w) => w.agent.id)).size+ if (written.length > 0) {+ outro(`Installed ${written.length} skill(s) into ${agentCount} agent folder(s).`)+ } else {+ outro('Nothing new to install. Existing folders were kept.')+ }+ console.log(pc.dim('antislop is ready. The next agent session loads it.'))+}++main().catch((err) => {+ console.error(err)+ process.exit(1)+})diff --git a/cli/lib/banner.mjs b/cli/lib/banner.mjsnew file mode 100644index 0000000..4ca3e5b--- /dev/null+++ b/cli/lib/banner.mjs@@ -0,0 +1,21 @@+import pc from 'picocolors'++const LOGO = [+ ' █████╗ ███╗ ██╗████████╗██╗███████╗██╗ ██████╗ ██████╗ ███████╗██╗ ██╗██╗██╗ ██╗ ███████╗',+ '██╔══██╗████╗ ██║╚══██╔══╝██║██╔════╝██║ ██╔═══██╗██╔══██╗ ██╔════╝██║ ██╔╝██║██║ ██║ ██╔════╝',+ '███████║██╔██╗ ██║ ██║ ██║███████╗██║ ██║ ██║██████╔╝ ███████╗█████╔╝ ██║██║ ██║ ███████╗',+ '██╔══██║██║╚██╗██║ ██║ ██║╚════██║██║ ██║ ██║██╔═══╝ ╚════██║██╔═██╗ ██║██║ ██║ ╚════██║',+ '██║ ██║██║ ╚████║ ██║ ██║███████║███████╗╚██████╔╝██║ ███████║██║ ██╗██║███████╗███████╗███████║',+ '╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚═╝╚══════╝╚══════╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝╚══════╝╚══════╝╚══════╝',+]++export function banner() {+ return [+ '',+ ...LOGO,+ '',+ ' ' + pc.dim('Anti AI Slop: Design & Copy Rules'),+ ' ' + pc.dim('installer v3.0.0'),+ '',+ ].join('\n')+}diff --git a/cli/lib/install.mjs b/cli/lib/install.mjsnew file mode 100644index 0000000..dc28430--- /dev/null+++ b/cli/lib/install.mjs@@ -0,0 +1,112 @@+import fs from 'node:fs'+import path from 'node:path'+import os from 'node:os'+import { fileURLToPath } from 'node:url'++const __dirname = path.dirname(fileURLToPath(import.meta.url))++export const CORE = 'antislop'++export const AGENTS = [+ { id: 'claude', label: 'Claude Code', dir: '.claude/skills' },+ { id: 'antigravity', label: 'Antigravity', dir: '.agents/skills' },+ { id: 'codex', label: 'Codex', dir: '.codex/skills' },+]++export function skillSourceDir() {+ const bundled = path.join(__dirname, '..', 'skills')+ if (fs.existsSync(bundled)) return bundled+ const repo = path.join(__dirname, '..', '..', 'skills')+ if (fs.existsSync(repo)) return repo+ return null+}++function resolveBase(location) {+ return location === 'global' ? os.homedir() : process.cwd()+}++export function resolveTargets(location) {+ const base = resolveBase(location)+ return AGENTS.map((agent) => ({ agent, path: path.join(base, agent.dir) }))+ .filter((t) => {+ if (location === 'global') return true+ if (t.agent.id === 'claude') return true+ const parent = path.join(base, t.agent.dir.split('/')[0])+ return fs.existsSync(parent)+ })+ .map((t) => ({ ...t, exists: fs.existsSync(t.path) }))+}++export function detectConflicts({ skills, targets }) {+ const conflicts = []+ for (const t of targets) {+ for (const skill of skills) {+ if (fs.existsSync(path.join(t.path, skill))) {+ conflicts.push({ skill, agent: t.agent, path: path.join(t.path, skill) })+ }+ }+ }+ return conflicts+}++function copyDir(src, dest) {+ fs.rmSync(dest, { recursive: true, force: true })+ fs.mkdirSync(dest, { recursive: true })+ for (const entry of fs.readdirSync(src, { withFileTypes: true })) {+ const s = path.join(src, entry.name)+ const d = path.join(dest, entry.name)+ if (entry.isDirectory()) copyDir(s, d)+ else fs.copyFileSync(s, d)+ }+}++export function installSkills({ skills, targets, overwrite = false }) {+ const source = skillSourceDir()+ const written = []+ for (const t of targets) {+ for (const skill of skills) {+ const src = path.join(source, skill)+ if (!fs.existsSync(src)) continue+ const dest = path.join(t.path, skill)+ if (fs.existsSync(dest) && !overwrite) continue+ copyDir(src, dest)+ written.push({ skill, agent: t.agent, path: dest })+ }+ }+ return written+}++const POINTER_START = '<!-- antislop:start -->'+const POINTER_END = '<!-- antislop:end -->'++export function updatePointers({ targets }) {+ const projectRoot = process.cwd()+ const entry = path.join(projectRoot, 'AGENTS.md')++ const coreTarget = targets.find((t) => fs.existsSync(path.join(t.path, CORE)))+ if (!coreTarget) return++ const rel = path+ .relative(projectRoot, path.join(coreTarget.path, CORE, 'SKILL.md'))+ .split(path.sep)+ .join('/')++ const existing = fs.existsSync(entry) ? fs.readFileSync(entry, 'utf8') : ''+ const lines = existing.split(/\r?\n/)+ const startIdx = lines.findIndex((l) => l.trim() === POINTER_START)+ const endIdx = lines.findIndex((l) => l.trim() === POINTER_END)+ const head = startIdx !== -1 && endIdx !== -1 && startIdx < endIdx ? lines.slice(0, startIdx) : lines+ const tail = startIdx !== -1 && endIdx !== -1 && startIdx < endIdx ? lines.slice(endIdx + 1) : []++ const block = [POINTER_START, `@${rel}`, POINTER_END]+ const body = [...head, ...block, ...tail]+ .filter((l, i, arr) => {+ if (l.trim() !== '') return true+ const prev = arr[i - 1]+ return !(prev === undefined || prev.trim() === '')+ })+ .join('\n')+ .trimEnd()++ fs.writeFileSync(entry, body + '\n')+}diff --git a/cli/package-lock.json b/cli/package-lock.jsonnew file mode 100644index 0000000..c779a2c--- /dev/null+++ b/cli/package-lock.json@@ -0,0 +1,87 @@+{+ "name": "antislop",+ "version": "3.0.0",+ "lockfileVersion": 3,+ "requires": true,+ "packages": {+ "": {+ "name": "antislop",+ "version": "3.0.0",+ "license": "MIT",+ "dependencies": {+ "@clack/prompts": "^1.7.0",+ "picocolors": "^1.1.1"+ },+ "bin": {+ "antislop": "index.mjs"+ },+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@clack/core": {+ "version": "1.4.3",+ "resolved": "https://registry.npmjs.org/@clack/core/-/core-1.4.3.tgz",+ "integrity": "sha512-/kr3UWNtdJfxZtPgDqUOmG2pvwlmcLGheex5yiZKdwbzZJxhV+HMNR9QNmyY5cGwTNV6LrR7Jtp+KjhUAP1qBQ==",+ "license": "MIT",+ "dependencies": {+ "fast-wrap-ansi": "^0.2.0",+ "sisteransi": "^1.0.5"+ },+ "engines": {+ "node": ">= 20.12.0"+ }+ },+ "node_modules/@clack/prompts": {+ "version": "1.7.0",+ "resolved": "https://registry.npmjs.org/@clack/prompts/-/prompts-1.7.0.tgz",+ "integrity": "sha512-y7/yvZ2TPAnR9+jnc00klvNNLkJiXFFrQA/hlLCcxA9a2A4zQIOimyFQ9XfwYKiGD1fb5GY8vbKIIgO8d5Tb2A==",+ "license": "MIT",+ "dependencies": {+ "@clack/core": "1.4.3",+ "fast-string-width": "^3.0.2",+ "fast-wrap-ansi": "^0.2.0",+ "sisteransi": "^1.0.5"+ },+ "engines": {+ "node": ">= 20.12.0"+ }+ },+ "node_modules/fast-string-truncated-width": {+ "version": "3.0.3",+ "resolved": "https://registry.npmjs.org/fast-string-truncated-width/-/fast-string-truncated-width-3.0.3.tgz",+ "integrity": "sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g==",+ "license": "MIT"+ },+ "node_modules/fast-string-width": {+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/fast-string-width/-/fast-string-width-3.0.2.tgz",+ "integrity": "sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==",+ "license": "MIT",+ "dependencies": {+ "fast-string-truncated-width": "^3.0.2"+ }+ },+ "node_modules/fast-wrap-ansi": {+ "version": "0.2.2",+ "resolved": "https://registry.npmjs.org/fast-wrap-ansi/-/fast-wrap-ansi-0.2.2.tgz",+ "integrity": "sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q==",+ "license": "MIT",+ "dependencies": {+ "fast-string-width": "^3.0.2"+ }+ },+ "node_modules/picocolors": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",+ "license": "ISC"+ },+ "node_modules/sisteransi": {+ "version": "1.0.5",+ "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",+ "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==",+ "license": "MIT"+ }+ }+}diff --git a/cli/package.json b/cli/package.jsonnew file mode 100644index 0000000..fc5719a--- /dev/null+++ b/cli/package.json@@ -0,0 +1,36 @@+{+ "name": "antislop-ai",+ "version": "3.0.0",+ "description": "Interactive installer for the antislop skills. Anti AI Slop: Design & Copy Rules.",+ "type": "module",+ "bin": {+ "antislop-ai": "index.mjs"+ },+ "license": "MIT",+ "homepage": "https://github.com/miqdadbadjuber/anti-slop",+ "repository": "https://github.com/miqdadbadjuber/anti-slop",+ "keywords": [+ "ai-slop",+ "design-rules",+ "copy-rules",+ "agent-skills",+ "ui",+ "accessibility"+ ],+ "engines": {+ "node": ">=18"+ },+ "files": [+ "index.mjs",+ "lib/",+ "skills/"+ ],+ "scripts": {+ "sync-skills": "node scripts/sync-skills.mjs",+ "prepublishOnly": "npm run sync-skills"+ },+ "dependencies": {+ "@clack/prompts": "^1.7.0",+ "picocolors": "^1.1.1"+ }+}diff --git a/cli/scripts/smoke-test.mjs b/cli/scripts/smoke-test.mjsnew file mode 100644index 0000000..d6f910f--- /dev/null+++ b/cli/scripts/smoke-test.mjs@@ -0,0 +1,46 @@+#!/usr/bin/env node+import fs from 'node:fs'+import os from 'node:os'+import path from 'node:path'+import { fileURLToPath } from 'node:url'+import { spawnSync } from 'node:child_process'++const __dirname = path.dirname(fileURLToPath(import.meta.url))+const worker = path.join(__dirname, 'smoke-worker.mjs')++function tree(dir, prefix = '') {+ const out = []+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {+ const p = path.join(dir, entry.name)+ if (entry.isDirectory()) {+ out.push(prefix + entry.name + '/')+ out.push(...tree(p, prefix + ' '))+ } else {+ out.push(prefix + entry.name)+ }+ }+ return out+}++const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'antislop-smoke-'))+const result = spawnSync(process.execPath, [worker], { cwd: tmp, encoding: 'utf8' })+console.log('--- worker output ---')+console.log(result.stdout.trim())+if (result.status !== 0) console.log('worker stderr:', result.stderr)++console.log('\n--- files written to temp project ---')+console.log(tree(tmp).join('\n'))++const agentsPath = path.join(tmp, 'AGENTS.md')+if (fs.existsSync(agentsPath)) {+ console.log('\n--- AGENTS.md ---')+ console.log(fs.readFileSync(agentsPath, 'utf8'))+} else {+ console.log('\nAGENTS.md was not created (pointer step skipped).')+}++const coreSkill = path.join(tmp, '.claude', 'skills', 'antislop', 'SKILL.md')+console.log('\ncore SKILL.md exists:', fs.existsSync(coreSkill))++fs.rmSync(tmp, { recursive: true, force: true })+console.log('\ncleaned up temp project.')diff --git a/cli/scripts/smoke-worker.mjs b/cli/scripts/smoke-worker.mjsnew file mode 100644index 0000000..740d5a7--- /dev/null+++ b/cli/scripts/smoke-worker.mjs@@ -0,0 +1,30 @@+import fs from 'node:fs'+import path from 'node:path'+import { skillSourceDir, resolveTargets, detectConflicts, installSkills, updatePointers } from '../lib/install.mjs'++const skills = ['antislop', 'antislop-ui']++const targets = resolveTargets('project')+let conflicts = detectConflicts({ skills, targets })+let written = installSkills({ skills, targets, overwrite: false })+updatePointers({ targets })++console.log('cwd:', process.cwd())+console.log('A targets:', targets.map((t) => `${t.agent.id}@${t.path} exists=${t.exists}`).join(' | '))+console.log('A conflicts:', conflicts.length, '(fresh project, expect 0)')+console.log('A written:', written.map((w) => `${w.agent.id}:${w.skill}`).join(', '))++conflicts = detectConflicts({ skills, targets })+written = installSkills({ skills, targets, overwrite: false })+console.log('B conflicts:', conflicts.length, '(expect 2)')+console.log('B written:', written.length, '(expect 0)')++written = installSkills({ skills, targets, overwrite: true })+console.log('C written:', written.length, '(expect 2)')++const globalTargets = resolveTargets('global')+console.log('D global targets:', globalTargets.map((t) => `${t.agent.id}@${t.path}`).join(' | '))++const src = fs.readFileSync(path.join(skillSourceDir(), 'antislop-ui', 'SKILL.md'), 'utf8')+const dst = fs.readFileSync(path.join(process.cwd(), '.claude', 'skills', 'antislop-ui', 'SKILL.md'), 'utf8')+console.log('E antislop-ui SKILL.md identical:', src === dst)diff --git a/cli/scripts/sync-skills.mjs b/cli/scripts/sync-skills.mjsnew file mode 100644index 0000000..8b576a7--- /dev/null+++ b/cli/scripts/sync-skills.mjs@@ -0,0 +1,26 @@+import fs from 'node:fs'+import path from 'node:path'+import { fileURLToPath } from 'node:url'++const __dirname = path.dirname(fileURLToPath(import.meta.url))+const repoRoot = path.join(__dirname, '..', '..')+const repoSkills = path.join(repoRoot, 'skills')+const cliSkills = path.join(__dirname, '..', 'skills')++const CORE_FRONTMATTER = [+ '---',+ 'name: antislop',+ 'description: "Anti AI Slop: Design & Copy Rules. The core rules filter for AI coding agents. Load always to stop generic AI slop."',+ 'allowed-tools: Bash(curl *) Bash(mkdir *) Read Write Edit Glob Grep',+ '---',+ '',+].join('\n')++const coreBody = fs.readFileSync(path.join(repoRoot, 'antislop.md'), 'utf8')+ .replace(/\r\n/g, '\n')+ .trim()+fs.writeFileSync(path.join(repoSkills, 'antislop', 'SKILL.md'), CORE_FRONTMATTER + coreBody + '\n')++fs.rmSync(cliSkills, { recursive: true, force: true })+fs.cpSync(repoSkills, cliSkills, { recursive: true })+console.log('Regenerated skills/antislop/SKILL.md from antislop.md and synced to cli/skills/')diff --git a/guide.md b/guide.mdindex f3e1875..2401699 100644--- a/guide.md+++ b/guide.md@@ -31,23 +31,53 @@ One thing antislop does not do: make things pretty. It removes slop. If you have## What you need-One file: `antislop.md`, and the AI assistant you already use.+An AI assistant, and antislop itself. The easiest way in is one command in the terminal:-The file holds all the rules the AI follows, plus the wizard that installs skills for you. Nothing else is required. Skills are optional add-ons; you do not need any to start.+```bash+npx antislop-ai+```++It shows you what antislop has, you pick the skills you want and where to put them, and it sets everything up. No terminal? There is a manual way below that only needs one file.++The main file, `antislop.md`, holds all the rules and the wizard that installs skills manually. Skills are optional add-ons; you do not need any to start.## What is a skill?-A skill is an optional file that goes deeper into one concern. The core works alone; a skill adds depth for one topic.+A skill is an optional folder (with a `SKILL.md` inside) that goes deeper into one concern. The core works alone; a skill adds depth for one topic.- `antislop-ui`: look and feel. Layout, color, parts of the page, animation.- `antislop-copywriting`: the text. Headlines, buttons, tone, made-up statistics.- `antislop-human`: the people. Readable colors, keyboard use, clear focus, and button states.+- `antislop-layoutmobile`: the small screen. Layout that reflows on a phone, tap targets, navigation.Pick the one that matches your work. UI work means `antislop-ui`. Copy work means `antislop-copywriting`. People work means `antislop-human`. Mobile layout work means `antislop-layoutmobile`. More than one? Ask for "All". None? The core alone is enough.## How to install-Three steps.+**The one-command way.** Run this in the terminal:++```bash+npx antislop-ai+```++Pick the skills you want, choose "this project" or "everywhere", and antislop installs itself. The core is always on; the skills load only for the work you do.++Or install straight from the skills directory, the open directory for agent skills:++```bash+npx skills add miqdadbadjuber/anti-slop+```++Add `--all` for every skill, `-g` for a global install, or `--skill <name>` for a single one. Run `--list` first to see what is available. The skills directory reads the skills straight from the GitHub repository, so it works as soon as the repository is live; there is no separate setup step.++**The plugin (Claude Code).** If you use Claude Code, add the marketplace once, then install the plugin:++```text+/plugin marketplace add https://github.com/miqdadbadjuber/anti-slop+/plugin install antislop@anti-slop+```++**The manual way.** Three steps. Use this when you want no packaging at all, or a chat window you cannot run commands in.**1. Download `antislop.md` once.** Two ways:@@ -72,7 +102,7 @@ If you pasted the contents instead of giving the file, say: "Follow the installIt confirms which skills you want and asks when antislop should apply: while the AI is working (during), or after the work is done, to check it (after). Pick "during" for new work.-Done. Want to skip the wizard? There is a manual setup too; see the README, the product's main page, [here](README.md).+Done. Want the one-command install instead? See the README, the product's main page, [here](README.md).## Why is one file enough?@@ -80,14 +110,14 @@ The main file holds everything: the rules and the wizard. Skills are optional de## Where is this going?-Every new version of antislop adds one skill. So far: UI, copywriting, people, and mobile layout. Next up: documentation and identity. The end goal is v3.0.0, the whole system packaged as an installable plugin (an add-on you install once, like an app). See the roadmap, the page that lists what is coming next, [here](ROADMAP.md).+The skill plan is complete. antislop v3.0.0 is now packaged: installable as skills, installable as a plugin, and still available as one file. See the roadmap, the page that lists what is coming next, [here](ROADMAP.md).## Words used here- **Slop**: output that looks or reads generic and AI-made.- **Agent**: another word for your AI assistant, like ChatGPT, Claude, or Gemini.- **Core**: `antislop.md`, the main file that holds all the rules and the wizard.-- **Skill**: an optional file that goes deeper into one concern.+- **Skill**: an optional folder (`<name>/SKILL.md`) that goes deeper into one concern. The core works alone; a skill adds depth for one topic.- **Copy**: the words on a page.- **Contrast**: how clearly text stands out from its background.- **Wizard**: the install instructions inside `antislop.md`. When you tell your AI to read the file, it follows them and asks you questions.diff --git a/antislop-copywriting.md b/skills/antislop-copywriting/SKILL.mdsimilarity index 98%rename from antislop-copywriting.mdrename to skills/antislop-copywriting/SKILL.mdindex aa1d794..82c283e 100644--- a/antislop-copywriting.md+++ b/skills/antislop-copywriting/SKILL.md@@ -1,3 +1,8 @@+---+name: antislop-copywriting+description: "Copy and text skill for antislop. Use when writing or editing prose: headlines, tone, CTAs, and anti-AI-writing patterns. Load with the core."+allowed-tools: Read Write Edit Glob Grep+---# antislop-copywriting> Anti AI Slop: Design & Copy Rules. Copy & Text skilldiff --git a/antislop-human.md b/skills/antislop-human/SKILL.mdsimilarity index 92%rename from antislop-human.mdrename to skills/antislop-human/SKILL.mdindex 0ac8677..0b4dbb3 100644--- a/antislop-human.md+++ b/skills/antislop-human/SKILL.md@@ -1,3 +1,8 @@+---+name: antislop-human+description: "Human and accessibility skill for antislop. Contrast, keyboard, focus, and states for real people. Includes the contrast checker."+allowed-tools: Bash(python *) Read Write Edit Glob Grep+---# antislop-human> Anti AI Slop: Design & Copy Rules. Human skill@@ -42,15 +47,15 @@The home of the contrast checker. Three layers, from most to least convenient:-**The script.** When a script runtime is available and the file is present, run it instead of computing by hand:+**The script.** When a script runtime is available and the file is present, run it instead of computing by hand. The script ships in this skill's folder (`contrast-check.py`, next to this `SKILL.md`):```bash-python scripts/contrast-check.py "#FFFFFF" "#777777"+python "${CLAUDE_SKILL_DIR}/contrast-check.py" "#FFFFFF" "#777777"# normal text: FAIL (4.48 < 4.5)# large text: PASS (4.48 >= 3.0)```-The script exists so agents stop hallucinating AA. It takes two hex colors and prints the ratio and the verdict for both text sizes. It ships with the skill; if it is missing from an older setup, the formula and table below are complete on their own. Never block on the script.+If the `${CLAUDE_SKILL_DIR}` variable is not available in this agent, point the script path at this skill's folder directly. The script exists so agents stop hallucinating AA. It takes two hex colors and prints the ratio and the verdict for both text sizes. If the file is missing, the formula and table below are complete on their own. Never block on the script.**The formula (WCAG 2.x).**diff --git a/scripts/contrast-check.py b/skills/antislop-human/contrast-check.pysimilarity index 85%rename from scripts/contrast-check.pyrename to skills/antislop-human/contrast-check.pyindex aff9c2d..9764764 100644--- a/scripts/contrast-check.py+++ b/skills/antislop-human/contrast-check.py@@ -10,9 +10,9 @@ Prints the contrast ratio and a PASS/FAIL verdict for normal text (4.5:1)and large text (3:1, 18px+ per antislop R-25). Exit code 0 only when bothverdicts pass, so scripts can chain on it.---selftest parses the reference table out of antislop-human.md (the doc is-the source of truth, not a list copied into this script) and recomputes-every row with the formula, checking the ratio and both verdict columns.+--selftest parses the reference table out of the SKILL.md next to this script+(the skill doc is the source of truth, not a list copied into this script) and+recomputes every row with the formula, checking the ratio and both verdicts."""import os@@ -69,19 +69,12 @@ def contrast_ratio(color_a, color_b):def reference_doc_path():here = os.path.dirname(os.path.abspath(__file__))- candidates = (- os.path.join(here, os.pardir, "antislop-human.md"),- os.path.join(here, "antislop-human.md"),- os.path.join(os.getcwd(), "antislop-human.md"),- )- for path in candidates:- if os.path.isfile(path):- return path- return None+ candidate = os.path.join(here, "SKILL.md")+ return candidate if os.path.isfile(candidate) else Nonedef parse_reference_rows(path):- """Parse the reference table rows out of antislop-human.md."""+ """Parse the reference table rows out of the skill doc."""rows = []with open(path, encoding="utf-8") as handle:in_table = False@@ -112,15 +105,15 @@ def parse_reference_rows(path):def selftest():doc = reference_doc_path()if doc is None:- print("selftest: antislop-human.md not found next to the script; cannot check the table")+ print("selftest: SKILL.md not found next to the script; cannot check the table")return 2try:rows = parse_reference_rows(doc)except (OSError, ValueError) as exc:- print(f"selftest: could not read the table from antislop-human.md: {exc}")+ print(f"selftest: could not read the table from SKILL.md: {exc}")return 1if not rows:- print("selftest: no reference rows found in antislop-human.md")+ print("selftest: no reference rows found in SKILL.md")return 1failures = 0diff --git a/skills/antislop-human/contrast-mcp.py b/skills/antislop-human/contrast-mcp.pynew file mode 100644index 0000000..a038f2b--- /dev/null+++ b/skills/antislop-human/contrast-mcp.py@@ -0,0 +1,119 @@+#!/usr/bin/env python3+"""Minimal MCP stdio server that exposes the antislop contrast checker as a tool.++Speaks the Model Context Protocol over stdio. All logging must go to stderr;+stdout is reserved for newline-delimited JSON-RPC responses.+"""+import json+import sys++PROTOCOL_VERSION = "2024-11-05"+SERVER_NAME = "antislop-contrast"+SERVER_VERSION = "3.0.0"++TOOLS = [+ {+ "name": "check_contrast",+ "description": "Compute the WCAG contrast ratio between two hex colors and the pass or fail verdict for normal and large text. Use this instead of guessing whether a color pairing meets AA.",+ "inputSchema": {+ "type": "object",+ "properties": {+ "foreground": {"type": "string", "description": "Hex color of the text, for example #777777"},+ "background": {"type": "string", "description": "Hex color of the background, for example #FFFFFF"},+ },+ "required": ["foreground", "background"],+ },+ }+]+++def _channel(c):+ c = c / 255.0+ return c / 12.92 if c <= 0.03928 else ((c + 0.055) / 1.055) ** 2.4+++def relative_luminance(hex_color):+ h = hex_color.strip().lstrip("#")+ if len(h) == 3:+ h = "".join(ch * 2 for ch in h)+ r, g, b = (int(h[i : i + 2], 16) for i in (0, 2, 4))+ return 0.2126 * _channel(r) + 0.7152 * _channel(g) + 0.0722 * _channel(b)+++def contrast_ratio(fg, bg):+ l1, l2 = relative_luminance(fg), relative_luminance(bg)+ lighter, darker = max(l1, l2), min(l1, l2)+ return round((lighter + 0.05) / (darker + 0.05), 2)+++def check_contrast(fg, bg):+ ratio = contrast_ratio(fg, bg)+ return {+ "foreground": fg,+ "background": bg,+ "ratio": ratio,+ "normal_text": {"threshold": 4.5, "pass": ratio >= 4.5},+ "large_text": {"threshold": 3.0, "pass": ratio >= 3.0},+ }+++def _send(msg):+ sys.stdout.write(json.dumps(msg) + "\n")+ sys.stdout.flush()+++def _text(content):+ return {"content": [{"type": "text", "text": content}], "isError": False}+++def _error(message):+ return {"content": [{"type": "text", "text": message}], "isError": True}+++def _reply(msg_id, result):+ _send({"jsonrpc": "2.0", "id": msg_id, "result": result})+++def main():+ for line in sys.stdin:+ line = line.strip()+ if not line:+ continue+ try:+ msg = json.loads(line)+ except json.JSONDecodeError:+ continue++ msg_id = msg.get("id")+ method = msg.get("method")++ if method == "initialize":+ _reply(msg_id, {+ "protocolVersion": PROTOCOL_VERSION,+ "capabilities": {"tools": {}},+ "serverInfo": {"name": SERVER_NAME, "version": SERVER_VERSION},+ })+ elif method == "notifications/initialized":+ pass+ elif method == "ping":+ _reply(msg_id, {})+ elif method == "tools/list":+ _reply(msg_id, {"tools": TOOLS})+ elif method == "tools/call":+ params = msg.get("params") or {}+ name = params.get("name")+ args = params.get("arguments") or {}+ if name == "check_contrast":+ try:+ result = check_contrast(args["foreground"], args["background"])+ _reply(msg_id, _text(json.dumps(result)))+ except Exception as exc:+ _reply(msg_id, _error("check_contrast failed: " + str(exc)))+ else:+ _reply(msg_id, _error("Unknown tool: " + str(name)))+ elif msg_id is not None:+ _reply(msg_id, {})+++if __name__ == "__main__":+ main()diff --git a/antislop-layoutmobile.md b/skills/antislop-layoutmobile/SKILL.mdsimilarity index 98%rename from antislop-layoutmobile.mdrename to skills/antislop-layoutmobile/SKILL.mdindex a83a470..e3033bf 100644--- a/antislop-layoutmobile.md+++ b/skills/antislop-layoutmobile/SKILL.md@@ -1,3 +1,8 @@+---+name: antislop-layoutmobile+description: "Mobile layout skill for antislop. Use for layouts that reflow on small screens: grids, overflow, tap targets. Load with the core."+allowed-tools: Read Write Edit Glob Grep+---# antislop-layoutmobile> Anti AI Slop: Design & Copy Rules. Mobile Layout skilldiff --git a/antislop-ui.md b/skills/antislop-ui/SKILL.mdsimilarity index 98%rename from antislop-ui.mdrename to skills/antislop-ui/SKILL.mdindex dcc4fe3..157eb58 100644--- a/antislop-ui.md+++ b/skills/antislop-ui/SKILL.md@@ -1,3 +1,8 @@+---+name: antislop-ui+description: "UI and visual skill for antislop. Use when building or editing any interface: color, layout, components, motion. Load with the core."+allowed-tools: Read Write Edit Glob Grep+---# antislop-ui> Anti AI Slop: Design & Copy Rules. UI & Visual skilldiff --git a/skills/antislop/SKILL.md b/skills/antislop/SKILL.mdnew file mode 100644index 0000000..2d5ae9f--- /dev/null+++ b/skills/antislop/SKILL.md@@ -0,0 +1,667 @@+---+name: antislop+description: "Anti AI Slop: Design & Copy Rules. The core rules filter for AI coding agents. Load always to stop generic AI slop."+allowed-tools: Bash(curl *) Bash(mkdir *) Read Write Edit Glob Grep+---+# antislop++> Anti AI Slop: Design & Copy Rules++> Follow these rules whenever generating or building UI for a website, web app, or any interface.+> The goal: the design should feel **crafted by a designer**, not generated by AI.+> Before any UI work, ask the user (in their chat language) when antislop applies: during the work, or after it is done. Do not start until they answer.++---++## First-Run Install Wizard++antislop is a system: this core file plus optional **skills**, one per concern (`antislop-ui`, `antislop-copywriting`, and so on, each a folder with a `SKILL.md`). This section installs them once. It is an **offer, not a requirement**: if the user prefers, this file alone remains a complete filter.++**Skip this section** if the project's entry file (`AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, or the equivalent the running tool reads at session start) already contains an antislop pointer block. That means antislop is already installed. Come back only when the user asks to add or remove a skill.++If no antislop pointer exists and this file is being read for the first time, run the wizard:++> If the user can use a terminal, the packaged install is better: run `npx antislop-ai` (interactive picker) or `npx skills add miqdadbadjuber/anti-slop`, then skip this section. The steps below are the manual fallback for chat-only setups.++1. **Declare the setup before doing anything.** Tell the user you will (a) download the skill(s) they choose into `skills/<name>/` subfolders next to this file, and (b) append an antislop pointer block at the end of the project's entry file. Get approval. Never modify the entry file silently.+2. **Ask which skills to install** (multi-select, in the user's chat language). List only the skills that exist in this version of antislop:+ - **1. All** (recommended): install every available skill. Choose this when the work spans UI, copy, people, or mobile layout.+ - **2. `antislop-ui`** (UI / visual): pick this for building or editing a website, web app, or interface: color, layout, components, decoration, motion.+ - **3. `antislop-copywriting`** (copy & text): pick this for writing or editing copy: headlines, CTAs, value propositions, tone, landing-page text, product prose.+ - **4. `antislop-human`** (people): pick this for making sure a UI works for people with different eyes, hands, and setups: contrast, keyboard, focus, states.+ - **5. `antislop-layoutmobile`** (mobile / responsive): pick this for layouts that have to hold up on a phone: breakpoints, scale, grids, overflow, tap targets.+ - New skills appear here as they ship; never offer a skill that does not exist in this version.++ If the user declines or says "core only", stop here and use this file alone as the filter. Do not install anything.+3. **Resolve direction** (only if a UI skill was selected). Check for `DESIGN.md` or explicit brand/style direction. If none exists, be honest that antislop is a **filter, not a beautifier**: without direction the output tends toward monotonous. Recommend having a `DESIGN.md`, then offer these paths:+ - **1. The user supplies direction (recommended).** They write their own `DESIGN.md`, or answer a few direction questions (identity, personality, palette, typography, mood) and the agent transcribes their answers into `DESIGN.md`. The user is the author; the agent only formats. Never invent example content for `DESIGN.md`.+ - **2. The agent supplies direction, with an honest warning.** The agent writes the direction itself, stating explicitly that agent-generated style tends toward default AI taste, which is the slop antislop filters, so the result is likely monotonous. If chosen, still ask a minimal brief (product, audience, mood) before building.+ - **3. The user skips direction for now.** Proceed without a `DESIGN.md`. Any UI built this way must be labeled *"draft without direction"* with dials ENERGY 1 / RHYTHM 1 / MOTION 1 (R-37), and is not a shippable deliverable.+4. **Download the chosen skill(s)** into `skills/<name>/` subfolders next to this file, pinned to the release tag that matches this version so a newer skill never mixes with an older core. When `antislop-human` is chosen, also download its contrast-check script into the same skill folder:+ ```bash+ mkdir -p skills/antislop-ui skills/antislop-copywriting skills/antislop-human skills/antislop-layoutmobile+ curl -o skills/antislop-ui/SKILL.md https://raw.githubusercontent.com/miqdadbadjuber/anti-slop/v3.0.0/skills/antislop-ui/SKILL.md+ curl -o skills/antislop-copywriting/SKILL.md https://raw.githubusercontent.com/miqdadbadjuber/anti-slop/v3.0.0/skills/antislop-copywriting/SKILL.md+ curl -o skills/antislop-human/SKILL.md https://raw.githubusercontent.com/miqdadbadjuber/anti-slop/v3.0.0/skills/antislop-human/SKILL.md+ curl -o skills/antislop-layoutmobile/SKILL.md https://raw.githubusercontent.com/miqdadbadjuber/anti-slop/v3.0.0/skills/antislop-layoutmobile/SKILL.md+ curl -o skills/antislop-human/contrast-check.py https://raw.githubusercontent.com/miqdadbadjuber/anti-slop/v3.0.0/skills/antislop-human/contrast-check.py+ ```+5. **Append the pointer block at the END of the project's entry file** (the file the running tool reads at session start: `CLAUDE.md` for Claude Code, `AGENTS.md` for Codex, `GEMINI.md` for Gemini CLI, and so on). If that file does not exist, create it. Never modify existing content:+ ```md+ <!-- antislop: auto-managed block, do not edit -->+ ## antislop+ For UI, copy, people, or mobile layout work, read `antislop.md` (core) and then the skill for the task:+ - UI / visual: `skills/antislop-ui/SKILL.md`+ - Copy & text: `skills/antislop-copywriting/SKILL.md`+ - People: `skills/antislop-human/SKILL.md`+ - Mobile / responsive: `skills/antislop-layoutmobile/SKILL.md`+ Before starting, ask the user when antislop applies: during the work, or after it is done.+ ```+ If an older antislop block exists (even without the marker), replace just that block instead of appending a duplicate.+6. **Ask the usage-mode question** (see "Two Usage Modes"), then proceed with the work.++Notes:+- The entry file is read at the start of a session, so a newly written pointer takes effect from the **next** session.+- The wizard needs download and file-write access for steps 4 and 5; the user approves once.+- The pointer block is the source of truth for which skills are installed. To add or remove a skill later, update the block to match (add or remove the file and its line).++---++## Two Usage Modes++antislop is used one of two ways. At the start of a session, ask the user which applies, in the user's chat language (not the language of this file). Do not start UI work until they answer.++> **When do you want to use antislop?**+> 1. **DURING** the project, while working (planning & execution). I will apply the rules while I write, so AI slop does not appear from the start.+> 2. **AFTER** the project is finished. I will audit what exists: a numbered findings list with priorities, you pick which numbers to fix, then I fix and report.+>+> Which one, 1 or 2?++- **Mode 1 (During):** follow the rules while generating. This prevents slop from the start and ends with the Delivery Gate. Use it when building new UI.+- **Mode 2 (After):** audit an already-finished project. Produce a numbered findings list in `anti-slop/audit-001-YYYY-MM-DD.md` (numbers keep rising). Each finding cites the violated rule (R-XX) and a one-line reason. Priority follows the rule tier: Hard Gate = HIGH, Purpose-Gate = MEDIUM, Quality Locks = LOW. Do not modify anything until the user approves specific numbers; numbers not mentioned are not touched. Then fix the approved items and write a follow-up report.++## What This Is (and What It Isn't)++`antislop.md` is a **filter**, not a style guide. It stops AI coding agents from producing generic, recognizable "AI slop" UI, without falling into the opposite failure: a sterile, lifeless default.++- This document does **not** impose an aesthetic: no prescribed colors, fonts, layouts, or "house style".+- This document does **not** ban visual techniques (gradients, glassmorphism, badges, card grids). Those are tools. What it rejects is **technique without purpose**.+- This document does two things only:+ 1. Holds every visual decision to a **purpose test**: what does this technique serve? Write the reason down.+ 2. Holds the result to a **liveliness bar**: the output must be alive and specific, not just "clean". See Part 3.++`antislop.md` is one of three files, and it is a **filter, not a source of direction**:++- `DESIGN.md` (or your brand/style direction) gives the design its **soul**: identity, personality, palette, typography, mood. This is what makes a result feel alive and specific. How you fill it is your business: write it yourself, or build it from visual references you like.+- `AGENTS.md` (or `CLAUDE.md`, `GEMINI.md`, etc.) routes the agent: "for UI work, read `DESIGN.md` for direction, then `antislop.md` as the filter."+- `antislop.md` rejects slop and requires liveliness. It does not invent direction; the Design Read (Part 3) turns a brief into dials.++Removing slop does not reveal good design; it leaves a void. Liveliness must be **added**, not assumed. A sterile result means either direction was missing or liveliness was not added, and both are failures to fix. The fix is never "add more bans"; it is "state the purpose and raise the liveliness bar".++## Core Principle++The filter rejects technique without purpose, not technique itself. Before using any visual technique, answer: **what does this serve?** If the only answer is "it looks AI" or "it looks safe", the technique must go or be reworked. If the answer names a hierarchy, identity, or readability goal, it stays, and the reason is written down.++The question to answer before calling anything done:++> If the logo and product name were swapped out, would this design still feel unique and have its own character?++If the answer is **no**, the design is too generic. Start over.++A design is **done** only when all three are true:+1. Every technique passes the purpose test (see the Purpose-Gate group in Part 2).+2. It has its own identity and character (see Part 3: Liveliness Toolkit).+3. It actually works (see The Craftsmanship Standard).++## The Craftsmanship Standard++"Not slop" is the floor, not the goal. A design passes when it meets five preference-agnostic criteria. Use these as questions, not recipes.++### C-1 — Intentionality++Every visual and copy decision has a reason you can articulate. If the only reason is "it's the AI default", that is a red flag: revisit the decision.++### C-2 — Functional Completeness++Every interactive element works, or it does not exist. A button that cannot do anything is a defect, not decoration.++### C-3 — Content-Driven Composition++Every section exists because the product's content needs it, not because every AI landing page has one. Remove sections that only fill a template.++### C-4 — Resilience++The UI holds up in every state (empty, loading, error), every theme you ship, every breakpoint, and keyboard-only use.++### C-5 — Evidence Over Claims++Anything presented as fact (testimonials, statistics, security claims) is real and verifiable, or it is not shown at all.++---++## Part 1: AI Slop Patterns (Warning Signs)++These are the most common patterns found in AI-generated designs. Use this table to **audit** your output: scan for clusters, then ask each one "what does this serve?" A single pattern from this list is fine if it serves a purpose, unless a **Hard Gate** rule in Part 2 forbids it (R-02, R-03, R-17, R-18, R-23 to R-28, R-32 to R-38). What makes a design slop is many of these appearing together with no reason. This is a **diagnostic scan, not a ban list**: Part 1 itself bans nothing, but the Hard Gate rules in Part 2 are absolute, and every other pattern must pass the purpose test (Part 2, Purpose-Gate group).++### Visual & Color++| Pattern | Telltale Signs |+|---------|---------------|+| **Generic Blue-Purple Gradient** | Blue to Purple, Blue to Cyan, Purple to Pink, full-page colored glow background |+| **Excessive Glassmorphism** | Blur on navbar, cards, modals, sidebar all at once |+| **Excessive Border Radius** | Every element is pill-shaped: buttons, inputs, cards, badges, modals |+| **Overly Soft Shadows** | Every component has a large shadow, the whole page feels like it's floating |+| **Glow Everywhere** | Glow on cards, buttons, icons, badges, backgrounds, and borders all at once |+| **Background Grid** | Grid squares, blueprint lines, graph paper, thin horizontal/vertical lines |+| **Too Much Decoration / Trend-Stacking** | Blob, mesh gradient, glow, noise, pattern, grid with no purpose, especially when multiple trends are stacked (e.g. Glassmorphism + Mesh Gradient + Glow + Monospace + Grid + Rounded UI) |+| **Dark Mode Default for No Reason** | Entire page is dark just because it looks "tech", with no branding consideration |+| **Too Many Colors in Palette** | Using 5-7 different colors on one page without a clear design system |+| **Excessive Accent Color** | One accent color on buttons, icons, badges, links, lines, backgrounds, and glows |+| **Sterile Default** | Flat white/near-white, thin grey borders, small radius, no texture, generic font, no identity. The "safe result" of over-filtering without direction |+| **Skeleton Preview as Product Shot** | Grey placeholder bars / skeleton blocks used as the "product screenshot" in the hero or feature areas |++### Layout & Components++| Pattern | Telltale Signs |+|---------|---------------|+| **Monotonous Layout** | Hero, Subtitle, 2 CTAs, Screenshot, Feature Grid, Testimonials, FAQ, CTA, Footer |+| **Copy-Paste Feature Cards** | Identical size, height, icon, layout, and padding across all cards |+| **Uniform Spacing** | Padding, margin, and element gaps are identical across every section |+| **Broken Mobile** | Horizontal overflow, cards clipping off-screen, broken navbar, colliding text |+| **Template Animations** | Every element uses Fade Up, Fade In, Floating, Scale, Bounce |+| **"How It Works" Always 3 Steps** | Round icon + number 1, 2, 3 + short text, always three steps, always the same |+| **"Trusted By" Logo Bar** | Row of generic company logos placed directly below the hero |+| **"Most Popular" Pricing Card** | Middle tier always highlighted with a capsule badge |+| **4-Column Template Footer** | Product / Company / Resources / Legal columns with no variation |+| **Uniform Section Rhythm** | Every section is the same composition: centered title + subtitle + identical card grid, with no variation between sections |+| **Alternating Background Only** | The only variation between sections is flipping the background color every other section |++### Copywriting & Content++| Pattern | Telltale Signs |+|---------|---------------|+| **Em Dash (—)** | "Fast, secure — and built for developers." |+| **Generic CTAs** | Get Started, Learn More, Try Now, Explore, Discover |+| **AI Marketing Buzzwords** | AI Powered, Revolutionary, Next Generation, Seamless, Cutting Edge |+| **Fake Statistics** | 10K+ Users, 99.9% Uptime, 500M Requests, 120+ Countries |+| **Fake Testimonials** | AI avatars, random names, random job titles, fictional reviews |+| **Fabricated Trust Claims** | "SOC 2 compliant", "ISO 27001", "Enterprise-grade security", "300% faster" for a product with no such evidence |++### Decorative Elements++| Pattern | Telltale Signs |+|---------|---------------|+| **Generic AI Icons** | Sparkle, Star, Magic, Lightning, Diamond, Cube, Robot, AI Orb |+| **Small Arrows (→ / ↗)** | Placed on almost every button as pure decoration |+| **AI Capsule Badges** | Pill shape, thin border, glow, small dot, uppercase, containing: "AI Powered", "Beta", "New" |+| **Generic AI Typography** | Large monospace headings, HOW IT WORKS uppercase with wide tracking |+| **Typeface Chosen Without Reason** | Font picked because it's the AI default, not because it fits brand character. Popular fonts like Inter are still valid if there's a reason |+| **Generic Illustrations** | Undraw, Storyset, or 3D blob characters with no real connection to the product |++### Functionality & Content++| Pattern | Telltale Signs |+|---------|---------------|+| **Non-Functional Interactive Elements** | Buttons do nothing, dropdowns won't open, forms can't be submitted. AI builds the visuals but forgets the logic |+| **Happy Path Only Design** | No empty state, loading state, or error state. UI looks perfect in screenshots but isn't ready for real use |+| **Irrelevant FAQ** | FAQ contains generic template questions ("Is my data secure?", "Can I cancel anytime?") with no real relevance to the product |+| **Assumed Logo & Profile Photos** | Creating app logos, avatars, or profile photos without explicit instructions, generated purely on assumption |+| **Navbar Links to Nowhere** | Navbar contains links to pages (Features, Contact, About, etc.) that have no actual section or page |+| **File/CSS Patching via Script** | A feature (e.g. dark mode) added by an external script that rewrites source or CSS with string replacement. Signs: a `.py`/`.js` helper doing `str.replace` on `.css` files, "patch" scripts left in the repo |++### Identity & Originality++| Pattern | Telltale Signs |+|---------|---------------|+| **No Visual Identity** | Swap the logo and the design still feels the same; could belong to any product |+| **Clone of Popular Products** | Overall visual that mimics Linear, Vercel, Stripe, Notion, or other popular products without being asked |++### Accessibility++| Pattern | Telltale Signs |+|---------|---------------|+| **Poor Color Contrast** | Grey text on grey background, white text on a gradient that's light in some areas. Looks fine visually but fails WCAG |+| **Not Keyboard Navigable** | UI can only be used with a mouse. Interactive elements can't be reached with Tab, no visible focus state |++---++## Part 2: Mandatory Rules (R-01 to R-38, grouped)++All 38 rules still apply. They are grouped into three tiers so the mechanism is explicit: **Hard Gate** rules are absolute, **Purpose-Gate** rules allow the technique but require a written reason, **Quality Locks** are consistency requirements.++### Group 1: Hard Gate (absolute, no exceptions)++These rules protect honesty, function, and accessibility. Breaking any of them is a FAIL regardless of purpose.++#### R-02 — Copywriting++- **FORBIDDEN**: em dash character (`—`) in any text+- Use comma (`,`), period (`.`), colon (`:`), or parentheses `()` instead+- Text must feel natural and human+- **Carve-out**: documentation of this rule is exempt: the numbered section headings in this file (`R-XX — Title` rules and `C-1` to `C-5` principles), the em dash example in Part 1, the rule's own definition, any Delivery Gate item that quotes it, and the `Em Dashes` section in the copywriting skill (`skills/antislop-copywriting/SKILL.md`). These are documentation structure, not UI text.++#### R-03 — Mobile Responsiveness++- **REQUIRED**: mobile layout must be perfect, not an afterthought+- No horizontal overflow+- Text does not escape its container+- Cards do not collide or clip off-screen+- Navbar remains comfortable to use+- Button sizes meet the minimum tap target (44px)+- Spacing stays consistent across all breakpoints+- **Responsiveness is part of the design, not an add-on.**++#### R-17 — Data & Numbers++- **FORBIDDEN**: numbers and statistics without a real source+- If real data is not available, display no numbers at all+- Empty is better than deceptive++#### R-18 — Testimonials++- **FORBIDDEN**: AI avatars, random names, random job titles, fictional reviews+- If you have no real testimonials, do not create a testimonials section+- Use social proof that can be verified++#### R-23 — Clarification & Visual Assets++- **REQUIRED**: before creating any asset without explicit instructions, ask or use a clear placeholder+- If there is an opportunity to ask, confirm the following first:+ - App logo or icon (shape, color, concept)+ - Avatars, profile photos, or images representing people/team+ - Statistics and numbers to be displayed+ - Names, job titles, or identities in testimonials+ - Navigation structure and desired page layout+- If asking is not possible (rapid prototyping, limited context): use clear placeholders and do not disguise them as final+ - Logo: product name as text in an appropriate typeface, or the marker `[LOGO]`+ - Profile photo: initial-based avatar or a simple geometric placeholder+ - Statistics: not displayed, or marked `[REAL DATA]`+- **Never generate assets as if they are the final version without confirmation**+- If explicit instructions already exist, generate directly without asking again++#### R-24 — Navigation++- **FORBIDDEN**: placing links in the navbar for pages or sections that do not exist in the design+- Every navigation item must have a real, accessible destination+- If a feature has not been built yet, do not include it in the navbar, or clearly label it as coming soon+- The navbar must reflect the structure of content that actually exists++#### R-25 — Color Contrast++- **REQUIRED**: all text must meet the minimum WCAG AA contrast standard+ - Normal text: minimum contrast ratio of 4.5:1+ - Large text (18px+): minimum contrast ratio of 3:1+- **FORBIDDEN**: light grey text on a grey background+- **FORBIDDEN**: white text on a gradient that is light in some areas+- Always test contrast across the entire area the text passes over, not just at a single point++#### R-26 — Interactive Elements++Every interactive element must have a real behavior, or be removed:++- A link or button that scrolls to an existing section (real `href="#..."`)+- A modal or dialog that opens and closes (closable with Escape)+- A state toggle (mobile menu, theme, accordion, tabs)+- An external action (`mailto:`, a real product URL)+- A form that submits and shows feedback++**FORBIDDEN**: buttons and links that do nothing+**FORBIDDEN**: nav items pointing to sections that do not exist (see R-24)++If an element genuinely cannot have a destination yet, remove it instead of shipping a dead control. A placeholder is acceptable only with a clear `// TODO` comment in code AND a visible label to the user (e.g. "Coming soon"). See "Functional Patterns" below.++#### R-27 — UI States++- **REQUIRED**: every UI that displays data must have at least three states:+ - **Empty state**: the view when there is no data yet+ - **Loading state**: an indicator while data is being fetched+ - **Error state**: the view when something goes wrong+- A UI designed only for the ideal condition is not ready for real use+- These states are not bonuses; they are part of a complete design++#### R-28 — FAQ++- **FORBIDDEN**: FAQ containing template questions that are not specific to the product+- Every question in the FAQ must address a real concern of that product's users+- If you do not know what questions are actually asked, do not create an FAQ section+- A generic FAQ does more damage to trust than having no FAQ at all++#### R-32 — Keyboard Accessibility++- **REQUIRED**: all interactive elements must be reachable and operable by keyboard+ - `Tab` and `Shift+Tab` navigation must work logically following visual order+ - Buttons and links must be activatable with `Enter` or `Space`+ - Dialogs and modals must be closable with `Escape`+- **REQUIRED**: every focused element must have a clearly visible focus indicator+- **FORBIDDEN**: removing the focus outline with `outline: none` or `outline: 0` without replacing it with a better custom focus indicator+- A UI that can only be used with a mouse is an unfinished UI++#### R-33 — No File/CSS Patching via Scripts++- **FORBIDDEN**: implementing or altering UI features by running an external script that rewrites source files or CSS with string replacement+- Build features directly in the source code where they belong+- A feature added by a patch script (e.g. a Python script editing `.css` files) is broken by design and must be rewritten in source++#### R-34 — Every Theme You Ship Must Work++- If you ship a theme toggle, BOTH modes must be fully functional+- Contrast, colors, and every component must be verified in each mode+- **FORBIDDEN**: shipping a mode where base styles, fonts, or layout break++#### R-35 — Verify Before You Deliver++- Run or build the app before declaring the task done+- Check the console for errors+- Exercise every interactive element+- Check every theme and the mobile breakpoints+- A design that has never been run is not finished++#### R-36 — No Fabricated Claims++- **FORBIDDEN**: inventing security, compliance, or performance claims ("SOC 2 compliant", "ISO 27001", "300% faster") without real evidence+- **FORBIDDEN**: fake testimonials, fake statistics, fake names (see R-17, R-18)+- If there is no real data, show no claim++#### R-37 — Design Direction Required++- Before building a UI, load the style direction: `DESIGN.md` or explicit brand guidance from the user+- If no direction exists, ask the user, or state clearly that the design was built **without direction** and is a **draft**, not a deliverable+- If no direction exists AND the user cannot be asked, the output MUST be labeled *"draft without direction"* AND use the honest default dials **ENERGY 1 / RHYTHM 1 / MOTION 1** (see Part 3). Never silently fall back to a neutral, sterile default+- **FORBIDDEN**: designing without direction and silently falling into a neutral, sterile default+- Style direction is the product owner's identity, not a slop pattern; this filter only applies on top of it+- A design built without direction is a draft, not a shippable result++#### R-38 — Real Content or Honest Placeholder++- Every claim, feature, testimonial, statistic, nav item, or visual element must come from real information OR be an explicitly labeled placeholder+- **FORBIDDEN**: fabricating content that looks realistic (fake testimonials, invented features, fake statistics, ghost links, fictional team or people)+- Placeholders are written as what they are: `[REAL DATA]`, "Coming soon", never disguised as final (see R-23)+- An empty section is better than a fabricated one++### Group 2: Purpose-Gate (technique allowed, purpose required)++Each technique below is allowed. It FAILS only when it appears as a default without a stated purpose, or when the reason for it is not written down. Every rule has the same shape: FORBIDDEN as default without purpose; ALLOWED when it serves hierarchy/identity and the reason is written; dose caps for the excessive cases.++#### R-01 — Color & Gradients++- **FORBIDDEN as default without purpose**: blue-to-purple, blue-to-cyan, purple-to-pink gradients as primary colors, colored glow backgrounds, neon blue buttons+- **ALLOWED** when the color/gradient is part of an established brand identity OR serves a stated hierarchy goal, with the reason written down+- A gradient that separates one level of hierarchy from another is craft; the same gradient covering the whole page is slop. The technique is not the problem, the purpose is++#### R-04 — Icons++- **FORBIDDEN as default without purpose**: Sparkle, Star, Magic, Lightning, Diamond, Orb, Robot as feature icons+- Icons must be **genuinely relevant** to the content they represent, and the relevance written down when the icon is a generic glyph+- If no appropriate icon exists, it is better to use none++#### R-06 — Typography++- **FORBIDDEN as default without purpose**: large monospace fonts used purely for "terminal" aesthetics, uppercase labels with extreme letter-spacing (`HOW IT WORKS`, `FEATURES`)+- Choose typeface based on brand character, not because it is the AI model's default pick, and write the reason+- Typography must **improve readability** and reflect the product's character++#### R-07 — Background++- **FORBIDDEN as default without purpose**: grid squares, blueprint lines, graph paper as a background+- Use texture or pattern only if it genuinely supports the product's specific visual identity, with the reason written down++#### R-08 — Button Arrows++- Arrows (`→`, `↗`) are not the default identity for every button+- If used, ensure the size is proportional and serves a clear visual purpose, and write that purpose down+- Not every CTA needs an arrow++#### R-09 — Badges++- **FORBIDDEN as default without purpose**: capsule badges containing "AI Powered", "Beta", "New", "Secure", "Fast" without context+- Badges may only be used if **functionally needed** (a real status or real label), with the need written down+- Avoid combining: capsule + thin border + glow + small dot + uppercase all at once++#### R-10 — Glassmorphism++- Glassmorphism is an **accent** only, not the character of the entire UI+- **Dose cap**: blur/backdrop-filter on at most 1-2 elements; **FORBIDDEN** on navbar, cards, modals, and sidebar simultaneously++#### R-12 — Shadow++- Shadow must support **visual hierarchy**, not make every element float+- Use shadow selectively as an elevation marker, not as a default for every component, and write the elevation reason down++#### R-13 — Glow++- Glow may only be used as a **focus accent** on a maximum of 1-2 important elements+- **Dose cap**: **FORBIDDEN** on card + button + badge + icon + background + border simultaneously++#### R-14 — Feature Cards++- **FORBIDDEN as default without purpose**: all cards having identical size, icon, padding, and layout+- Create visual variation that reflects content hierarchy, and write the hierarchy reason down+- Not every feature needs to be presented as a card++#### R-19 — Animations++- Animations must have a **clear UX purpose**, and the purpose written down+- **FORBIDDEN as default without purpose**: every element using Fade Up + Floating + Scale + Bounce simultaneously+- Motion must match the declared MOTION dial (Part 3): a claimed "cinematic" page must actually move; a claimed "static" page must not+- Use animation to guide attention, not just to fill the page++#### R-22 — Illustrations++- **FORBIDDEN as default without purpose**: Undraw, Storyset, or generic 3D blob character illustrations+- Illustrations must have a direct connection to the product or content, with the connection written down+- If no appropriate and original illustration exists, use real screenshots or no illustration at all++### Group 3: Quality Locks (consistency)++These are consistency requirements. They stay as-is, with two adjustments: R-05 now references the RHYTHM dial, and R-31 is upgraded to the keystone rule.++#### R-05 — Layout & Page Structure++- **FORBIDDEN**: AI template layouts (Hero + 3 cards, Hero + 6 features, Hero + fake stats, etc.)+- **FORBIDDEN**: "How It Works" always in 3 steps with round icons and numbers+- **FORBIDDEN**: generic "Trusted By" logo bar directly below the hero+- **FORBIDDEN**: 4-column template footer with Product / Company / Resources / Legal and no variation+- **FORBIDDEN**: every section using the same internal layout pattern (centered title + subtitle + identical card grid); see "Uniform Section Rhythm". Composition variety comes from `DESIGN.md`, not from a template+- Every page must have a structure built around **actual content needs**+- Section order must follow the product's narrative flow, not the AI default order (see Craftsmanship Standard C-3)+- Section composition must match the declared RHYTHM dial (Part 3): if RHYTHM is 3 (varied), sections must visibly vary; if RHYTHM is 1 (uniform), uniformity is a deliberate choice, not an accident++#### R-11 — Border Radius++- Use border radius that is **consistent with the defined design system**+- **FORBIDDEN**: making every element pill-shaped (pill buttons, pill cards, pill inputs, pill badges)+- Radius variation is a visual hierarchy tool; use it deliberately++#### R-15 — CTA (Call to Action)++- **FORBIDDEN**: "Get Started", "Learn More", "Try Now", "Explore", "Discover" as default CTAs+- CTAs must be **specific to the product context and the intended action**+- Better examples: "Start Your Free Trial", "Watch Live Demo", "Create Free Account"++#### R-16 — Copywriting & Buzzwords++- **FORBIDDEN**: "AI Powered", "Next Generation", "Revolutionary", "Seamless", "Cutting Edge", "Intelligent", "Ultimate", "Powerful", "Effortless"+- Use **specific language** that explains real benefits+- Show evidence, not claims++#### R-20 — Visual Identity++- The design must have a strong identity: a specific palette, a typeface chosen for a reason, a unique composition+- Every section must have a clear hierarchy+- Layout is built around the actual product content needs+- Identity comes from deliberate, explained choices, not from adding decoration (see Craftsmanship Standard C-1)++#### R-21 — Dark Mode++- Choose a theme based on brand identity, product type, and target users+- Developer tools, terminals, and creative tools have strong, legitimate reasons for a dark default. Use that reason, not "dark looks tech"+- If the product has no strong reason for a fixed theme, **build a working light/dark toggle**. "Give the user a choice" means build the toggle, not defer the work+- **FORBIDDEN**: using this rule (or any rule) as an excuse to skip or defer requested work. If the product should support dark mode, implement it now+- A theme toggle you ship must work correctly in BOTH modes. A dark mode that breaks the light mode is a defect (see R-34)++#### R-29 — Color Palette++- **REQUIRED**: limit the active palette to a maximum of 2-3 core colors + 1 accent color+- **FORBIDDEN**: using 5+ different colors on one page without a clear design system+- Neutral colors (white, black, grey) do not count as part of the core palette+- Palette consistency is the foundation of a strong visual identity++#### R-30 — Do Not Clone Popular Products++- **FORBIDDEN**: building a visual that overall mimics another product without being asked+ - "Make it look like Linear" (unless the user explicitly asks for it)+ - "Make it look like Vercel" (unless the user explicitly asks for it)+ - "Make it look like Stripe / Notion / Apple" (unless the user explicitly asks for it)+- AI defaults to cloning popular products because those patterns dominate training data+- Visual references may be used as inspiration, not as a template to copy+- The product must have its own visual identity, not the identity of another product++#### R-31 — Every Decision Must Have a Reason (Write It Down)++Before finishing the design, write a **one-line reason** for every major decision:+- Why this color?+- Why this layout?+- Why this typography?+- Why this spacing?+- Why use cards?+- Why use this illustration or icon?++If the reason cannot be written in one line, the decision is not valid and must be revisited. This rule is the keystone of this document: a technique is allowed only when its purpose is articulable. Writing the reason forces intent, and it is what the Purpose-Gate group (Group 2) checks.++---++## Part 3: Liveliness Toolkit++A filter can remove slop, but it cannot add energy. Removing slop leaves a void, and the model fills that void with its most generic output. Liveliness must be **added** deliberately. This Part is that mechanism: positive requirements, not bans.++### Three Dials (required)++Every design must set three dials explicitly, derived from DESIGN.md or the Design Read, and hold them from the first section to the last:++| Dial | 1 (Calm) | 2 (Balanced) | 3 (Bold) | What it answers |+|---|---|---|---|---|+| **ENERGY** | Linear, GOV.UK | Stripe, Vercel | Awwwards, agency portfolio | How hard does this design say hello? |+| **RHYTHM** | Uniform grid, predictable | Consistent with a few breaks | Asymmetric, mixed compositions | How much do sections change from each other? |+| **MOTION** | Hover states only | Scroll-reveal, transitions | Parallax, pin, choreography | How much motion, and why? |++The anchors (Linear, GOV.UK, Stripe, Vercel, Awwwards) are taste references for judging a value, not things to imitate.++Why three levels and not ten: a model and a reviewer can reliably tell "is this section uniform or varied?" (binary, checkable). They cannot reliably judge "is this a 6 or a 7?" (continuous, uncheckable). Three levels make liveliness enforceable.++Example sets: a designer portfolio sets ENERGY 3, RHYTHM 3, MOTION 2. A public-service site sets ENERGY 1, RHYTHM 1, MOTION 1.++### Levers (how the dials become visual decisions)++These are tools for hitting the dial values, not bans:++- **One focal point per screen**: exactly one element that is clearly the most important on every screen; the rest defer to it+- **Hierarchical contrast**: size, weight, and color are differentiated on purpose, not randomly+- **Whitespace as structure**: empty space separates and sets rhythm, not leftover space+- **One deliberate accent**: one color or gesture used sparingly at the key moment. Zero accents is sterile; an accent everywhere is slop+- **Identity motif**: one pattern, gesture, or typographic voice that is specific and repeated, making the design "belong" to the product++### Design Read (how the dials are set)++Before generating, declare one line:++> Reading this as: `<page kind>` for `<audience>`, in a `<visual language>` style, dial `<ENERGY/RHYTHM/MOTION>`.++Example: *"Reading this as: B2B SaaS landing for technical buyers, with a Linear-style minimalist language, dial ENERGY 1 / RHYTHM 2 / MOTION 1."*++1. **Direction exists** (DESIGN.md or a brief that expresses energy and mood): infer the dials from it and proceed. DESIGN.md may optionally include a line like `Dial: ENERGY 2 / RHYTHM 3 / MOTION 1`; if present, use it directly.+2. **Direction is ambiguous**: ask exactly ONE decisive question, never a question dump. Example: *"Should this feel closer to Linear-clean or Awwwards-experimental?"* Use the answer to set the dials.+3. **No direction and the user cannot be asked**: label the output *"draft without direction"*, set the honest default dials **ENERGY 1 / RHYTHM 1 / MOTION 1** (see R-37), and do not present it as a deliverable.++## Functional Patterns++"What works" means one of these, depending on context:++- **Anchor to a real section**: `href="#pricing"` where `#pricing` exists+- **Scroll to relevant content** for a "Learn more" style link+- **Open a modal or dialog** for a quick action (closable with Escape)+- **Toggle a state**: mobile menu, theme, accordion, tabs+- **External action**: `mailto:`, a real product URL+- **Form submit** with visible feedback++If none of these applies to an element, the element should not exist.++---++## Delivery Gate (Mandatory)++Run this gate BEFORE delivering. Output its status with your deliverable as a **PASS/FAIL report**: one line per item, and every `PASS` backed by concrete evidence (e.g. "R-26 PASS: every button has a real `href` or `onClick`; no dead controls").+If any item is **FAIL** (or any answer is **yes**), do not deliver: fix it first, then re-run. A report containing a FAIL must never be shipped.++The gate has four blocks: Hard Gate (absolute), Purpose-Gate (technique + written reason), Liveliness (dials + levers), Craftsmanship & Quality Locks (C-1..C-5 plus the consistency locks R-05, R-11, R-15, R-16, R-20, R-21, R-29, R-30, R-31).++### Block 1: Hard Gate (absolute)++Before declaring the design done, answer every question below. All answers must be **no**:++- [ ] Is there an em dash (`—`) anywhere in the text, outside the R-02 carve-out? *(R-02)*+- [ ] Is there any horizontal overflow, text escaping its container, or broken layout on mobile? *(R-03)*+- [ ] Are there any statistics without a real source (10K+ Users, 99.9% Uptime, etc.)? *(R-17)*+- [ ] Are there any fictional testimonials (AI avatars, random names or job titles)? *(R-18)*+- [ ] Were any visual assets (logo, avatar/profile photo, statistics, testimonials, or navigation structure) created without explicit instructions or confirmation, and without an honest placeholder? *(R-23)*+- [ ] Are there navbar links pointing to sections or pages that do not exist? *(R-24)*+- [ ] Is there any text with contrast below the WCAG AA standard (4.5:1 for normal text, 3:1 for large text)? *(R-25)*+- [ ] Are there any buttons, dropdowns, or forms that do nothing, with no real behavior and no `// TODO` + visible label? *(R-26)*+- [ ] Does the UI lack an empty state, loading state, or error state? *(R-27)*+- [ ] Does the FAQ contain generic questions that are not relevant to the product? *(R-28)*+- [ ] Can the UI not be navigated by keyboard (Tab, Enter, Escape) or is there no visible focus state? *(R-32)*+- [ ] Was any feature added by patching source/CSS with an external script instead of writing it in source? *(R-33)*+- [ ] If a theme toggle exists, does one mode (light or dark) break styles, fonts, or layout? *(R-34)*+- [ ] Was the app delivered without being run or built, or with any interactive element left unexercised? *(R-35)*+- [ ] Are there any fabricated security, compliance, performance, or customer claims? *(R-36)*+- [ ] Was the design built without direction and not labeled *"draft without direction"* with honest default dials ENERGY 1 / RHYTHM 1 / MOTION 1? *(R-37)*+- [ ] Is there any realistically-styled content that was fabricated (testimonials, features, statistics, ghost links, fictional team) without a real source? *(R-38)*++### Block 2: Purpose-Gate (technique allowed, reason required)++For each technique, the technique itself is allowed. FAIL if it appears as a default without purpose, or if the reason is not written down:++- [ ] Do gradients/glows appear as a default with no stated hierarchy or brand purpose? *(R-01)*+- [ ] Are there generic icons (sparkle, star, magic, lightning, diamond, robot, orb) or icons irrelevant to their content, with no written relevance? *(R-04)*+- [ ] Is there a large monospace font, uppercase label with wide tracking, or a typeface chosen without a written brand-character reason? *(R-06)*+- [ ] Is there a background grid, blueprint, or graph paper without a written visual-identity purpose? *(R-07)*+- [ ] Are arrows (`→` / `↗`) placed on almost every button purely as decoration, with no written purpose? *(R-08)*+- [ ] Are there capsule badges ("AI Powered", "Beta", "New", "Secure", "Fast") with no real function, or the full capsule + thin border + glow + uppercase combination? *(R-09)*+- [ ] Is glassmorphism applied to more than 1-2 elements simultaneously (navbar + card + modal + sidebar)? *(R-10)*+- [ ] Is a large shadow applied to every component, with no written elevation reason, making the page feel like it is floating? *(R-12)*+- [ ] Is glow applied to cards, buttons, badges, icons, backgrounds, and borders simultaneously? *(R-13)*+- [ ] Do all feature cards have identical size, icon, padding, and layout, with no written hierarchy reason? *(R-14)*+- [ ] Do all elements use template animations simultaneously (Fade Up + Floating + Scale + Bounce) without a written UX purpose, or does the motion contradict the declared MOTION dial? *(R-19)*+- [ ] Are there generic illustrations (Undraw, Storyset, 3D blob) with no written product connection? *(R-22)*++### Block 3: Liveliness (required to be alive, not just clean)++All answers must be **yes**:++- [ ] Are the dials set and explicit (ENERGY / RHYTHM / MOTION declared)?+- [ ] Is the output consistent with the claimed dials? (RHYTHM 3 but uniform sections = FAIL)+- [ ] Is there at least one clear focal point per screen?+- [ ] Is whitespace structural (used to separate and set rhythm), not leftover?+- [ ] Is there one deliberate accent (not zero, not everywhere)?+- [ ] Is there an identity motif (one specific, repeated pattern, gesture, or typographic voice)?+- [ ] Was a Design Read declared before generation?++### Block 4: Craftsmanship & Quality Locks++All answers must be **no**:++- [ ] C-1: Is there any visual or copy decision whose only justification is "it's the AI default"? *(Intentionality)*+- [ ] C-2: Does any interactive element do nothing, with no clear label? *(Functional Completeness)*+- [ ] C-3: Does any section exist only to fill an AI template, not to serve the product's content? *(Content-Driven Composition)*+- [ ] C-4: Does the UI break in any state, theme, breakpoint, or without a mouse? *(Resilience)*+- [ ] C-5: Is any testimonial, statistic, or claim fabricated? *(Evidence Over Claims)*+- [ ] Does the layout follow an AI template (generic Hero+cards, "How It Works" always 3 steps, "Trusted By" logo bar, 4-column footer with no variation, uniform section rhythm), or does the section rhythm contradict the declared RHYTHM dial? *(R-05)*+- [ ] Are all elements (buttons, cards, inputs, badges) made pill-shaped with no radius variation? *(R-11)*+- [ ] Are CTAs still generic (Get Started, Learn More, Try Now, Explore, Discover)? *(R-15)*+- [ ] Are there any AI marketing buzzwords (AI Powered, Seamless, Revolutionary, Cutting Edge, etc.)? *(R-16)*+- [ ] Does the design still feel generic even if the logo and product name are swapped? *(R-20)*+- [ ] Was dark mode forced as a default without a branding/user reason, or was a required light/dark toggle deferred with an excuse? *(R-21)*+- [ ] Does the color palette exceed 2-3 core colors + 1 accent without a clear design system? *(R-29)*+- [ ] Does the overall design look like a clone of another popular product (Linear, Vercel, Stripe, Notion, etc.)? *(R-30)*+- [ ] Is there any major visual decision (color, layout, typography, spacing, cards, illustration) whose reason cannot be written in one line? *(R-31)*++If even one answer is **yes** (or **no** in Block 3), do not deliver. Fix it, re-run the gate, and only then ship. Delivery without a clean gate is a failure.