Skip to content

Guardrails / claude

Claude reads the instruction file the repository keeps ​

claude/instructions-symlinked@v1

CLAUDE.md is a symbolic link to AGENTS.md, not a second copy of it or missing altogether.

Idclaude/instructions-symlinked
Versionv1
Categoryclaude
Default severitywarning
Interpreterpython3
Timeout30 seconds
Violations tolerated0
Collectsfiles

Collectors ​

This guardrail doesn't gather anything itself. It relies on the collectors below, which the CLI runs once per build before any check, and reads what they found from GUARDRAIL_FACTS. If a collector collects nothing, this guardrail is skipped, not failed.

CollectorGathersInputs it is given
filesPresence, size and line counts of the well known files a repository is expected to carry, plus any extra path the guardrail asks for.paths

The inputs above are this guardrail's own inputs, passed straight through to the collector. Setting one in buildnote.json changes what is collected, and two guardrails configured the same way share a single collection.

Configuration ​

json
{
  "guardrails": {
      "failOn": "error",
      "checks": [
          {
              "use": "claude/instructions-symlinked@v1",
              "severity": "warning",
              "with": {
                  "paths": "CLAUDE.md,AGENTS.md"
              },
              "exemptions": []
          }
      ]
  }
}

Inputs ​

InputDescriptionDefaultEnvironment variable
pathsThe alias first, then the file it must be a symbolic link to. Both are relative to the directory the CLI runs in.CLAUDE.md,AGENTS.mdGUARDRAIL_INPUT_PATHS

How to fix ​

Point the alias at the file the repository actually keeps:

bash
ln -sf AGENTS.md CLAUDE.md
git add CLAUDE.md

Claude Code reads CLAUDE.md, while every other agent follows the agents.md convention and reads AGENTS.md. With only one of the two files, only some of the agents working in the repository get instructions. With two separate files, the instructions drift apart within a month.

Make sure the link is committed as a link. On a Windows checkout, git config core.symlinks must be true; otherwise git writes a text file containing the target's name, and that is what both agents read.

More in claude ​

All 3 claude guardrails

Buildnote Limited
Registered in England and Wales, Reg: 16140412