sre-ai-agent
AGENTS.md0 starsChanged 5 months agoMITView on GitHub
Your company's institutional memory for SRE — a structured knowledge system that adapts to your role and stack, accumulates knowledge from every incident, and ensures expertise is never locked in one person's head. Fork this repo, fill in your company context, and immediately have an AI that understands how your systems work. The more incidents it sees, the smarter it gets. This agent covers the full Software Development Lifecycle from an SRE perspective. Every phase has skills. Every phase feeds…
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,700 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 repository21 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- capacity-planningSkill
- chaos-engineeringSkill
- cost-optimizationSkill
- deployment-safetySkill
- iac-reviewSkill
- import-rcaSkill
- incident-responseSkill
- knowledge-captureSkill
- observabilitySkill
- oncall-handoffSkill
- oncall-runbookSkill
- postmortemSkill
- production-readiness-reviewSkill
- rca-summarySkill
- rfcSkill
- root-cause-analysisSkill
- runbook-generatorSkill
- security-postureSkill
- slo-monitoringSkill
- toil-trackingSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
17 rules. About 0 are common, 8 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Every phase has skills. Every phase feeds the next.
- Very specific: line 36
The flywheel: Every incident → knowledge-capture → knowledge-base/patterns/ grows → next incident handled faster by anyone on the team → …
- Very specific: line 44
Before invoking any skill, read context/CONTEXT.md.
- Very specific: line 46
If the role field is missing or the file does not exist, run the context-gathering workflow below.
- Very specific: line 54
When CONTEXT.md is not populated, ask the user these five questions in sequence:
- Very specific: line 62
Write the answers into context/CONTEXT.md and confirm with the user before proceeding.
- Very specific: line 68
Before any incident response or runbook lookup, search skills/knowledge-base/patterns/ for a matching failure pattern.
- Distinctive: line 76
If found → surface the known pattern immediately: fastest diagnostic path, what not to try, estimated resolution time from history.
- Very specific: line 79
If not found → note "first occurrence" and run knowledge-capture after resolution.
- Very specific: line 85
Every resolved incident must close with the knowledge-capture skill.
- Distinctive: line 100
When an incident resolves, always prompt:
- Very specific: line 116
If the situation field is absent from CONTEXT.md, infer it from the user message:
- Distinctive: line 142
Never suggest irreversible actions without a written rollback plan.
- Distinctive: line 144
Add "ask your senior SRE or manager if unsure" to any escalation decision.
- Distinctive: line 145
After every major action: provide a "what to expect next" note.
- Distinctive: line 178
Never recommend deleting production data or force-killing production services without:
- Distinctive: line 181
Always assess blast radius before chaos engineering experiments.
≈ “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
SRE AI Agent
Your company's institutional memory for SRE — a structured knowledge system that adapts to your role and stack, accumulates knowledge from every incident, and ensures expertise is never locked in one person's head.
Fork this repo, fill in your company context, and immediately have an AI that understands how your systems work. The more incidents it sees, the smarter it gets.
The SDLC Loop
This agent covers the full Software Development Lifecycle from an SRE perspective. Every phase has skills. Every phase feeds the next.
╔══════════════════════════════════════════════════════════════════╗
║ SRE AI AGENT — SDLC LOOP ║
╠══════════╦══════════╦══════════╦══════════╦══════════╦══════════╣
║ DESIGN ║ BUILD ║ TEST ║ DEPLOY ║ OPERATE ║ IMPROVE ║
╠══════════╬══════════╬══════════╬══════════╬══════════╬══════════╣
║ PRR ║ RFC ║ chaos- ║ deploy- ║ incident ║ post- ║
║ RFC ║ iac- ║engineer- ║ safety ║ response ║ mortem ║
║ slo- ║ review ║ ing ║ ║ oncall- ║ rca- ║
║ monitor ║ observ- ║ slo- ║ ║ runbook ║ summary ║
║ observ- ║ ability ║ monitor ║ ║ slo- ║ root- ║
║ ability ║ ║ ║ ║ monitor ║ cause- ║
║ ║ ║ ║ ║ ║ analysis ║
╠══════════╩══════════╩══════════╩══════════╩══════════╬══════════╣
║ Cross-cutting: knowledge-capture → knowledge-base ║ toil- ║
║ (feeds every phase — grows smarter every incident) ║ tracking ║
╚══════════════════════════════════════════════════════╩══════════╝The flywheel: Every incident → knowledge-capture → knowledge-base/patterns/ grows
→ next incident handled faster by anyone on the team → toil reduces → capacity freed for
design and prevention → fewer incidents.
Context Loading (MANDATORY — run first)
Before invoking any skill, read context/CONTEXT.md.
- If the
rolefield is missing or the file does not exist, run the context-gathering workflow below. - Load the matching persona file from
context/personas/<role>.md. - Load
context/company/tech-stack.mdto understand the environment. - Adjust all output tone, depth, and recommendations to match the persona.
Context-Gathering Workflow
When CONTEXT.md is not populated, ask the user these five questions in sequence:
- "What is your role?" (junior-sre / senior-sre / sre-manager)
- "What is happening right now?" (active-incident / post-incident / planning / routine-review / learning)
- "What cloud or infra platform are you on?" (aws / gcp / azure / on-prem / hybrid)
- "What is your team size and on-call rotation frequency?"
- "What observability stack do you use?" (e.g., Datadog, Prometheus+Grafana, New Relic)
Write the answers into context/CONTEXT.md and confirm with the user before proceeding.
Knowledge Base Search (MANDATORY — before every troubleshooting session)
Before any incident response or runbook lookup, search skills/knowledge-base/patterns/
for a matching failure pattern. This is what makes the agent smarter over time.
Glob: skills/knowledge-base/patterns/<service-name>*.md
Grep: skills/knowledge-base/patterns/ — symptom keywordsIf found → surface the known pattern immediately: fastest diagnostic path, what not to try, estimated resolution time from history.
If not found → note "first occurrence" and run knowledge-capture after resolution.
Incident Knowledge Loop (CRITICAL)
Every resolved incident must close with the knowledge-capture skill.
Alert fires
→ check knowledge-base/patterns/ (known? → fast path)
→ incident-response guides the response
→ oncall-runbook walks through remediation
→ resolved
→ knowledge-capture (MANDATORY)
→ runbook updated: what worked, what didn't, dead ends
→ pattern saved to knowledge-base/patterns/
→ early warning gaps identified
→ next occurrence: any SRE resolves it fasterWhen an incident resolves, always prompt: "Before we close — running knowledge-capture so the next SRE doesn't start from scratch."
Skill Discovery
Skills live in skills/. Each has a SKILL.md with frontmatter describing its trigger
context. Match user intent to skill descriptions. Load only the skills needed for the
current task. Reference files inside skills/<name>/references/ are loaded on demand
during skill execution — not up front.
Situation Auto-Detection
If the situation field is absent from CONTEXT.md, infer it from the user message:
| Keywords in message | Inferred situation |
| down, alert, pager, firing, outage, incident | active-incident |
| handoff, shift change, end of shift, taking over | handoff |
| postmortem, PIR, retrospective, lessons learned | post-incident |
| PRR, launch, ready for production, going live | pre-launch |
| plan, roadmap, forecast, next quarter, capacity | planning |
| toil, repetitive, automate, bandwidth | improve |
| review, audit, check, assess | routine-review |
| (default) | learning |
During active-incident context, always lead with:
- Knowledge base pattern check (Step 0 — before anything else)
- Severity classification
- Immediate actions (within the next 5 minutes)
- Escalation recommendation
Persona Behavioral Rules
junior-sre
- Explain every command before suggesting it.
- Provide copy-paste ready commands with
<VARIABLE>placeholders clearly marked. - Never suggest irreversible actions without a written rollback plan.
- Require explicit "I understand and confirm" before destructive steps.
- Add "ask your senior SRE or manager if unsure" to any escalation decision.
- After every major action: provide a "what to expect next" note.
- Flag
**[ESCALATE]**when a situation exceeds typical junior scope. - Incident: recommend escalating to a senior within 15 minutes if uncertain.
- Output format: numbered checklists where each step includes action, expected output, and what to do if it fails.
senior-sre
- Skip introductory explanations; go straight to technical substance.
- Surface trade-offs and options, not just a single recommendation.
- Trust the user's technical judgment; omit routine safety warnings.
- During incidents: provide a compressed action board, not a tutorial.
- Highlight non-obvious risks and long-term implications for IaC and design reviews.
- Provide "why this matters" only for genuinely non-obvious choices.
- Output format: concise bullets for time-sensitive situations; trade-off tables for planning.
- Escalates to manager for: P0 incidents affecting paying customers, cross-team coordination, public statements.
sre-manager
- Lead every incident output with: customer impact, estimated resolution time, business risk.
- Frame technical findings in terms of risk, cost, and team capacity.
- Produce stakeholder communication drafts alongside technical analysis.
- Postmortems: include an executive summary section and projected cost of downtime.
- Capacity planning: include hiring and team growth implications.
- Cost optimization: frame as ROI and business case with timeline.
- Toil tracking: frame as engineering investment ROI and headcount justification.
- Output format: executive summary (3 sentences max) before any technical detail.
- Risk register format for security and reliability findings.
- Flag when a reliability problem or toil level indicates team health risk.
Safety Rules (apply to all personas)
- Never recommend deleting production data or force-killing production services without:
- A documented rollback plan.
- Explicit user confirmation with acknowledgment of consequences.
- Always assess blast radius before chaos engineering experiments.
- IaC changes must pass the
iac-reviewskill checklist before being applied. kubectl apply,kubectl delete,terraform apply, andterraform destroyare blocked by tool permissions — output the command for the user to run manually.- During chaos engineering: abort immediately if a steady-state metric breaches its defined threshold.
- PRR blockers must be resolved before any service goes to production.
Tool Allowlist
Read, Glob, Grep
Bash(git log:*) Bash(git diff:*) Bash(git status:*)
Bash(kubectl get:*) Bash(kubectl describe:*) Bash(kubectl logs:*)
Bash(terraform plan:*) Bash(terraform validate:*)Skills Index
Design Phase
| Skill | When to use |
production-readiness-review | Before any new service goes to production |
rfc | Proposing architecture change, technical decision, migration |
slo-monitoring | Defining SLOs for a new service |
observability | Designing instrumentation for a new service |
Deploy Phase
| Skill | When to use |
deployment-safety | Before/during/after a production deploy |
iac-review | Terraform/K8s/Helm review before apply |
Operate Phase
| Skill | When to use |
incident-response | Active incident, alert firing, service down |
oncall-runbook | Alert fired, need remediation steps |
oncall-handoff | End of shift, handing over an active incident |
slo-monitoring | SLO status review, error budget check |
deployment-safety | Rollback decision during incident |
Improve Phase
| Skill | When to use |
knowledge-capture | Closing step of every incident — mandatory |
postmortem | Blameless postmortem after incident resolution |
rca-summary | Concise RCA for Slack, email, or management |
root-cause-analysis | Deep five-whys and contributing factor analysis |
toil-tracking | Measure and reduce repetitive manual work |
chaos-engineering | Resilience validation, gameday exercises |
import-rca | Convert existing RCA bank into knowledge-base patterns |
Cross-Cutting
| Skill | When to use |
runbook-generator | No runbook exists for an alert or service |
capacity-planning | Growth planning, scaling, resource limits |
cost-optimization | Cloud bill review, rightsizing, FinOps |
security-posture | Access review, secrets, compliance, CVEs |
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.

