Install the pact
From nothing to your first finished task, in Claude Code. For Codex or Antigravity, use the complete install reference.
Before you start
- It is one person’s setup. Read it, borrow from it or install it, with your own judgement.
- It changes every Claude Code session on your machine, in every project.
- It installs into Codex and Antigravity too, if you have them. You can leave one out.
- It turns on Claude Code’s auto mode. Claude Code then judges most actions itself instead of asking you. You can set
permissions.defaultModeback afterwards, but each later install turns it on again. - It adds five hooks to Claude Code. They save a session’s place before a long conversation is shortened, and put it back after.
- It takes over your own rules file. If you have a
~/.claude/CLAUDE.md, the install refuses until you move it somewhere safe. Step 3 tells you if you need to. - Review reports go where your project keeps its record, word for word, security findings included. If that is a public issue tracker, others can read them.
- Going back is done by hand. Read how before you install.
1Check what you need
You need Claude Code, git, and Node 24 or later.
node --version
git --versionv24.22.0
git version 2.51.02Get the pact
Clone it, and stay in its folder for the next two steps. Read the rules in pact/rules.md as you would anything that changes how your agent behaves.
git clone https://github.com/mephistopheles4/the-pact.git
cd the-pactCloning into 'the-pact'...
...3See what it would change
This shows the whole install and installs nothing.
node gate/install.mjsIt prints a lot. A warning about security defaults near the top is normal on a first install: you have no configuration yet, so you get the pact’s own. Then find Harnesses, the list of agents it found, and look for these below it:
- Overwrite, once for each place it installs to, counts the files it would replace.
- settings.json lists each setting it would change.
- A warning about
.claude/CLAUDE.mdmeans you have a rules file of your own. Move it somewhere safe and run this again.
Where it says “the owner”, that is you.
== claude (Claude Code) ==
Drift: 0
Overwrite: 0
Add: 20
...
settings.json: would be created from the overlay
set permissions.defaultMode = "auto"
...
Dry run only. After the owner's go-ahead, run:
... node gate/install.mjs --apply ...
RESULT: pass4Install it
Copy the command that step 3 printed under “Dry run only”, and run it. If the pact’s files or the rules you were shown have changed since, it refuses, and you run step 3 again. It has this shape:
node gate/install.mjs --apply --commit <commit> --rendered-hash <hash>BACKUP STARTED
...
Applying.
...
Installed commit af1ec39... all files verified.
RESULT: pass5Check that it took
Start a new Claude Code session in any other folder, and type this. The lenses review work. Scout searches code.
/agentsadversarial-lens
behaviour-lens
conventions-lens
data-lens
executability-lens
integrity-lens
reader-lens
unstated-lens
scout6Give it one small task
Open a session in a project of yours and describe one small, real bug. Watch for the line marked ⚑ that says which tier it picked, what it says it skipped, and the point where it hands the work to you. If you disagree, say so in plain words.
In the example, the tier was the agent’s decision. Accepting the work was yours.
> notes --version prints "undefined". Fix it.
▸ Workflow: Software Delivery
⚑ Checkpoint: picked Quick tier — one small bug, one session
▸ Stage: Build (Quick)
The version was read from a file that isn't packaged. I wrote a test that failed, then fixed it. The test passes. I skipped the lenses, since it is one line. The fix is on a branch, ready for you.
> Looks right. Merge it.Set up a project
When you want more from it in one project, open a session there and type this. It asks a few questions, such as what matters most and what to protect against, and you can skip any of them.
/pact:inscribeIt shows you each file before it writes it, only adds to files you have, and commits nothing.
Update it later
In the pact’s folder, get the new version, then do steps 3 and 4 again.
git pull --ff-onlyGo back
Each install first copies what it will replace into ~/.pact/backups/. There is no undo command. You put the files back yourself, following the steps for undoing an install.
If you moved a CLAUDE.md of your own in step 3, put that back too. The backup doesn’t hold it.