Incantations - House rules for AI agents, with a guard that enforces them

Incantations turns how a team works with AI into 63 step-by-step skills, house rules and guard hooks that block risky actions. It runs in Cursor, Claude Code and Codex.

  • Product
  • In use on our projects
The guard, stopping the agent that was writing this page
Blocked by Incantations guard: cat .env may hold secrets and must not be sent to the model. Ask the user for the specific non-secret value you need, or read the .example file.

AI is fast. What matters is what stops it.

An AI agent will push to production, skip a check or open a password file if nothing stands in its way. Asking it nicely is not a control. Incantations turns our way of working into something the tools enforce.

The problem

Analysts, designers and engineers now all work with AI agents, often in different tools. Without shared rules, each person and each tool works its own way, and what one person learns stays with them.

A rule in a document only helps if the agent follows it. The important rules have to hold even when it doesn't.

  • 63skills
  • 5roles covered
  • 3AI tools
  • 65automated tests, all passing
/discoveryAn analyst finds out what the business needs
/design-briefA designer sets out flows, screens and states
/to-specThe approved requirements
/planA short plan for a small change
/to-ticketsWork split into pieces
/implementAn engineer and agents build it
/code-reviewEvery change checked against the spec and the standards
/acceptance-checkAn analyst checks it does what was asked
Every step leaves a file in the project for the next person.

What we built

A skill is a recipe you call by name, such as /discovery or /to-spec. It runs a set procedure and leaves a file behind, so an analyst's findings reach the designer, and the designer's brief reaches the engineer.

The house rule is short: no feature gets built without an approved spec or plan. The skills enforce it. Each role has one front door, so nobody has to memorize 63 commands.

It learns from its own mistakes

/retro reads recent agent sessions and finds where the agents lost time. /correct turns a repeated mistake into a check that catches it next time.

On Sitnish, a retro found that checking the iPhone app by hand took a third of all the agent's tool calls. That finding became a ticket for automated tests.

What we left out, and why

A public marketplace

You install it from a private repository, so a team controls exactly what its agents run.

New dependencies

Scripts are bash and standard Python, so installing needs only git and Python.

Writing it all ourselves

About 38 of the 63 skills started from open source work, including Matt Pocock's skills and pstack. We keep their licences and credits in the repository.

Where it stands

Built since September 2026, with 82 commits and 36 pull requests, and now at version 0.12.0. It runs on our projects today.

We don't have an hours-saved figure, and no evaluation suite measures the quality of what the skills produce yet. So we don't claim either.

For the technical reader

Four layers, because each one misses something

Rules can be ignored. Gates can be skipped. Hooks only see commands. Reviews come late. Each layer catches what the one before it misses.

RulesAlways-on instructions in every chat: small diffs, no secrets, honest reports
GatesReady and done checklists, and no build without a spec
Guard hooksCode that blocks risky actions, even if the agent ignores the rules
ReviewCode review on every diff, an acceptance check for user-facing work
One Python guard, standard library only, wired into all three tools.

Three hard problems

Three tools that behave differently

The problem

Cursor, Claude Code and Codex each run hooks their own way. Codex can't stop to ask a person, and Cursor has no hook for file edits.

What we decided
One guard script for all three. Where a tool can't ask a person, ask becomes block. The differences are written down in a coverage table.
What it cost us
Coverage isn't equal. File edits in Cursor have no guard at all, and we say so in the docs.

A guard that silently did nothing

The problem

Cursor treats a hook's matcher as a regex and skips the hook when a command misses it. Our matcher missed secrets.json, keystores and key files, so the guard never ran on them.

What we decided
We removed the matcher, so the guard runs on every shell command. A lint stops a matcher from coming back.
What it cost us
The guard now runs on every command in Cursor, including the harmless ones.

Blocking the right thing

The problem

A commit message that mentions secrets.json is harmless. A script that opens it is not. Blocking both makes people turn the guard off.

What we decided
The guard reads commands the way a careful reviewer would. A heredoc that only feeds text to a tool passes. One that a shell runs gets checked.
What it cost us
It is a seatbelt, not a vault. It matches names, not contents, and if it crashes it lets the action through. Branch protection on the server is still needed.

The guard stopped the agent writing this page

The block at the top of this page is real. While gathering facts for this case study, the agent ran a test with cat .env in it as sample text. It wasn't reading a secret, but a guard can't know that, so it blocked the whole command.

The agent didn't work around it. It ran the guard's own test suite instead.

How we checked it

All 65 automated tests pass, run on October 30, 2026: 46 on the guard, 11 on the cloud install and 8 on the retro script. A lint checks all 63 skills on every pull request.

What the agents did, and what people did

Agents co-authored 19 of the 82 commits. People decide what goes in, and the guard stops an agent from merging on GitHub, so a person merges every change.

What this means for your process

When we build your first workflow, these rules are on. No feature without an approved spec, no agent pushing to your production branch, no agent merging its own work.

The First Workflow gives you a working version of your own process, and a person decides what ships.

Have a process like this?

Book a 20-minute call

You describe the process. If a First Workflow fits, you get a one-page proposal within 2 working days. If it doesn't, we say so.

Book a call

You'll talk to Sandi, our founder. No slides.

Not ready for a call? Send us the process in writing. We reply within one working day.

Free download

The First Workflow kit: find the process worth turning into software

Ten signs a process is ready, what AI can do in a back office today, a worksheet to price your process, build or buy and the questions to ask any software vendor. Seven pages, written for people who run operations.

Want our eyes on your process? Get a free scorecard
We use your email for this and, if you tick the box, the Letter. Unsubscribe with one click. See our privacy policy.
Book a 20-minute call