Map the instruction files, skills, hooks and checks that carry one of a project's principles, and audit whether they still reinforce it. principles keeps the committed map and audit record; the agent judges and fixes.
Tighter harness, longer running agents: trust the principles, loosen the supervision.
Every time your agent goes off the rails, you add a line somewhere. A rule in CLAUDE.md. A note in a skill. A check in a hook. A few days in, the same rule lives in five places, worded five slightly different ways, and nobody, not you and not your agent, knows which one wins.
So you're forced to always watch your agent, because you can't trust it. That's harness drift.
principles gives your agent a map of every place each of its operating principles lives: CLAUDE.md and AGENTS.md, rule files, skills, subagents and hooks. When any of those places changes, it tells your agent which principle is affected and has it read them together, settle what disagrees and record the result. The CLI keeps the books; your agent does the judging. You do less babysitting.
Who is this for?
You'll get the most from it when:
a team of people and their agents use the same harness and repo to do their work, and need to establish shared SOPs that all of them follow;
your agents need to run for long stretches, and need their operating principles reinforced consistently across CLAUDE.md/AGENTS.md, rules, skills, subagents, hooks and all the rest of the context management vectors a harness provides.
If your project has a single CLAUDE.md or AGENTS.md at its root, principles is overkill. You can read that one file and keep it consistent yourself. Come back when your rules start to spread.
Here is one of realfast's projects, where an agent answers which principles are in place, how many places carry each, and which findings are still open:
Install
Claude Code is fully supported. Codex is mostly supported and Pi is coming soon.
In Claude Code, add this repository as a plugin marketplace, install the plugin, reload your plugins, and start:
/principles:principles starts your agent mapping your project's principles. From there it follows what each result tells it, so you never need to learn the commands. The plugin also adds hooks that report which mapped places changed as each session starts and after each commit, and a setup-ruby skill your agent follows, asking you first, when no Ruby 3.4 is found.
From a terminal, or for another harness, install the gem instead. In Claude Code, the ! prefix runs a shell command in your session:
! gem install principles
Then ask your agent to map your project's principles. It runs principles list-principles and follows what each result tells it, so you never need to learn the commands. principles needs Ruby 3.4, and finds one installed by rbenv when the Ruby on your PATH is another version.
The problem: harness drift
Your agent works the way its harness tells it to: CLAUDE.md files, rules, skills, subagents, hooks and the scripts they call. A team's operating principles, such as test first or never commit on a red build, each end up written in several of those files.
Then someone sharpens a rule in CLAUDE.md but not in the reviewer subagent. Every file still loads and nothing errors, but your agent now reads instructions that disagree. That is drift. Left to pile up, it becomes debt: the same rule at different strengths, stale exceptions, checks nobody remembers adding. No review catches it, because each edit looks fine on its own. The problem lives between the files.