ArticlesComparison
C² vs GUARDRAILS.md: safety that compounds
GUARDRAILS.md captures safety lessons so an autonomous agent stops repeating failures. How it relates to a full contextbase.
There's a small, smart idea spreading through the autonomous-agent world: GUARDRAILS.md — a file where you write down safety lessons so the agent stops repeating its failures. If you've read anything here about gotchas and the contextbase, it'll sound familiar, because it's the same instinct applied to one domain. That makes it a useful lens for understanding what C² is doing more broadly.
Here's an honest comparison: what GUARDRAILS.md gets right, where a single safety file stops, and how the two fit together.
What GUARDRAILS.md is for
GUARDRAILS.md is a file-based safety protocol for autonomous coding agents. The idea: when an agent does something dangerous or wrong, you capture the lesson in a file — and because the agent reads that file, it doesn't make the same mistake again. It acts as the agent's safety memory across context resets, which an agent otherwise lacks.
It exists because of a brutal fact about autonomous agents: the same prompt can succeed nine times and fail catastrophically on the tenth. A written record of past failures is how you stop the tenth from being the first time, every time.
Safety as captured lessons
The mechanism is exactly right, and it's worth naming because it's the same one that makes C² work: an agent has no memory, so you give it one by writing things down where it reads them. GUARDRAILS.md applies that to safety — captured failures, read before acting, so they don't recur.
This is the gotcha pattern, scoped to safety. When an agent keeps relearning the same lesson, the fix isn't a better prompt — it's a written record. GUARDRAILS.md is that record for the specific, high-stakes case of safety.
Stuart Leo
An agent forgets its mistakes the moment the session ends. GUARDRAILS.md remembers them for it — that's the whole, correct idea.
Where a single safety file stops
So what's the limit? It's scope. GUARDRAILS.md is one file about one thing: safety. But an agent needs written, read-before-acting memory about far more than safety — the architecture decisions, the conventions, the briefs, the gotchas that aren't dangerous but are merely expensive to rediscover.
A single safety file solves the safety slice and leaves the rest in your head, in chat, evaporating. You end up with a guardrails file and the same forgetting problem everywhere else. The instinct is right — the coverage is partial.
How C² folds safety into a compounding contextbase
C² takes the same instinct — write it down, read it first — and applies it to the whole project. The contextbase is version-controlled knowledge the agent reads before acting, covering everything:
| GUARDRAILS.md | C² contextbase | |
|---|---|---|
| Mechanism | Write it down, read before acting | Same |
| Scope | Safety lessons | Decisions, patterns, gotchas, briefs, safety |
| Memory across resets | Yes, for safety | Yes, for the whole project |
| Compounds | Within safety | Across everything the project learns |
Safety, in C², isn't a separate file fighting the same battle alone. It's one kind of knowledge in a contextbase where decisions, patterns, and gotchas all compound together — and where the overnight-run guardrails live alongside the rest of what the project knows.
Use both
This isn't really a rivalry — it's a part and a whole. A GUARDRAILS.md is a safety-focused slice of a contextbase, and a perfectly good one. Keep it as a clear home for safety rules if you like, have your Router point at it, and let the rest of your project's knowledge live in the same contextbase beside it. The principle is identical at every scale: write it down, read it first.
A safety file is a great start — the contextbase is where safety, decisions and knowledge compound together.
Start here: see how to run agents overnight safely, C² vs native rule files, or read the method.
FAQ
- What is GUARDRAILS.md?
- GUARDRAILS.md is a file-based safety protocol for autonomous AI coding agents. It captures lessons from past failures and acts as the agent's memory across context resets, so the same mistakes don't recur. It's a focused, valuable idea: write safety knowledge down where the agent will read it.
- How is C² different from GUARDRAILS.md?
- GUARDRAILS.md is a single file focused on safety lessons. C² is a full method whose contextbase captures the same kind of written-down, read-before-acting knowledge — but across everything: decisions, patterns, gotchas, briefs, not only safety. GUARDRAILS.md is one file doing what a contextbase does for the whole project.
- Can I use GUARDRAILS.md with C²?
- Yes. A GUARDRAILS.md is essentially a safety-focused slice of a contextbase. You can keep one as a clear home for safety rules and have your Router point at it, with the rest of your decisions, patterns and gotchas living alongside it. The principle is identical — write it down, read it first.
Related
Unattended agents can ship real work while you sleep — or wreck things. The guardrails that make overnight runs safe: branches, scopes, cost caps, no prod.
C² vs native rule files: when one CLAUDE.md isn't enoughCLAUDE.md, AGENTS.md and cursorrules are where everyone starts. An honest look at what a single rules file does well, where it breaks, and how C² extends it.