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.2.20: usage modes become a saved preference
miqdadbadjuber91f12ec67e9d
diff --git a/GUIDE.md b/GUIDE.mdindex f081dfc..6284327 100644--- a/GUIDE.md+++ b/GUIDE.md@@ -33,6 +33,7 @@ This guide goes from zero to installed. Every route below carries its own update- [antislop-code](#antislop-code)- [Reference](#reference)- [Which version do I have?](#which-version-do-i-have)+ - [Usage modes](#usage-modes)- [Where each agent reads antislop from](#where-each-agent-reads-antislop-from)- [What is a skill?](#what-is-a-skill)- [What antislop does not do](#what-antislop-does-not-do)@@ -184,7 +185,7 @@ npx antislop-aiAnswer the questions exactly as you did the first time. When it reaches folders you already have, it prints what it found before asking anything:```-▲ Already here: antislop 3.2.10. This installer carries 3.2.13.+▲ Already here: antislop 3.2.19. This installer carries 3.2.20.```Then it asks one extra question:@@ -524,7 +525,7 @@ Use this when you have no terminal, or when your AI is a chat window you cannotIf you pasted the contents instead of giving the file, say: "Follow the install instructions I pasted. I want the UI and copywriting skill." The AI follows the instructions and sets antislop up. Say "core only" to skip skills.-3. Answer the wizard's questions. It 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. With no saved preference, the agent keeps asking in every new session. To opt out, run `npx antislop-ai --mode during` (or `after`); `--mode ask` restores the question and `--mode` alone shows the setting. The shared setting lives in `~/.config/antislop/settings.json` on Linux and macOS, and `%APPDATA%\antislop\settings.json` on Windows, falling back to `~/.config` if `%APPDATA%` is unset. The skill announces the active mode and its source; an explicit mode requested in chat overrides the saved preference for that session.+3. Answer the wizard's questions. It 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. With no saved preference, the agent keeps asking in every new session. To opt out, run `npx antislop-ai --mode during` (or `after`) if you have a terminal; `--mode ask` restores the question and `--mode` alone shows the setting. The shared setting lives in `~/.config/antislop/settings.json` on Linux and macOS, and `%APPDATA%\antislop\settings.json` on Windows, falling back to `~/.config` if `%APPDATA%` is unset. The skill announces the active mode and its source; an explicit mode requested in chat overrides the saved preference for that session.#### Update@@ -540,7 +541,7 @@ Delete the `antislop.md` file you downloaded. If you attached it to a chat projeThe installer, the skills directory, and the plugin doors all need a terminal, so none of them runs on a phone. Updating and removing are the same as [The single file](#the-single-file).-- Claude Projects, ChatGPT Projects, and Gemini Gems all accept a file as reference material, and all three work on a phone. Download `antislop.md`, attach it to the project, and add a short instruction telling the AI to follow it. This is the simplest route and the one to try first. A 50 KB file is far below every limit these products publish.+- Claude Projects, ChatGPT Projects, and Gemini Gems all accept a file as reference material, and all three work on a phone. Download `antislop.md`, attach it to the project, and add a short instruction telling the AI to follow it. This is the simplest route and the one to try first. A file this size is far below every limit these products publish.- Claude Skills is the second option, and the one that behaves most like a real install. Claude can take antislop as a skill, and skills run in the Claude apps. The upload screen is on the web, so do this part at a computer: turn on code execution under Settings and Capabilities, then go to Customize and add a skill. Each antislop skill is a folder holding a `SKILL.md`, so zip the folder with the folder itself at the top level and upload that. Upload the core (`antislop`) as well, because the other skills reference the core rules by number instead of repeating them.- One honest difference. In a coding agent, antislop arrives as a skill, which is an instruction the agent is built to follow. In a chat app it arrives as reference material the AI is meant to follow. It is context, not a gate, and no chat app runs the Delivery Gate for you. The rules still do real work on tone and structure, but nothing enforces them.- Do not try to install it from a terminal on a phone. Android has Termux and it can run Node, but it is officially experimental. On iOS there is no supported way at all.@@ -622,6 +623,18 @@ Nothing notifies you that a new version is out. Two places always carry the currTo find out what you have, open the installed `antislop` folder and read its `VERSION` file, which names the release it came from. Or ask your agent "which antislop version is installed?" and it reads the file for you. A folder with no `VERSION` file predates that file, so it is old enough to update without checking anything else. The installer route can skip this entirely, because it prints both versions itself.+### Usage modes++antislop runs one of two ways, and by default the agent asks which at the start of every session. **During** guides the work as it is built and closes with the Delivery Gate report. **After** audits work you already have and lists what to fix.++To stop that question, save a preference once:++```bash+npx antislop-ai --mode during+```++`after` saves the other mode, `ask` restores the question in every session, and `--mode` on its own prints the setting. The preference is shared, so one command covers every agent and every project. It lives in `~/.config/antislop/settings.json` on Linux and macOS and in `%APPDATA%\antislop\settings.json` on Windows. A mode you ask for in the current chat still wins for that session and never changes the saved one. If your agent can write files, asking it to remember a mode works too.+### Where each agent reads antislop fromThe installer writes into the folder your agent reads. This is what it writes and where:@@ -657,15 +670,15 @@ Copilot, OpenCode, Kimi Code, and Pi read that home-level folder too, so a globaAntigravity, Copilot, Kimi Code, and Amp all read `.agents/skills/`. Copilot also reads `.github/skills/` and `.claude/skills/`, and Kimi Code also reads `.kimi-code/skills/`, but there is no reason to write a second copy, so picking them together installs once.-Cline is the exception to the pattern: its own folder is `.cline/skills/`, and it reads `.claude/skills/` beside it, so there is a real second copy to worry about. Amp and Pi sit in both groups, because each shares the folder above and also reads a second one.+Cline is the exception to the pattern: its own folder is `.cline/skills/`, and it reads `.claude/skills/` beside it, so there is a real second copy to worry about. Amp sits in both groups, because it shares the folder above and also reads `.claude/skills/`. Pi belongs to the second group only: its own folder is `.pi/skills/`, and it reads `.agents/skills/` beside it.-#### Six agents read more than one folder, and that is a problem+#### Seven agents read more than one folder, and that is a problem-OpenCode loads skills from `.opencode/skills/`, `.claude/skills/`, and `.agents/skills/`, and its documentation asks that skill names be unique across every location while never saying which copy wins if they are not. Codex walks `.agents/skills/` up from the working directory, Hermes reads both `.hermes/skills/` and `.agents/skills/`, Cline and Amp each load `.claude/skills/` beside their own folder, and Pi loads `.agents/skills/` beside its own.+OpenCode loads skills from `.opencode/skills/`, `.claude/skills/`, and `.agents/skills/`, and its documentation asks that skill names be unique across every location while never saying which copy wins if they are not. Codex walks `.agents/skills/` up from the working directory, Hermes reads both `.hermes/skills/` and `.agents/skills/`, Cline and Amp each load `.claude/skills/` beside their own folder, Copilot loads `.claude/skills/` beside the shared `.agents/skills/`, and Pi loads `.agents/skills/` beside its own.-So a collision takes two selections: OpenCode, Cline, or Amp beside Claude Code, or Codex, Hermes, or Pi beside any of Antigravity, Copilot, Kimi Code, or Amp, or OpenCode beside any of those. The same skill names then land in two folders that one agent reads. The installer names that when it happens, and the fix is to remove the copy you do not need, usually the `.opencode/skills/` one, since OpenCode reads the other folder by its own documentation.+So a collision takes two selections: OpenCode, Cline, Amp, or Copilot beside Claude Code, or Codex, Hermes, or Pi beside any of Antigravity, Copilot, Kimi Code, or Amp, or OpenCode beside any of those. The same skill names then land in two folders that one agent reads. The installer names that when it happens, and the fix is to remove the copy you do not need, usually the `.opencode/skills/` one, since OpenCode reads the other folder by its own documentation.-Two of the six also resolve a collision that comes from scope rather than from two folders, and they resolve it the unusual way round: Cline and Amp both let a global skill outrank a project skill of the same name, so a stale global install silently wins over a fresh project one. Their own documentation is the source for that. Pi settles a collision of its own, in the opposite direction: project `.pi/skills/` outranks both the shared `.agents/skills/` and the user-level `~/.pi/agent/skills/`, which its own loader was read for. The other agents here do not settle it.+Two of the seven also resolve a collision that comes from scope rather than from two folders, and they resolve it the unusual way round: Cline and Amp both let a global skill outrank a project skill of the same name, so a stale global install silently wins over a fresh project one. Their own documentation is the source for that. Pi settles a collision of its own, in the opposite direction: project `.pi/skills/` outranks both the shared `.agents/skills/` and the user-level `~/.pi/agent/skills/`, which its own loader was read for. The other agents here do not settle it.#### The pointer file each agent readsdiff --git a/ROADMAP.md b/ROADMAP.mdindex 313c08c..81d90b4 100644--- a/ROADMAP.md+++ b/ROADMAP.md@@ -60,6 +60,7 @@ Up to v3.0.0 each +0.1 shipped exactly one new skill, which kept the filter pull| v3.2.17 | Pi installer target and package door, verified on a real install rather than on documentation. The package is read from a `pi` key in the root `package.json`. || v3.2.18 | Oh My Pi plugin door, also verified on a real install. The catalog is documented and the manifest was not, so `.omp-plugin/` ships only the catalog. || v3.2.19 | The community files (CONTRIBUTING.md, CODE_OF_CONDUCT.md, the issue templates, and a pull request template), a README and a guide read end to end for the first time since v3.0.0, and a skill catalogue generated into the guide. |+| v3.2.20 | Usage modes become a saved preference, opt-in and announced with its source, with a session choice still winning. From community PR #29. |## What's next@@ -73,7 +74,7 @@ Every door is verified against the vendor's current documentation before its ver| Version | Item | What it means ||---------|------|---------------|-| v3.2.20 | Maintenance | A macOS probe, because none of the door probes above ran on it, so a report from that platform can be split into what the installer got wrong and what the agent's own configuration explains. No new agent: a `windows-latest` CI job, because CI runs on Linux alone while this repository is developed on Windows, plus a re-check of the plugin-door probes against real installs and probes for the three doors the installer still cannot see (Kimi Code, Cline, and Oh My Pi), so the notice that follows an install names all seven rather than four. |+| v3.2.21 | Maintenance | A macOS probe, because none of the door probes above ran on it, so a report from that platform can be split into what the installer got wrong and what the agent's own configuration explains. No new agent: a `windows-latest` CI job, because CI runs on Linux alone while this repository is developed on Windows, plus a re-check of the plugin-door probes against real installs and probes for the three doors the installer still cannot see (Kimi Code, Cline, and Oh My Pi), so the notice that follows an install names all seven rather than four. |Beyond the numbered plan, with no promised version:diff --git a/SECURITY.md b/SECURITY.mdindex ea9fe01..fb12799 100644--- a/SECURITY.md+++ b/SECURITY.md@@ -35,9 +35,9 @@ A finding noted that antislop reads `DESIGN.md` for design direction. The core n- It never downloads or runs code from the network.- It never reads, sends, or logs credentials or private data.-- It changes files only with your approval, and only to add its own pointer block.+- It changes files only when you run a command that does, and only where you pointed it: the installer copies the skill folders you chose into the agent folder you picked, and on a project install adds a pointer block to the entry files of the agents you picked, the wizard adds only that pointer block, and `npx antislop-ai --mode during` (or `after`, or `ask`) writes your saved usage mode to a settings file under your home directory. Nothing else in your project or your home directory is touched.- It is fully open source. Read the skills, the installer, and the checker before you install.## Verdicts that cleared-Socket previously warned on an install command that the wizard named. The wizard no longer names any install command or repo path, and Socket now passes.+Socket previously warned on an install command that the wizard's install steps named. Those steps no longer name one: a missing skill is reported and left to the user to fetch from the matching release. Socket now passes.diff --git a/antislop.md b/antislop.mdindex 9ea9af0..dc3a3aa 100644--- a/antislop.md+++ b/antislop.md@@ -55,7 +55,7 @@ If no antislop pointer exists and this file is being read for the first time, ruNotes:- 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 file-write access for step 5 (the pointer block), and nothing else; the user approves once. It never needs network access.+- The wizard needs file-write access for step 5 (the pointer block) and nothing else to install; the user approves once. A `DESIGN.md` in step 3 and an audit report in Mode 2 are written separately, only when the work calls for them. It never needs network access.- 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).### Already installed, and the user asks how to updatediff --git a/cli/index.mjs b/cli/index.mjsindex e835aad..797fc3d 100644--- a/cli/index.mjs+++ b/cli/index.mjs@@ -51,8 +51,15 @@ function printPluginDoors(found) {}async function main() {+ // A mistyped mode is a user error, so it gets one line like the terminal guard below+ // rather than the stack trace the top-level catch would print.if (process.argv[2] === '--mode') {- console.log(configureMode(process.argv.slice(3)))+ try {+ console.log(configureMode(process.argv.slice(3)))+ } catch (error) {+ console.error(`antislop: ${error.message}`)+ process.exit(1)+ }return}if (process.argv.includes('--version') || process.argv.includes('-v')) {diff --git a/cli/lib/install.mjs b/cli/lib/install.mjsindex 7d05709..6093df1 100644--- a/cli/lib/install.mjs+++ b/cli/lib/install.mjs@@ -42,8 +42,9 @@ export const AGENTS = [{ id: 'gemini', label: 'Gemini CLI', dir: '.gemini/skills', entry: 'GEMINI.md' },// Hermes reads a project's .hermes/skills and .agents/skills, project tier first.{ id: 'hermes', label: 'Hermes', dir: '.hermes/skills', readsAlso: ['.agents/skills'], entry: 'AGENTS.md' },- // Copilot reads the shared .agents/skills folder, so it shares Antigravity's target.- { id: 'copilot', label: 'GitHub Copilot', dir: '.agents/skills', entry: 'AGENTS.md' },+ // Copilot reads the shared .agents/skills folder, so it shares Antigravity's target,+ // and .claude/skills beside it, which is where a Claude Code install lands.+ { id: 'copilot', label: 'GitHub Copilot', dir: '.agents/skills', readsAlso: ['.claude/skills'], entry: 'AGENTS.md' },// Kimi Code reads the shared folder at both scopes. Its own .kimi-code/skills is never// written here, and $KIMI_CODE_HOME/skills moves with an env var the installer cannot see.{ id: 'kimi', label: 'Kimi Code', dir: '.agents/skills', entry: 'AGENTS.md' },@@ -83,7 +84,7 @@ export function resolveTargets(location, selected = AGENTS.map((a) => a.id)) {return [...byPath.values()]}-// Six rows read more than one project folder, so installing into two of them puts the+// Seven rows read more than one project folder, so installing into two of them puts the// same names in both. Only Pi settles which copy wins, so name it either way.export function detectDuplicateReads({ targets, location }) {if (location !== 'project') return []diff --git a/cli/lib/settings.mjs b/cli/lib/settings.mjsindex 41db4a2..7e7337a 100644--- a/cli/lib/settings.mjs+++ b/cli/lib/settings.mjs@@ -30,7 +30,13 @@ export function configureMode(args, file = settingsPath) {if (args.length > 1 || (args.length === 1 && !modes.includes(args[0]))) {throw new Error('Usage: antislop-ai --mode [during|after|ask]')}- const settings = readSettings(file)+ let settings+ try {+ settings = readSettings(file)+ } catch (error) {+ // A file we cannot parse is never overwritten, so the message is the only way out.+ throw new Error(`${error.message} Fix or delete it to start over.`)+ }if (args.length) {settings.mode = args[0]fs.mkdirSync(path.dirname(file), { recursive: true })diff --git a/cli/scripts/smoke-test.mjs b/cli/scripts/smoke-test.mjsindex 8b7ed3e..6368587 100644--- a/cli/scripts/smoke-test.mjs+++ b/cli/scripts/smoke-test.mjs@@ -58,8 +58,9 @@ if (cliDeps) {encoding: 'utf8',stdio: ['ignore', 'pipe', 'pipe'],})- if (invalidMode.status !== 1 || !/Usage: antislop-ai --mode/.test(invalidMode.stderr)) {- reasons.push('mode command did not validate its argument before the terminal guard')+ const cleanError = /^antislop: /.test(invalidMode.stderr) && !/\n\s+at /.test(invalidMode.stderr)+ if (invalidMode.status !== 1 || !/Usage: antislop-ai --mode/.test(invalidMode.stderr) || !cleanError) {+ reasons.push('the mode command must exit 1 on one clean line, not a stack trace')}const noTty = spawnSync(process.execPath, [path.join(__dirname, '..', 'index.mjs')], {cwd: tmp,diff --git a/cli/scripts/smoke-worker.mjs b/cli/scripts/smoke-worker.mjsindex 1d2a5d5..6c43325 100644--- a/cli/scripts/smoke-worker.mjs+++ b/cli/scripts/smoke-worker.mjs@@ -54,7 +54,9 @@ assert.throws(() => configureMode(['during', 'extra'], settingsFile), /Usage:/)assert.equal(readSettings(settingsFile).mode, 'after')for (const content of ['{broken', 'null', '[]', '"during"']) {fs.writeFileSync(settingsFile, content)- assert.throws(() => configureMode(['during'], settingsFile))+ // The refusal is right, but it has to name the way out: --mode is the only command+ // that can fix this file, so a message with no instruction is a dead end.+ assert.throws(() => configureMode(['during'], settingsFile), /Fix or delete/)assert.equal(fs.readFileSync(settingsFile, 'utf8'), content)}for (const mode of ['invalid', null, 1]) {@@ -198,6 +200,8 @@ check('E one folder alone is not a duplicate', detectDuplicateReads({ targets: rcheck('E cline duplicate read named', detectDuplicateReads({ targets: resolveTargets('project', ['claude', 'cline']), location: 'project' }).map((d) => [d.agent.id, d.paths.length]), [['cline', 2]])// Amp loads .claude/skills beside the shared folder, so Claude Code plus Amp collides too.check('E amp duplicate read named', detectDuplicateReads({ targets: resolveTargets('project', ['claude', 'amp']), location: 'project' }).map((d) => [d.agent.id, d.paths.length]), [['amp', 2]])+// Copilot reads .claude/skills beside the shared folder, so Claude Code plus Copilot collides.+check('E copilot duplicate read named', detectDuplicateReads({ targets: resolveTargets('project', ['claude', 'copilot']), location: 'project' }).map((d) => [d.agent.id, d.paths.length]), [['copilot', 2]])check('E global scope is not checked', detectDuplicateReads({ targets: resolveTargets('global', ['claude', 'opencode']), location: 'global' }), [])// Codex's global scope is the shared folder, not ~/.codex/skills, which Codex calls deprecated.diff --git a/scripts/check-repo.mjs b/scripts/check-repo.mjsindex 26c40b6..2b48c99 100644--- a/scripts/check-repo.mjs+++ b/scripts/check-repo.mjs@@ -48,7 +48,18 @@ const COMMUNITY = [/** R-02's carve-out, encoded so a new em dash in ordinary prose still fails. */function emDashes() {const bad = []- const files = ['antislop.md', 'README.md', 'GUIDE.md', 'ROADMAP.md', 'SECURITY.md', ...COMMUNITY, ...SKILLS]+ // The rules/ pointers ship to plugin users, so the ban covers them like any other doc.+ const files = [+ 'antislop.md',+ 'README.md',+ 'GUIDE.md',+ 'ROADMAP.md',+ 'SECURITY.md',+ 'rules/antislop.md',+ 'rules/antislop.mdc',+ ...COMMUNITY,+ ...SKILLS,+ ]for (const file of files) {let section = ''diff --git a/skills/antislop/SKILL.md b/skills/antislop/SKILL.mdindex a8ee11b..dce8541 100644--- a/skills/antislop/SKILL.md+++ b/skills/antislop/SKILL.md@@ -60,7 +60,7 @@ If no antislop pointer exists and this file is being read for the first time, ruNotes:- 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 file-write access for step 5 (the pointer block), and nothing else; the user approves once. It never needs network access.+- The wizard needs file-write access for step 5 (the pointer block) and nothing else to install; the user approves once. A `DESIGN.md` in step 3 and an audit report in Mode 2 are written separately, only when the work calls for them. It never needs network access.- 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).### Already installed, and the user asks how to update