agentleFS
guardrails-aiguardrails-ai/guardrails/CLAUDE.md

guardrails

CLAUDE.md7.5k starsChanged 8 months agoApache-2.0View on GitHub

This repo separates compatibility (what users are allowed to install) from security (what we actually ship and test against). The two live in different files and must be managed differently: - pyproject.toml — keep dependency ranges WIDE. Floors and ceilings here exist to express genuine compatibility boundaries (a real API break, a known-incompatible major), not to pin security-patched versions. Do not raise a floor just to dodge a CVE. Narrow ranges here propagate into every downstream project that installs guardrails-ai,…

We split this CLAUDE.md into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Prefer fixing a transitive cap at its source: if a first-party package (e.g.

    line 25
  2. Very specific:

    Only add an environment marker (e.g.

    line 28
  3. Very specific:

    Run them inside the project venv (source .venv/bin/activate).

    line 40

≈ “Common” is an estimate: at least 1 in 5 of the 25,680 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Guardrails — contributor guidance for Claude

Dependency strategy (IMPORTANT — always follow)

This repo separates compatibility (what users are allowed to install) from security (what we actually ship and test against). The two live in different files and must be managed differently:

  • pyproject.toml — keep dependency ranges WIDE. Floors and ceilings here exist to express genuine compatibility boundaries (a real API break, a known-incompatible major), not to pin security-patched versions. Do not raise a floor just to dodge a CVE. Narrow ranges here propagate into every downstream project that installs guardrails-ai, causing resolver conflicts for users.
  • poetry.lock — pin the SAFE, patched versions. Dependabot scans the lock file, so the lock is where security fixes land. Within the wide pyproject ranges, the lock should resolve to the latest patched releases.

How to apply

  • To fix a Dependabot/security alert: widen the pyproject range only as far as needed to allow the patched version (e.g. if the fix is in a new major, raise the ceiling), then update poetry.lock to the patched version with poetry update <pkg> (or a full rm poetry.lock && poetry lock to also re-resolve non-active marker branches — poetry update will not re-resolve marker branches like python_version >= "3.x").
  • Prefer fixing a transitive cap at its source: if a first-party package (e.g. guardrails-api) caps a dependency below a security fix, raise the cap in that package and release it, rather than pinning around it here.
  • Only add an environment marker (e.g. ; python_version < '3.15') to a pyproject dependency when a transitive constraint makes a version genuinely unresolvable for part of the supported Python range — not as a convenience.

Gates — all three must pass before any dependency change is "done"

make lint    # ruff check + format --check
make type    # pyright guardrails/
make test    # pytest tests/

Run them inside the project venv (source .venv/bin/activate). Never install into system Python; if the venv is broken, recreate it (make refresh).

Download now (ZIP)

Trending

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Aug 30: 0 new projectsWeek of Sep 6: 0 new projectsWeek of Sep 13: 0 new projectsWeek of Sep 20: 0 new projectsWeek of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projects
Aug 2026Sep 2026Oct 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Who's talking about guardrails-ai/guardrails

The biggest 5 of 51 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 51

Talked about on GitHub and Hacker News (51 times).

On GitHub · 50

45 more on GitHub

On Hacker News · 1

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.