R280 Keep instruction files apart from other files in a change, and the migration to compiled instructions whole
Superseded by R334 Keep changes to the instruction system apart from other changes.
Change instruction files in a change of their own, never together with changes to other files, with one exception: move a repository’s instructions from hand-written files onto files compiled from a rule set in a single change, which adds to the commit hooks and CI the repository has the check that the compiled files equal what their sources compile to, and holds nothing but the move and that check.
Reason
A single change that both altered the instructions binding agents and did work they govern would let an agent rewrite the provisions that bind it and so get around them (Art. X §4).
The change that moves a repository onto compiled instructions is the exception. The hook and CI steps it adds only compare the compiled files with what their sources compile to: they keep the new instructions what their sources say, do no work those instructions govern, and give an agent no way to rewrite what binds it. Split in two, either the compiled files land with nothing to keep them in step with their sources until the second change, or the check lands first and fails on files that do not exist yet. Anything else in that change would be work the new instructions govern, so it holds nothing else.
Verification
Instruction files are the files that direct or constrain agents:
AGENTS.mdin any directory, and the file an agent tool reads in its place there, for exampleCLAUDE.md;- everything under
.agents/skills/and under the skill directories of agent tools, for example.claude/skills/; - subagent definitions and slash commands of agent tools, for example everything under
.claude/agents/and.claude/commands/; - the hooks and permission settings of agent tools, for example
.claude/settings.json,.claude/settings.local.json,.claude/hooks/and everything under.codex/; - the sources that instructions are compiled or generated from, such as the sources of the constitution and of the rules, and a repository’s rule set and its lock file;
- any other path that a repository declares as instructions in its own
AGENTS.md.
CI configuration, git commit hook configuration and tool code are not instruction files. A generated file goes with the side that changed it (rule 47).
The migration change is the change before which no instruction file of the repository is compiled from a rule set and after which one is; the instructions it moves away from, such as hand-written files kept as legacy copies, are instruction files too. With statute it is the change that adds statute.toml to a repository whose base has none, which a check can tell from the changed files; a later change that redoes the rule set is no migration change. The migration change holds only the move and the compile check:
- the instruction files the move touches: the rule set, its lock file and the repository’s own rules, the files the build writes (the compiled instruction files, the skills it installs and the like), and the instructions it moves away from, deleted, renamed or kept as legacy copies;
- the changes to commit hook configuration and CI configuration that add the check that the compiled files equal what their sources compile to (with statute,
statute compile --check), to each of the two the repository has at the base of the change, and nothing else in that configuration; a CI that runs every commit hook gets the check from the hook, and its configuration needs no change. The review checks that they do nothing else.
Every other change (a pull request) whose changed files include both instruction files and other files does not comply (Art. X §4); a rename counts as removing the old path and adding the new one. The agent splits it in two (rule 48). The rule holds whether or not the repository has a check for it (rule 49); where it has none, review enforces it.
When unsure whether a file is an instruction file, treat it as one.
Violated when the changed files of a change other than the migration change include both instruction files and other files, or when the migration change holds anything besides the move and the compile check, or does not add the compile check to each of the commit hooks and the CI that the repository has at its base.