Automation & Agents
I Gave My AI a Constitution, Then Had Another AI Audit It — The Auditor Was the First to Screw Up
By the end you'll have three mechanisms that stop the rules you gave your AI from quietly rotting: turn quantifiable checks into scripts (zero output = all pass), stamp every negative claim with a verification date, and periodically run an independent audit in a brand-new conversation. Comes with copy-paste prompts — no coding background needed.
One Core Idea (remember this one)
Writing “must” in a rule accomplishes nothing.
Humans skip rules, and so do AIs — not out of malice, “must do X” just carries no enforcement on its own. A rule that actually works looks like this:
- It has an executable check (a command you run — zero output means everything passed, any output tells you exactly what’s wrong).
- It has a threshold and an example (“dispatch a subagent past 3 files” beats “dispatch one when there are a lot of files”).
- It has a freshness stamp (every factual claim carries a verification date).
Step by Step
Step 1: Write the “constitution” — one page is enough
Open a plain text file (the kind your AI tool automatically reads every conversation — for Claude Code, that’s CLAUDE.md). Write exactly four things:
- Goal: what you want the AI to prioritize (e.g., cost-consciousness, always check commercial licensing).
- Task workflow: write acceptance criteria before starting → execute → check against the criteria → if the same problem fails to fix after 3 attempts, stop and ask you.
- Red lines: things it must always ask you before doing (deleting files, spending money, publishing externally, anything irreversible).
- Memory: which file to write progress to when a conversation ends.
The one rule that matters: be specific and checkable. “A lot of files” doesn’t work; “more than 3 files” does.
A prompt you can copy directly:
I want to set up a set of long-term behavior rules for you, written into
a config file you read every time. I'm new to this — please:
1) ask me up to 5 questions to understand my working style;
2) produce a one-page draft where every rule has a concrete number or
clear threshold, avoiding words like "as needed" or "a lot";
3) explain what incident each rule is meant to prevent.
Step 2: Split long rules out — the main file stays an index
The main config file gets loaded every single conversation, and that costs tokens (= money). Move long content (dispatch templates, decision checklists) into separate files, and leave the main file with one line: “for situation X, read file Y first.” Rule of thumb: keep the main file under 150 lines.
Step 3: Turn checks into scripts (the single most valuable step here)
Any rule that’s quantifiable — “file can’t exceed N characters,” “confirm X before replying” — should become a check script. The contract: zero output means everything passed; each line of output is one problem plus how to fix it.
A prompt you can use:
Write me a check script (my system is Windows/macOS — confirm which first):
verify file A doesn't exceed N characters, file B doesn't exceed M lines.
Requirements: 1) zero output when fully compliant; 2) when over the limit,
print one line per issue with "which file, measured value, limit, what to do";
3) clearly distinguish "characters" from "bytes" (a CJK character is roughly
3 bytes — measuring the wrong unit causes false positives);
4) tell me how to run it and how to read the output.
Then hard-code into your rules: “after saving state at the end of a conversation, run this script and paste the output in your reply.”
Step 4: Stamp every negative claim with a date
An AI’s memory files often accumulate claims like “model X is no longer available” or “approach Y doesn’t work.” These are the most dangerous kind: going stale produces no error — it just silently closes off an option that’s actually usable again. Add this rule:
Any claim that “X is unavailable / dead / will fail” must carry a verification date. Before abandoning an option based on a negative claim older than 7 days, spend one command re-verifying it first.
Step 5: Periodically dispatch a “second AI” to audit
At regular intervals (or after major rule changes), open a brand-new conversation — don’t ask “check yourself” in the same conversation that wrote the rules, it will self-certify with the exact same blind spots — and paste in the entire rule file.
A prompt you can use:
You are an adversarial reviewer with no connection to whoever wrote these
rules. Go through the following rule file item by item:
1) Do any two rules contradict each other (same action, different instructions)?
2) Is there a "deadlock" combination (e.g., must do A to close out the task,
but can't do A without approval)?
3) Do the referenced paths, tool names, and versions still actually exist?
4) Is any sentence ambiguous enough to be executed two different ways?
For each issue found, give me: severity, location, one-line fix.
Pitfalls You Will Hit
- Unit confusion: in our real test, the auditor AI measured “bytes” against a “character” limit (a CJK character is roughly 3 bytes) and flagged a fully compliant file as over-limit, nearly writing a nonexistent violation into the official record. Fix: any “over-limit / violation” conclusion must be re-measured with the exact command the rules specify before it gets written down — better yet, let a script do it.
- Rule bloat: every pitfall hit adds another rule, and two months later the rules are longer than the actual work, so the AI just skips reading the whole thing. Fix: cap the rule file’s length; once you’re over, merge ten lessons into one rule — adding rules feels like progress, but deleting them is what actually is.
- Fake audits: asking an AI to “check yourself” in the same conversation lets it talk itself into passing using the same flawed assumptions that produced the rules. Fix: audits always happen in a new conversation, with no implementation history given — only the rules and the criteria.
Universal Rescue: How to Ask AI When You’re Stuck
I'm following a tutorial on "setting up rules for an AI," and I'm stuck
at step N.
My environment: (Windows or Mac, which AI tool).
What I did: (paste your last action).
What happened: (paste the full error message or screen text).
Walk me through this one step at a time — give me only one action, then
wait for me to report back before the next one.
One-Line Summary
A rule’s enforcement power doesn’t come from the word “must” — it comes from an executable check, a fact stamped with a date, and a pair of eyes with no stake in the outcome.
This is part of an ongoing series of field notes and AI tool tests. To get the full SOPs and future posts, subscribe to the newsletter.
Support this work:Support on Ko-fi