guardian
AGENTS.md1 starsChanged 5 months agoMITView on GitHub
This file makes Guardian's production-debugging method available to any AI coding agent that reads AGENTS.md (Codex CLI, Cursor, GitHub Copilot, Windsurf, Amp, Devin, Aider, Zed, Jules, VS Code, JetBrains Junie, and others). It is the flat-file adapter of the Guardian skill. The full per-domain knowledge lives in the references/ directory next to this file — read the relevant reference on demand as directed below. If you are running in a tool that supports the open agent skills spec (Claude Code,…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository3 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/guardian.mdcCursor rule
- guardianSkill
The file
We split this AGENTS.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Correlate (if multiple signals): When you have more than one signal, pivot between them on shared keys (time window, trace_id, release, …
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.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.
Files
Guardian — AGENTS.md
This file makes Guardian's production-debugging method available to any AI coding agent that reads AGENTS.md (Codex CLI, Cursor, GitHub Copilot, Windsurf, Amp, Devin, Aider, Zed, Jules, VS Code, JetBrains Junie, and others). It is the flat-file adapter of the Guardian skill. The full per-domain knowledge lives in the references/ directory next to this file — read the relevant reference on demand as directed below.
If you are running in a tool that supports the open agent skills spec (Claude Code, Claude.ai, Codex skills), prefer installing the
SKILL.mdskill folder instead — it adds automatic triggering and on-demand loading. SeeINSTALL.md.
When to apply this
Apply Guardian's method whenever the user is dealing with a production issue: an outage, a crash, an error, a failing service, a slow endpoint, a memory leak, a crashing pod, a confusing dashboard — or whenever they paste a stack trace, logs, a Sentry issue, or output from Datadog, Kubernetes, an APM, or any observability tool. Also when they just say "my app is down," "why is this 500-ing," "this is slow in prod," or "what does this log mean."
Core principle: evidence before hypothesis
Do not guess a cause and then look for evidence to confirm it — that wastes hours. Instead: gather the signal → reconstruct the timeline → localize the failure to a layer → form a hypothesis only once evidence points somewhere → verify it against the evidence → propose a fix plus the exact way to confirm it. If evidence is insufficient, say so and name precisely what additional signal would unblock the analysis. Never fill a gap with a confident guess.
The method
- Intake. Classify the signal in front of you and open the matching reference (table below).
- Reconstruct the timeline. Order events; find the earliest anomaly, not the loudest error — the loud symptom (a 500 storm, an OOM) is usually downstream. Anchor to any deploy/config change whose timing lines up.
- Localize. A request flows
client → edge/LB → app code → data layer → external deps, withruntime/hostunderneath. Find which layer owns the failure before reasoning about why. A failure with no app log is a strong signal the problem is upstream of the app. - Correlate (if multiple signals). When you have more than one signal, pivot between them on shared keys (time window,
trace_id, release, host) to converge on one cause. Readreferences/cross-signal-correlation.md. A hypothesis confirmed by several independent signals is strong; from one signal it's a guess. - Root cause + fix. State the cause separately from the symptom. Give an immediate mitigation, the real fix, and the exact signal that verifies it's resolved.
Dispatch table — read the matching reference
| Signal in front of you | Read |
| A stack trace or exception | references/stack-traces.md |
| Raw logs (any format) | references/log-analysis.md |
| A Sentry issue / link / payload | references/sentry.md |
| Slow endpoint / latency / high resource use | references/performance.md |
| Crashing/restarting pod, OOMKill, K8s symptom | references/kubernetes.md |
| Slow queries, DB locks/deadlocks, pool errors | references/postgresql.md |
| Distributed trace, spans, multi-service issue | references/opentelemetry.md |
| Datadog APM trace, flame graph, monitor alert | references/datadog.md |
| Several signals at once | references/cross-signal-correlation.md |
These references are plain Markdown — open the one that matches and follow it. This mimics, by hand, the on-demand loading that the native skill does automatically.
Output
Match the response to the size of the problem.
Short mode (unambiguous cause, small fix — a typo, a wrong variable, a clear chained exception):
**The real problem:** [the cause, not the symptom — one sentence]
**Fix:** [the concrete change]
**Verify:** [the signal that confirms it]Full mode (cause not obvious, multiple layers, real outage, timeline matters):
## What's happening [symptom, 1-2 sentences]
## Timeline [ordered events, earliest anomaly → loud symptom]
## Root cause [cause, separated from symptom, with supporting evidence]
## Fix
**Now:** [immediate mitigation] **Real fix:** [root-cause resolution] **Verify:** [signal that confirms]
## If I'm wrong [next most likely cause and what evidence would point there]Even in short mode, name the cause, not the loud symptom. The brevity is in the formatting, not the rigor. When evidence genuinely isn't enough, the honest "here's what I can rule out, here's what I'd need to go further" beats a confident wrong answer.
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
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.

