R334 Keep changes to the instruction system apart from other changes

Off by default

Change the instruction system in a change of its own, never together with changes to anything else; the instruction system is the instruction files together with what serves them and has to change with them, such as the commit hook and CI steps that install the compiler of the instructions, pin its version or run it; and have the change that first compiles a repository’s instructions from a rule set add the check that the compiled files equal what their sources compile to, to each of the commit hooks and the CI the repository has.

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).

What only installs, builds or checks the instructions does no work they govern and gives an agent no way to rewrite what binds it: it is part of the instructions as a whole, and goes with them. A rule set’s lock file and the commit hook that runs the compiler both pin the compiler’s version and must agree, so split into two changes, the hook fails on the one in between. The change that first moves a repository onto compiled instructions is the same case: the compiled files and the hook and CI steps that keep them equal to their sources belong together, and without that check nothing would keep the compiled files equal to their sources, so that change adds it.

Verification

Instruction files are the files that direct or constrain agents:

  • AGENTS.md in any directory, and the file an agent tool reads in its place there, for example CLAUDE.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;
  • the hand-written instructions a repository keeps as legacy copies once its instructions are compiled;
  • any other path that a repository declares as instructions in its own AGENTS.md.

The instruction system is the instruction files together with what serves them and has to change with them: in the configuration of the commit hooks and of CI, the entries that install the compiler of the instructions, pin its version or run it. The rest of that configuration, the code of tools, the compiler’s own code included, and every other file are outside it. A file that holds both, such as a commit hook configuration with other hooks in it, counts by what the change alters in it. A generated file goes with the side that changed it (rule 47).

A change (a pull request) that alters both the instruction system and anything outside it 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.

The change that first compiles a repository’s instructions is the one before which no instruction file of the repository is compiled from a rule set and after which one is; with statute, the change that adds statute.toml to a repository whose base has none. It adds the compile check (with statute, statute compile --check) to each of the commit hooks and the CI the repository has at its base; a CI that runs every commit hook gets the check from the hook.

When unsure whether a file is an instruction file, treat it as one.

Violated when a change alters both the instruction system and anything outside it, or when the change that first compiles a repository’s instructions does not add the compile check to each of the commit hooks and the CI the repository has at its base.

Provisions of the constitution it cites

Relations

Parent
R275 Instruction Changes
Requires
none
Conflicts with
none

Metadata

ID
334
Revision
1
Kind
rule
Status
trial
Slug
instruction-system-apart
Default level
project
Constitution revisions
>=1
Check
none
Default
off
Uses
Instructions instructions, Review review
Original language
English en
Translations
Chinese zh