Skip to content

Rules for an AI coding agent to filter out generic AI-generated UI designs, text, and code.

v3.2.16: the update answer, and plugin-door detection

miqdadbadjuber339e36455c00
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json
index 5cb0404..939f869 100644
--- a/.claude-plugin/marketplace.json
+++ b/.claude-plugin/marketplace.json
@@ -8,7 +8,7 @@
{
"name": "antislop",
"source": "./",
- "version": "3.2.15",
+ "version": "3.2.16",
"description": "Anti Slop: Rules for AI Coding Agents. Stops generic AI slop in generated UI, copy, and code. Loads as six skills."
}
]
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json
index be16897..47da364 100644
--- a/.claude-plugin/plugin.json
+++ b/.claude-plugin/plugin.json
@@ -1,7 +1,7 @@
{
"name": "antislop",
"displayName": "antislop",
- "version": "3.2.15",
+ "version": "3.2.16",
"description": "Anti Slop: Rules for AI Coding Agents. Stops generic AI slop in generated UI, copy, and code. Loads as six skills.",
"author": {
"name": "miqdadbadjuber"
diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json
index 1b9a2df..a1600a7 100644
--- a/.codex-plugin/plugin.json
+++ b/.codex-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "antislop",
- "version": "3.2.15",
+ "version": "3.2.16",
"description": "Anti Slop: Rules for AI Coding Agents. Stops generic AI slop in generated UI, copy, and code. Loads as six skills.",
"author": {
"name": "miqdadbadjuber"
diff --git a/.cursor-plugin/plugin.json b/.cursor-plugin/plugin.json
index 546bacd..a540382 100644
--- a/.cursor-plugin/plugin.json
+++ b/.cursor-plugin/plugin.json
@@ -2,7 +2,7 @@
"name": "antislop",
"displayName": "antislop",
"description": "Anti Slop: Rules for AI Coding Agents. Stops generic AI slop in generated UI, copy, and code. Loads as six skills.",
- "version": "3.2.15",
+ "version": "3.2.16",
"author": {
"name": "miqdadbadjuber"
},
diff --git a/.kimi-plugin/plugin.json b/.kimi-plugin/plugin.json
index c294b67..ca510d9 100644
--- a/.kimi-plugin/plugin.json
+++ b/.kimi-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "antislop",
- "version": "3.2.15",
+ "version": "3.2.16",
"description": "Anti Slop: Rules for AI Coding Agents. Stops generic AI slop in generated UI, copy, and code. Loads as six skills.",
"author": {
"name": "miqdadbadjuber"
diff --git a/GUIDE.md b/GUIDE.md
index 7a27197..6046b0a 100644
--- a/GUIDE.md
+++ b/GUIDE.md
@@ -234,12 +234,24 @@ The installer, the skills directory, and the plugin doors all need a terminal, s
## Update
-Nothing here is automatic unless a route below says it is. Every route updates by running that route's own command again, or by replacing the copy you made. Whichever route you use, your agent loads skills when a session starts, so close the session you are in and open a new one afterwards. Until you do, the old rules are still the ones loaded.
+Nothing here is automatic unless a route below says it is. Every route updates by running that route's own command again, or by replacing the copy you made. If you installed through the installer or the skills directory, you can skip straight to **One command, both file routes** below; the rest of this section is for the plugin doors and the single file. Whichever route you use, your agent loads skills when a session starts, so close the session you are in and open a new one afterwards. Until you do, the old rules are still the ones loaded.
**First, how do you know a new version is out?** Nothing notifies you. Two places always carry the current one: the [releases page](https://github.com/miqdadbadjuber/anti-slop/releases) and the version badge at the top of the [README](README.md).
**And which one do you have?** The installed `antislop` folder holds a `VERSION` file naming the release it came from. Open it, 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: it prints both versions itself.
+### One command, both file routes
+
+The installer and the skills directory write the same files into the same folders, and nothing on disk records which one you used, so there is one command that covers both:
+
+```bash
+npx antislop-ai --update
+```
+
+It looks in the current project and in your home directory, replaces every antislop folder it finds, keeps the skill selection each folder was installed with, and prints the release it replaced next to the one it wrote. It asks nothing, so it is also the one to use in a script.
+
+It cannot reach a plugin install. A plugin keeps its own copy under the agent that installed it, which is why the same command also reads the plugin stores it can find and prints the update command for each door it sees. The plugin doors section below covers them one by one, and the two routes it does cover are the two below.
+
### The installer
The installer copies files, so your project holds a snapshot. When a new version is released, run the same command again:
diff --git a/README.md b/README.md
index 04b81aa..8b79d32 100644
--- a/README.md
+++ b/README.md
@@ -186,7 +186,13 @@ curl -o antislop.md https://raw.githubusercontent.com/miqdadbadjuber/anti-slop/m
## Update
-antislop does not update itself and nothing tells you a release is out. Every route updates by running its own command again:
+antislop does not update itself and nothing tells you a release is out. Every route updates by running its own command again. If you installed through the installer or the skills directory, one command replaces whatever is already there, in this project and in your home directory, and asks nothing:
+
+```bash
+npx antislop-ai --update
+```
+
+It prints the release it replaced beside the one it wrote. It cannot touch a plugin install, because a plugin keeps a copy of its own under the agent that installed it, so it names the exact command for any plugin door it finds on your machine.
| Route | Update it with |
|-------|----------------|
@@ -232,11 +238,11 @@ antislop is used one of two ways, chosen at the start of a session:
## Roadmap
-**v3.2.15** is the current release.
+**v3.2.16** is the current release.
-- **Amp joins as an installer target.** It reads the shared `.agents/skills/` in a project, so picking it with Antigravity, Copilot, or Kimi Code installs antislop once. Under your home directory it reads `~/.config/agents/skills/`, a folder of its own, so a global install is the only one that writes somewhere new.
-- **A claim from the last release is corrected.** v3.2.14 said Cline was the only agent here that lets a global skill outrank a project one. Amp documents the same order, so the sentence now names both and stops speaking for the rest, whose documentation does not settle it.
-- **Amp gets no plugin door.** Cline bundles skills by dropping them in a `skills/` folder and scanning it. Amp does not scan one: every skill has to be registered by code, single-file plugins cannot register any, and the one-command install takes only single files. The installer row is the whole door.
+- **Updating is one command.** `npx antislop-ai --update` replaces every antislop folder it finds, in this project and in your home directory, keeps the skill selection each folder was installed with, and prints the release it replaced. It asks nothing, so it also works in a script.
+- **The installer names your plugin doors.** A plugin keeps a copy of its own that `--update` cannot reach, so it used to be a silent gap. The installer now reads the four vendor stores it can (Claude Code, Antigravity, Codex, Cursor), reports the version it finds there, and prints the exact update command for each. A door that changes its layout stops being named rather than breaking the run.
+- **Your agent answers the update question in the session.** The pointer block the installer writes into `AGENTS.md` and `CLAUDE.md`, and the block in `antislop.md`, now carry the update line, and the core lists the six plugin commands instead of deferring to `GUIDE.md`. That question used to be answerable only by a maintainer reading the guide.
Every earlier release, and what comes next, is in [ROADMAP.md](ROADMAP.md).
diff --git a/ROADMAP.md b/ROADMAP.md
index 71111aa..a0149a3 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -4,7 +4,7 @@
## Where we are
-The latest release is **v3.2.15**. antislop is a **packaged system**: a lean, always-loaded core plus five additive skills, each shipped as a standard agent skill folder (`skills/<name>/SKILL.md`). There are no per-skill READMEs.
+The latest release is **v3.2.16**. antislop is a **packaged system**: a lean, always-loaded core plus five additive skills, each shipped as a standard agent skill folder (`skills/<name>/SKILL.md`). There are no per-skill READMEs.
- **The core: 38 rules** across three tiers (Hard Gate, Purpose-Gate, Quality Locks), a Liveliness Toolkit, a mandatory Delivery Gate, and two usage modes (During / After). The count has held since v2.2 and the tiers have not moved, but individual rules have been sharpened many times since, and the release history below says where. The single-file `antislop.md` is still a complete filter you can paste into any chat window; its First-Run Install Wizard is the manual install path.
- **The six skills:** `antislop` (the core), plus `antislop-ui`, `antislop-copywriting`, `antislop-human`, `antislop-layoutmobile`, and `antislop-code`. Each skill only loads when the task needs it.
@@ -53,6 +53,7 @@ That kept the filter pull-only-what-you-need and made the v3 packaging mechanica
| v3.2.13 | A community round, both pull requests repairs rather than a new agent, which is what a maintenance slot is for. The installed release is now named on disk. Nothing in an antislop folder said which version it was, so "compare that against what you have" in the guide's Update section had nothing to compare against, the README had no Update section at all, and an agent asked the same question in a session had no answer either. `sync-skills` now writes `skills/antislop/VERSION` from `cli/package.json`, and because every install route copies that folder the stamp reaches the installer, the skills directory, the plugin doors and a manual copy alike. The installer reads it back and names both sides before it asks, so the choice is between two versions rather than between two abstractions; a folder with no `VERSION` file predates the stamp, and the prompt says that instead of inventing a number. `--version` reads the same source, which let `cli/index.mjs` drop its hardcoded version string: the version check trades that row for `skills/antislop/VERSION`, so the file is now one of the places a bump has to reach. The consequences land in the release flow, and they are deliberate: a version bump needs `node cli/scripts/sync-skills.mjs` before the commit or check-repo fails, which is the point of putting a generated file in that list. README gains an Update section with one row per route, and `antislop.md` gains a block so the next person to ask gets the answer from their own agent instead of a comment thread. The second repair is in the installer's fence scanner, reported by @CBOSSX. `scanMarkers` accepted a fence run followed by trailing text as a closing fence, so a fence line carrying an info string, three backticks followed by `js`, closed the block that contained it and the marker comments below were read as real ones: installing antislop into a project whose entry file documents antislop with a fenced example replaced the example with the pointer block. A closing fence may be followed only by spaces or tabs, which is CommonMark's rule and not a heuristic. The regression covers backtick and tilde fences and reinstall stability, and it fails on the old code. Kimi Code closes here as well. v3.2.12 shipped that door on the vendor's documentation and moved the live check into this slot; it was run after release by @fajarhide, who runs Kimi Code and opened the issue the door came from, and it works. That is a report from a real install rather than a probe a maintainer logged, so it is recorded as the weaker of the two kinds of evidence. The saved usage-mode preference did not arrive and moves to v3.2.16. |
| v3.2.14 | Cline, and the slot's premise did not survive the check it was written to force. The What's next row promised one `.agents/skills` reader, confirmed on its own rather than assumed from the shared folder, and reading the vendor's documentation is what broke it: Cline's docs never mention `.agents/skills`, and they list `.cline/skills/`, `.clinerules/skills/`, and `.claude/skills/` at project scope and `~/.cline/skills/` at global. So this is not a shared-folder door at all. It is a folder of its own, and the row was rewritten before any code was written. The installer writes `.cline/skills/` at both scopes, which needs no `globalDir` because the folder does not move with a variable, and the `AGENTS.md` block covers the pointer because Cline reads `AGENTS.md` and `~/.agents/AGENTS.md` as a cross-tool rule source. It takes `readsAlso: ['.claude/skills']`, because Cline loads that folder beside its own, so a project installed for Claude Code and Cline holds the same names twice and the duplicate warning has something to fire on, the collision OpenCode already had. One behaviour is documented by Cline itself and is now recorded in the README and the guide rather than left in the vendor's pages: when a global skill and a project skill share a name, the global one wins. The other agents here do not say which scope wins, so a stale global install can silently outrank a fresh project one. Plugin: Cline accepts a repo-installable plugin, so the door has two halves, but its manifest is not a JSON file like the Kimi and Cursor doors. `cline plugin install <git url>` reads a `cline` field out of the repository's root `package.json`, which makes this the first door that needed a root manifest and the first that changed the repository's own shape to open. The entry it points at, `.cline-plugin/plugin.js`, registers no tools and no hooks: the payload is the `skills/` folder the plugin bundles, which Cline discovers on install, so nothing is copied into a project. Cline's own documentation limits plugins to the SDK, the CLI, and Kanban and says the feature does not apply to the VS Code and JetBrains extensions, and the README and the guide repeat that instead of softening it, so this door covers a CLI install while the installer stays the route for an editor. The root `package.json` joins the version check, so a bump has to reach it too. Both halves of the door, and the CLI itself, still have no live check, and that moves to the next maintenance round. |
| v3.2.15 | Amp, and this time the premise held. The What's next row promised one `.agents/skills` reader confirmed on its own, which is exactly the claim Cline's documentation had broken one version earlier, so it was read the same way before any code was written: Amp documents `.agents/skills/` in the project and in searched parent directories, plus `.claude/skills/` beside them, so it does read the folder Antigravity, Copilot, and Kimi Code already share. It is the fourth member of that group rather than a folder of its own. Two fields part it from Cline's shape. It needs a `globalDir`, because the user-level path it documents is `~/.config/agents/skills/` and not the shared folder, and it takes `readsAlso: ['.claude/skills']`, because it loads that folder in the project and in parent directories, so a project installed for Claude Code and Amp holds the same names twice and the duplicate warning fires. The `AGENTS.md` block covers the pointer, because Amp always includes `AGENTS.md` from the working directory up to the home directory. Eleven agents still resolve to eight project folders. Plugin: Amp gets no door, and this is the first slot where a door was deliberately not opened rather than deferred. Amp does not scan a bundled `skills/` folder, so each skill has to be registered by a call when the plugin loads; single-file plugins cannot register skills at all, and the documented one-command install takes single files only; a directory plugin, which is the only kind that can register skills, has no one-command install from a repository URL; and a skill arriving through a plugin is renamed `<plugin>:<skill>`, which does not match the bare names the pointer block and the core already use. Against Cline's root manifest and two-line entry, that is real cost with no matching benefit, so Amp takes Copilot's shape: the installer is the whole door. The release also corrects two sentences it shipped one version earlier. v3.2.14 said Cline was the only agent here that lets a global skill outrank a project one, which was inferred from the silence of the other vendors rather than from their documentation, and Amp documents the same order explicitly, so the README and the guide now name both and stop speaking for the rest. The guide also counted the agents that read more than one folder as two; it is five, and the others are Codex, Hermes, and OpenCode. The rewrite of that paragraph then named Claude Code as the collision partner for all five, which is true of three of them: OpenCode, Cline, and Amp load `.claude/skills/`, while Codex and Hermes collide with the agents that write `.agents/skills/` instead. A matrix over every agent pair caught it against the code before the release, and the sentence now states both groups. |
+| v3.2.16 | The update answer, which is the one item in this slot that came from answering users rather than from reading code, and the reason it needed one. Every route was already documented in the README and the guide, and none of it helped, because a table is organised by route and the reader has to recognise which one they used before any row applies to them. Nothing on disk records it: an installer folder and a skills-directory folder hold the same files, so the two cannot be told apart even by looking. The fix moved the answer to where the question is asked. The pointer block the installer writes into `AGENTS.md` and `CLAUDE.md` now carries the update line, and the core's own update block names the six plugin commands instead of deferring every door to `GUIDE.md`, which is the sentence that made an agent answer "read the guide". The installer gained `--update` as well: it replaces every antislop folder it finds at project and global scope, keeps the skill selection each folder was installed with, prints the release it replaced beside the one it wrote, and asks nothing, so it runs unattended. It deliberately does not add a skill the user never installed, because an update that quietly widens the install is not an update. The scope list is a parameter rather than a constant so the smoke test cannot write into the home directory it runs under, which is the one place a test of this could do real damage. The second half exists because without it `--update` is a half answer. A plugin door keeps its own copy under the vendor's own store, so `--update` cannot reach it, and a user who installed that way would have run the command, been told nothing was found, and had no way to know why. The installer now probes four of those stores and prints the exact update command for each door it finds: Claude Code's `installed_plugins.json`, which carries the version itself; Codex's `plugins/cache/antislop/<version>/`, where the version is the directory name; and the git clones Antigravity and Cursor keep under `.gemini/config/plugins/` and `.cursor/plugins/local/`. It reports a version only where the store supplies one, says unknown rather than guessing when a clone predates the `VERSION` file, and a probe that misses because a vendor moved its layout goes silent instead of failing the run, which is the whole reason the read is wrapped. Every path in that list is internal to a vendor and none is documented as a stable interface, so the code says so where the probes are written. Two doors are deliberately absent. Cline's and Kimi Code's stores are named in their documentation but their layouts are not: Cline's docs stop at `_installed/` and never describe the naming below it, and Kimi's name `installed.json` without naming its parent directory or its shape. Neither tool is installed on this machine, so neither could be checked, and a probe written on a guess is exactly what this slot exists to remove; the four that shipped were each verified against a real install here, which is also where the problem showed itself. Four stale plugin copies sat on the maintainer's own machine, at 3.2.8, 3.2.12, and two clones older than the `VERSION` file, against a current release of 3.2.15, and nothing in the installer had ever mentioned them. The saved usage-mode preference stays open with its author rather than landing here. |
## What's next
@@ -66,9 +67,9 @@ Every door is verified against the vendor's current documentation before its ver
| Version | Item | What it means |
|---------|------|---------------|
-| v3.2.16 | Maintenance | No new agent. The same round again, and it carries what v3.2.13 and v3.2.14 could not finish, plus the one thing the maintainer hit while answering users rather than while reading code. The saved usage-mode preference lands here if its author brings the Windows settings path and the fresh-session proof, and both halves of the Cline door get their live check here. The third item is the update answer, which was split across three places and reachable in none of them. The pointer block the installer writes into `AGENTS.md` and `CLAUDE.md` names the skills and never mentions updating, and the core's own update block lists the installer, the skills directory, and the single file but defers every plugin door to `GUIDE.md`, so an agent asked how to update tells the user to read the guide. The guide is organised by route because the route is the only thing that decides the command, and nothing on disk records which route was used: an installer folder and a skills-directory folder are byte-identical copies, so the reader has to recognise themselves before they can read the row. Two changes follow. The pointer block gains the update line, so the answer comes from the agent in the session where the question is asked, and the installer names the exact command for any plugin door it can see installed, which turns reading a table into being told. On top of that the installer gains `--update`, which overwrites every antislop folder it finds at both scopes with no prompts and prints the version it replaced beside the one it wrote. That covers the installer and the skills directory, which are indistinguishable on disk and so need no separate path. It cannot cover the plugin doors or the single file, because those belong to the vendor's plugin system and to the user's own download. Nothing here can be automatic: antislop is a set of files plus a command the user runs, so an update that arrived on its own would need a background process or a network call at every session start, and both cost more than the problem. |
| v3.2.17 | Pi | The installer row, the `AGENTS.md` pointer, and the root `package.json` that makes this repo a Pi package. Oh My Pi is a fork of Pi and reads the same `pi` key, so this door is also what makes the repo discoverable there. |
| v3.2.18 | Oh My Pi | The marketplace catalog, if the Pi door above has not already covered the plugin path. Every catalog entry carries a version, because Oh My Pi's update checker permanently skips entries that lack one. |
+| v3.2.19 | Maintenance | No new agent, and the slot carries what v3.2.16 did not: both halves of the Cline door still have no live check, and the saved usage-mode preference lands here if its author brings the Windows settings path and the fresh-session proof. Two further items are candidates the same way every maintenance slot picks its own. The plugin-door probes are the first surface here that reads a vendor's private store rather than a documented one, so they are re-checked against a real install before the round ships, and a door whose layout moved is corrected or dropped rather than left to go quiet. Cline's and Kimi Code's stores stay out until their layouts can be read from documentation or from an install, which is what kept them out of v3.2.16. |
Beyond the numbered plan, with no promised version:
diff --git a/antislop.md b/antislop.md
index e08b5af..57bacd8 100644
--- a/antislop.md
+++ b/antislop.md
@@ -45,6 +45,7 @@ If no antislop pointer exists and this file is being read for the first time, ru
- Mobile / responsive: `skills/antislop-layoutmobile/SKILL.md`
- Code comments: `skills/antislop-code/SKILL.md`
Before starting, ask the user when antislop applies: during the work, or after it is done.
+ To update antislop later: download `antislop.md` again, or run `npx antislop-ai --update` if it was installed as skill folders.
<!-- antislop:end -->
```
The packaged installers write the same two markers, so whichever install path runs last replaces the block instead of adding a second one. If an older antislop block exists (even without the markers), replace just that block instead of appending a duplicate.
@@ -57,11 +58,17 @@ Notes:
### Already installed, and the user asks how to update
-antislop never updates itself, and nothing announces a new release. Answer from the route the user installed with, and say which route you are assuming when you cannot tell:
+antislop never updates itself, and nothing announces a new release. Answer from the route the user installed with, and say which route you are assuming when you cannot tell. `npx antislop-ai --update` is the shortest path for the first two routes: it replaces every antislop folder it finds, at project and global scope, prints the release it replaced, and asks nothing.
- **The installer** (`npx antislop-ai`): run it again, answer as before, and pick **Overwrite them**. It prints the version already on disk next to the version it carries, so nothing has to be compared by hand. *Keep what is there* installs nothing.
-- **The skills directory** (`npx skills add miqdadbadjuber/anti-slop`): run the same command again.
-- **A plugin door** (Claude Code, Antigravity, Codex, Cursor, Kimi Code, Cline): each agent has its own update command. `GUIDE.md` in the repo lists them one by one.
+- **The skills directory** (`npx skills add miqdadbadjuber/anti-slop`): run the same command again. An installer folder and a skills-directory folder hold the same files, so `--update` covers this route as well.
+- **A plugin door**: each agent keeps its own copy, and `--update` cannot reach those. The installer names the command for any door it finds installed; without it, these are the six:
+ - **Claude Code**: `claude plugin update antislop@anti-slop`
+ - **Antigravity**: `agy plugin install https://github.com/miqdadbadjuber/anti-slop`
+ - **Codex**: `codex plugin marketplace upgrade anti-slop`
+ - **Cursor**: `agent plugin marketplace update https://github.com/miqdadbadjuber/anti-slop`
+ - **Kimi Code**: `/plugins install https://github.com/miqdadbadjuber/anti-slop`
+ - **Cline**: `cline plugin install https://github.com/miqdadbadjuber/anti-slop.git --force`
- **This file alone**: download it again and replace the copy.
The folder this skill sits in holds a `VERSION` file naming the release it came from, unless it was installed before that file shipped. The current release is on the repo's releases page.
diff --git a/cli/index.mjs b/cli/index.mjs
index a4d11fa..3a97332 100644
--- a/cli/index.mjs
+++ b/cli/index.mjs
@@ -11,8 +11,10 @@ import {
detectAgents,
detectConflicts,
detectDuplicateReads,
+ detectPluginDoors,
installSkills,
installedVersion,
+ updateAll,
updatePointers,
VERSION,
} from './lib/install.mjs'
@@ -36,12 +38,45 @@ function displayDir(agent, location) {
return location === 'global' ? `~/${agent.globalDir ?? agent.dir}` : agent.dir
}
+// A plugin door keeps its own copy, so --update cannot reach it. Name the command for
+// the ones found rather than send the reader back to a table in the guide.
+function printPluginDoors(found) {
+ if (found.length === 0) return
+ console.log('\nInstalled as a plugin (these keep their own copy, so updating them is separate):')
+ for (const p of found) {
+ console.log(` ${p.door.label}${p.version ? ` ${p.version}` : ''}`)
+ console.log(` ${p.door.update}`)
+ }
+}
+
async function main() {
if (process.argv.includes('--version') || process.argv.includes('-v')) {
console.log(`antislop ${VERSION}`)
return
}
+ // --update is the non-interactive path, so it runs before the terminal guard and prints
+ // plain lines: an update is something a script or a user in a hurry can run unattended.
+ if (process.argv.includes('--update')) {
+ const { results, pointers } = updateAll()
+ if (results.length === 0) {
+ console.log(`antislop ${VERSION}: no installed folders found. Nothing to update.`)
+ } else {
+ for (const r of results) {
+ const from = r.from ? `antislop ${r.from}` : 'an older release that records no version'
+ console.log(`${r.path}`)
+ console.log(` ${from} -> antislop ${VERSION} (${r.skills.length} skill(s) for ${r.agents.join(', ')})`)
+ }
+ console.log(`\nUpdated ${results.length} folder(s) to antislop ${VERSION}.`)
+ if (pointers.length > 0) {
+ console.log(`Pointer refreshed in ${pointers.map((p) => path.basename(p)).join(', ')}.`)
+ }
+ console.log('Start a new agent session for the new rules to load.')
+ }
+ printPluginDoors(detectPluginDoors())
+ return
+ }
+
// Without a terminal the prompts read EOF at once: the run printed the banner, installed
// nothing, and still exited 0, so a script around it saw success. Fail loudly instead.
if (!process.stdin.isTTY) {
@@ -158,6 +193,10 @@ async function main() {
'It may load either copy. Remove one of them to be safe.'
)
}
+
+ // Installing through the installer does not update a plugin door the user also has,
+ // and nothing else would tell them that copy exists.
+ printPluginDoors(detectPluginDoors())
}
main().catch((err) => {
diff --git a/cli/lib/banner.mjs b/cli/lib/banner.mjs
index f0c17d0..0d1a696 100644
--- a/cli/lib/banner.mjs
+++ b/cli/lib/banner.mjs
@@ -15,7 +15,7 @@ export function banner() {
...LOGO,
'',
' ' + pc.dim('Anti Slop: Rules for AI Coding Agents'),
- ' ' + pc.dim('installer v3.2.15'),
+ ' ' + pc.dim('installer v3.2.16'),
'',
].join('\n')
}
diff --git a/cli/lib/install.mjs b/cli/lib/install.mjs
index 04acf30..673c375 100644
--- a/cli/lib/install.mjs
+++ b/cli/lib/install.mjs
@@ -103,6 +103,88 @@ export function detectAgents(location) {
return AGENTS.filter((a) => fs.existsSync(path.dirname(skillPath(a, location)))).map((a) => a.id)
}
+// The plugin doors keep a copy of their own under a vendor path, and none of those paths
+// is documented as a stable interface. These probes only read, and a miss stays silent.
+function readJSON(file) {
+ try {
+ return JSON.parse(fs.readFileSync(file, 'utf8'))
+ } catch {
+ return null
+ }
+}
+
+function listDirs(dir) {
+ try {
+ return fs.readdirSync(dir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name)
+ } catch {
+ return []
+ }
+}
+
+// A door that cloned the repo carries the VERSION file; one cloned before it shipped
+// does not, and an unknown version is reported as unknown rather than guessed.
+function cloneVersion(dir) {
+ try {
+ return fs.readFileSync(path.join(dir, 'skills', CORE, 'VERSION'), 'utf8').trim()
+ } catch {
+ return null
+ }
+}
+
+function findClone(dir) {
+ return fs.existsSync(dir) ? { path: dir, version: cloneVersion(dir) } : null
+}
+
+const claudePlugins = () => path.join(os.homedir(), '.claude', 'plugins', 'installed_plugins.json')
+
+export const PLUGIN_DOORS = [
+ {
+ id: 'claude',
+ label: 'Claude Code',
+ update: 'claude plugin update antislop@anti-slop',
+ find() {
+ const entry = readJSON(claudePlugins())?.plugins?.['antislop@anti-slop']?.[0]
+ return entry ? { path: entry.installPath ?? claudePlugins(), version: entry.version ?? null } : null
+ },
+ },
+ {
+ id: 'antigravity',
+ label: 'Antigravity',
+ update: 'agy plugin install https://github.com/miqdadbadjuber/anti-slop',
+ find: () => findClone(path.join(os.homedir(), '.gemini', 'config', 'plugins', CORE)),
+ },
+ {
+ id: 'codex',
+ label: 'Codex',
+ update: 'codex plugin marketplace upgrade anti-slop',
+ find() {
+ const cache = path.join(os.homedir(), '.codex', 'plugins', 'cache', 'anti-slop', CORE)
+ const versions = listDirs(cache).sort()
+ return versions.length ? { path: cache, version: versions[versions.length - 1] } : null
+ },
+ },
+ {
+ id: 'cursor',
+ label: 'Cursor',
+ update: 'agent plugin marketplace update https://github.com/miqdadbadjuber/anti-slop',
+ find: () => findClone(path.join(os.homedir(), '.cursor', 'plugins', 'local', 'anti-slop')),
+ },
+]
+
+// A door that moves its files breaks its own probe and nothing else: the installer stops
+// naming that door instead of failing, which is the whole reason a miss has to be silent.
+export function detectPluginDoors() {
+ return PLUGIN_DOORS.flatMap((door) => {
+ let found = null
+ try {
+ found = door.find()
+ } catch {
+ found = null
+ }
+ return found ? [{ door, ...found }] : []
+ })
+}
+
export function detectConflicts({ skills, targets }) {
const conflicts = []
for (const t of targets) {
@@ -158,6 +240,8 @@ const SKILL_LINES = {
'antislop-code': 'Code comments: `antislop-code`',
}
+export const SKILL_NAMES = Object.keys(SKILL_LINES)
+
// Names the skills rather than importing the core: an `@` import pulls all 46 KB
// of it into every session, including ones that touch no UI.
function pointerBlock(skills) {
@@ -167,6 +251,7 @@ function pointerBlock(skills) {
'For UI, copy, people, mobile layout, or code comments work, load the antislop skill for the task:',
...skills.filter((s) => SKILL_LINES[s]).map((s) => `- ${SKILL_LINES[s]}`),
'Before starting, ask the user when antislop applies: during the work, or after it is done.',
+ 'To update antislop later: `npx antislop-ai --update`, or run `npx antislop-ai` and pick Overwrite them.',
POINTER_END,
]
}
@@ -256,3 +341,33 @@ export function updatePointers({ targets, skills }) {
}
return written
}
+
+// `--update` replaces every antislop folder already on this machine, at both scopes and
+// with no prompts. Each folder keeps the skill selection it was installed with. The scope
+// list is a parameter so a test never writes into the home directory it runs under.
+export function updateAll({ locations = ['project', 'global'] } = {}) {
+ const results = []
+ const projectTargets = []
+ const projectSkills = new Set()
+
+ for (const location of locations) {
+ for (const target of resolveTargets(location)) {
+ if (!fs.existsSync(path.join(target.path, CORE))) continue
+ const skills = SKILL_NAMES.filter((s) => fs.existsSync(path.join(target.path, s)))
+ if (skills.length === 0) continue
+ const from = installedVersion(target.path)
+ installSkills({ skills, targets: [target], overwrite: true })
+ results.push({ location, path: target.path, agents: target.agents.map((a) => a.id), skills, from, to: VERSION })
+ if (location === 'project') {
+ projectTargets.push(target)
+ for (const s of skills) projectSkills.add(s)
+ }
+ }
+ }
+
+ // One block per entry file, so the union of every project folder's skills is the list.
+ const pointers = projectTargets.length > 0
+ ? updatePointers({ targets: projectTargets, skills: [...projectSkills] })
+ : []
+ return { results, pointers }
+}
diff --git a/cli/package-lock.json b/cli/package-lock.json
index 00ebb31..b3260a3 100644
--- a/cli/package-lock.json
+++ b/cli/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "antislop-ai",
- "version": "3.2.15",
+ "version": "3.2.16",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "antislop-ai",
- "version": "3.2.15",
+ "version": "3.2.16",
"license": "MIT",
"dependencies": {
"@clack/prompts": "^1.7.0",
diff --git a/cli/package.json b/cli/package.json
index facdba6..46a7e0d 100644
--- a/cli/package.json
+++ b/cli/package.json
@@ -1,6 +1,6 @@
{
"name": "antislop-ai",
- "version": "3.2.15",
+ "version": "3.2.16",
"description": "Interactive installer for the antislop skills. Anti Slop: Rules for AI Coding Agents.",
"type": "module",
"bin": {
diff --git a/cli/scripts/smoke-worker.mjs b/cli/scripts/smoke-worker.mjs
index 25567ff..e8070ae 100644
--- a/cli/scripts/smoke-worker.mjs
+++ b/cli/scripts/smoke-worker.mjs
@@ -3,6 +3,8 @@ import os from 'node:os'
import path from 'node:path'
import {
AGENTS,
+ CORE,
+ PLUGIN_DOORS,
skillSourceDir,
resolveTargets,
detectAgents,
@@ -10,6 +12,7 @@ import {
detectDuplicateReads,
installSkills,
installedVersion,
+ updateAll,
updatePointers,
VERSION,
} from '../lib/install.mjs'
@@ -224,6 +227,31 @@ updatePointers({ targets, skills })
check('J duplicate pair settles to one', (read().match(/antislop:start/g) || []).length, 1)
check('J duplicate pair keeps text', read().includes('Keep this too.'), true)
+// --update replaces what is already on disk, keeps each folder's skill selection, and
+// names the release it replaced. The scope list keeps a test out of the home directory.
+const present = resolveTargets('project').filter((t) => fs.existsSync(path.join(t.path, CORE)))
+check('K update finds the installed folders', present.length > 0, true)
+const upd = updateAll({ locations: ['project'] })
+check('K update reports every folder it found', upd.results.length, present.length)
+check('K update lands on this release', upd.results.every((r) => r.to === VERSION), true)
+check('K update keeps the skill selection', upd.results.every((r) => r.skills.includes(CORE)), true)
+check('K update writes a pointer', upd.pointers.length > 0, true)
+check('K pointer carries the update line', fs.readFileSync(path.join(process.cwd(), 'AGENTS.md'), 'utf8').includes('antislop-ai --update'), true)
+const again = updateAll({ locations: ['project'] })
+check('K update is repeatable', again.results.map((r) => r.from), upd.results.map((r) => r.to))
+
+// A clean directory has nothing to replace, and saying so is the whole answer.
+const clean = fs.mkdtempSync(path.join(os.tmpdir(), 'antislop-clean-'))
+const here = process.cwd()
+process.chdir(clean)
+check('K update says nothing when nothing is installed', updateAll({ locations: ['project'] }).results.length, 0)
+check('K update writes no pointer when nothing is installed', updateAll({ locations: ['project'] }).pointers.length, 0)
+process.chdir(here)
+fs.rmSync(clean, { recursive: true, force: true })
+
+// A door row without a command would print a blank line where the answer belongs.
+check('K every plugin door names itself and its command', PLUGIN_DOORS.filter((d) => !d.id || !d.label || !d.update).map((d) => d.id), [])
+
if (failures.length > 0) {
console.error(`\n${failures.length} check(s) failed: ${failures.join(', ')}`)
process.exit(1)
diff --git a/package.json b/package.json
index 9d4a481..6ca991e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "antislop",
- "version": "3.2.15",
+ "version": "3.2.16",
"private": true,
"type": "module",
"description": "Anti Slop: Rules for AI Coding Agents.",
diff --git a/skills/antislop-human/contrast-mcp.py b/skills/antislop-human/contrast-mcp.py
index 48deb0f..9d0ca8c 100644
--- a/skills/antislop-human/contrast-mcp.py
+++ b/skills/antislop-human/contrast-mcp.py
@@ -8,7 +8,7 @@ import sys
PROTOCOL_VERSION = "2024-11-05"
SERVER_NAME = "antislop-contrast"
-SERVER_VERSION = "3.2.15"
+SERVER_VERSION = "3.2.16"
TOOLS = [
{
diff --git a/skills/antislop/SKILL.md b/skills/antislop/SKILL.md
index 3898526..0a1d3b9 100644
--- a/skills/antislop/SKILL.md
+++ b/skills/antislop/SKILL.md
@@ -50,6 +50,7 @@ If no antislop pointer exists and this file is being read for the first time, ru
- Mobile / responsive: `skills/antislop-layoutmobile/SKILL.md`
- Code comments: `skills/antislop-code/SKILL.md`
Before starting, ask the user when antislop applies: during the work, or after it is done.
+ To update antislop later: download `antislop.md` again, or run `npx antislop-ai --update` if it was installed as skill folders.
<!-- antislop:end -->
```
The packaged installers write the same two markers, so whichever install path runs last replaces the block instead of adding a second one. If an older antislop block exists (even without the markers), replace just that block instead of appending a duplicate.
@@ -62,11 +63,17 @@ Notes:
### Already installed, and the user asks how to update
-antislop never updates itself, and nothing announces a new release. Answer from the route the user installed with, and say which route you are assuming when you cannot tell:
+antislop never updates itself, and nothing announces a new release. Answer from the route the user installed with, and say which route you are assuming when you cannot tell. `npx antislop-ai --update` is the shortest path for the first two routes: it replaces every antislop folder it finds, at project and global scope, prints the release it replaced, and asks nothing.
- **The installer** (`npx antislop-ai`): run it again, answer as before, and pick **Overwrite them**. It prints the version already on disk next to the version it carries, so nothing has to be compared by hand. *Keep what is there* installs nothing.
-- **The skills directory** (`npx skills add miqdadbadjuber/anti-slop`): run the same command again.
-- **A plugin door** (Claude Code, Antigravity, Codex, Cursor, Kimi Code, Cline): each agent has its own update command. `GUIDE.md` in the repo lists them one by one.
+- **The skills directory** (`npx skills add miqdadbadjuber/anti-slop`): run the same command again. An installer folder and a skills-directory folder hold the same files, so `--update` covers this route as well.
+- **A plugin door**: each agent keeps its own copy, and `--update` cannot reach those. The installer names the command for any door it finds installed; without it, these are the six:
+ - **Claude Code**: `claude plugin update antislop@anti-slop`
+ - **Antigravity**: `agy plugin install https://github.com/miqdadbadjuber/anti-slop`
+ - **Codex**: `codex plugin marketplace upgrade anti-slop`
+ - **Cursor**: `agent plugin marketplace update https://github.com/miqdadbadjuber/anti-slop`
+ - **Kimi Code**: `/plugins install https://github.com/miqdadbadjuber/anti-slop`
+ - **Cline**: `cline plugin install https://github.com/miqdadbadjuber/anti-slop.git --force`
- **This file alone**: download it again and replace the copy.
The folder this skill sits in holds a `VERSION` file naming the release it came from, unless it was installed before that file shipped. The current release is on the repo's releases page.
diff --git a/skills/antislop/VERSION b/skills/antislop/VERSION
index 5365c9e..c0f5d08 100644
--- a/skills/antislop/VERSION
+++ b/skills/antislop/VERSION
@@ -1 +1 @@
-3.2.15
+3.2.16