name reliability description Systematically review and improve AI agent reliability โ identify failure patterns, assess error handling, design safeguards, and set reliability targets. Use when agents are producing inconsistent results, after incidents, or when preparing for production deployment. argument-hint [agent to assess] allowed-tools ["Read","Write"] context fork model inherit hooks {"Stop":[{"type":"command","command":"bash scripts/validate-review.sh reliability . 2>/dev/null || true"}]}
Reliability Review
์์ด์ ํธ ์ ๋ขฐ์ฑ ์ฒด๊ณ์ ์ ๊ฒ ๋ฐ ๊ฐ์
Core Goal
์์ด์ ํธ์ "์ต์
์ ๊ฒฝ์ฐ" ์ ๋ขฐ์ฑ์ ์ ๋ํ โ ํ๊ท ์ด ์๋๋ผ ๋ฐฑ๋ถ์์(P95, P99)๋ก ์ ๋ขฐ๋ ํ๊ฐ
์คํจ ํจํด์ ๋ถ๋ฅํ๊ณ ๊ฐ๊ฐ์ ๋ํ safeguard ์ค๊ณ โ ์
๋ ฅ ์ค๋ฅ, ๋ชจ๋ธ ์ค๋ฅ, ํตํฉ ์ค๋ฅ ๋ฑ ์ ํ๋ณ ๋ฐฉ์ด์ฑ
๊ตฌ์ถ
์ ๋ขฐ์ฑ ์์ค(Basic/Standard/High/Critical)์ ๋น์ฆ๋์ค ์๊ตฌ์ ๋ง์ถ๊ธฐ โ ๋ด๋ถ ๋๊ตฌ๋ 95%, ๊ณ ๊ฐ ๋๋ฉด์ 99.9% ๊ฐ์ด ์ฐจ๋ฑ ๋ชฉํ ์ค์
Trigger Gate
Use This Skill When
์์ด์ ํธ๋ฅผ ํ๋ก๋์
์ ๋ฐฐํฌํ๊ธฐ ์ ์ ์ ๋ขฐ์ฑ ํ๊ฐ๊ฐ ํ์ํ ๋
incident ์ดํ ๋น์ทํ ์คํจ๋ฅผ ๋ฐฉ์งํ๊ธฐ ์ํด safeguard๋ฅผ ๊ฐํํ ๋
์์ด์ ํธ ์ฑ๋ฅ์ด ๋ถ์์ ํ๊ฑฐ๋ ์์ธก ๋ถ๊ฐ๋ฅํ ํจํด์ ๋ณด์ผ ๋
SLA ๋ณด์ฅ(์: 99.5% uptime)์ด ํ์ํ ๊ณ ๊ฐ ๊ณ์ฝ์ ์ฒด๊ฒฐํ ๋
Route to Other Skills When
incident โ ์ค์ ์ฅ์ ๊ฐ ๋ฐ์ํ ํ ๊ทผ๋ณธ ์์ธ ๋ถ์๊ณผ ์ ๋ขฐ์ฑ ๊ฐ์ ์ฐ๊ฒฐ
์ด ์คํฌ์ Pre-mortem ์น์
โ ์ ๋ขฐ์ฑ ๊ฐ์ ๊ณํ์ ๋ฆฌ์คํฌ๋ฅผ ์ฌ์ ๋ถ์ํ ๋ (์๋ "์ฌ์ ์ํ ๋ถ์" ์น์
)
metrics-design --step kpi โ ์ ๋ขฐ์ฑ์ KPI ๋์๋ณด๋(Success Rate, Error Rate)์ ํฌํจ
metrics-design (์ฝํธํธ ๋ถ์ ์น์
) โ ์ ๋ขฐ์ฑ์ด ์ฝํธํธ(๋ฒ์ )๋ณ๋ก ๋ค๋ฅด๊ฒ ๋ํ๋ ๋ (๋ฒ์ ๋น๊ต)
Boundary Checks
๊ธฐ์ค์ ๋ฐ์ดํฐ ๋ถ์กฑ โ ์ต์ 1์ฃผ์ผ ์ด์ ๋ฐ์ดํฐ ํ์ (์ผ์ผ ๋ณ๋์ฑ ํก์)
์คํจ ๋ถ๋ฅ์ ํ์คํ โ ํ๋ง๋ค "์๋ฌ"๋ฅผ ๋ค๋ฅด๊ฒ ์ ์ํ๋ฉด ์ ๋ขฐ์ฑ ์ธก์ ๋ถ๊ฐ โ formula ๋ช
์
Safeguard ๊ณผ๋ํ โ ๋ชจ๋ ๊ฐ๋ฅํ ์คํจ์ ๋ฐฉ์ด์ฑ
์ ์ธ์ฐ๋ฉด ์ฑ๋ฅ ์ ํ โ ์ํฅ๋ ร ๋ฐ์ ํ๋ฅ ๋ก ์ฐ์ ์์ํ
๊ฐ๋
์์ด์ ํธ ์ ๋ขฐ์ฑ์ "ํ๊ท ์ ์ผ๋ก ์ ๋๋๊ฐ"๊ฐ ์๋๋ผ "์ต์
์ ๊ฒฝ์ฐ์๋ ํ์ฉ ๊ฐ๋ฅํ๊ฐ"๋ก ์ธก์ ํ๋ค. 99%์ ์ฑ๊ณต๋ฅ ์ 100๋ฒ ์ค 1๋ฒ ์คํจ๋ฅผ ์๋ฏธํ๊ณ , ์คํจ 1๋ฒ์ ๋น์ฉ์ด 99๋ฒ์ ๊ฐ์น๋ฅผ ์ด๊ณผํ ์ ์๋ค.
Instructions
You are conducting a reliability review for: $ARGUMENTS
Step 1 โ Reliability Baseline
Collect current data:
Total executions (last 30 days): ___
Successful: ___ (___%)
Failed: ___ (___%)
Partially correct: ___ (___%)
Step 2 โ Failure Taxonomy
Classify all failures:
Category Count Severity Example Input Error Low-High Malformed input, missing data Model Error Medium Hallucination, wrong format Tool Error Medium API timeout, rate limit Logic Error High Wrong decision, missed edge case Output Error Medium Correct answer, wrong format
Step 3 โ Failure Pattern Analysis
For each failure category:
Pattern: [description]
Frequency: [how often]
Root Cause: [why it happens]
Impact: [what goes wrong for the user]
Detection: [how we know it failed]
Recovery: [what happens after failure]
Step 4 โ Safeguard Design
For each high-impact failure, design a safeguard:
Safeguard Type When to Use Example Input Validation Predictable bad inputs Schema validation before execution Output Validation Format/content requirements JSON schema check, range validation Confidence Gate Uncertain outputs If confidence < 0.8, escalate to human Retry with Backoff Transient failures Retry 3x with exponential backoff Fallback Path Critical failures Switch to simpler model or manual flow Circuit Breaker Cascading failures Stop after N consecutive failures
Step 5 โ Reliability Target Setting
Level Success Rate Meaning Appropriate For Basic 90% 1 in 10 fails Internal tools, non-critical Standard 95% 1 in 20 fails Regular business ops High 99% 1 in 100 fails Customer-facing, financial Critical 99.9% 1 in 1000 fails Safety, compliance
Current level: ___
Target level: ___
Step 6 โ Improvement Roadmap
Prioritize by: Impact ร Frequency ร Ease of Fix
Quick Wins (this week):
- [ ] [safeguard 1]
- [ ] [safeguard 2]
Medium Term (this month):
- [ ] [improvement 1]
- [ ] [improvement 2]
Long Term (this quarter):
- [ ] [architecture change]
Output
Reliability report card:
Agent: [name]
Period: [date range]
Reliability: [current%] โ Target: [target%]
Top Failure: [category] ([count] occurrences)
New Safeguards: [count] implemented
Next Review: [date]
Failure Handling
์คํจ ์ํฉ ๊ฐ์ง ๋์ ์ ๋ขฐ์ฑ ๊ธฐ์ค์ ํธํฅ "์คํจ์จ 5%"๋ผ๊ณ ๊ณ์ฐํ์ผ๋ ์คํจ ์ ์๊ฐ ํ๋ง๋ค ๋ค๋ฆ ์คํจ์ ์ ์๋ฅผ formula๋ก ๋ช
์ํ (์: "์๋ต์ด 0์ด ์์ ์๊ฑฐ๋ ์ค๋ฅ ๋ฐํ") โ ์ฌ์ธก์ Safeguard ์ฑ๋ฅ ์ ํ Confidence gate ์ถ๊ฐ โ ์ ํ๋๋ ์ฌ๋์ง๋ง ์๋ต ๋ถ๊ฐ์จ 15% ์ฆ๊ฐ ์๊ณ๊ฐ ์กฐ์ (confidence threshold ํํฅ) ๋๋ fallback path ๊ฐ์ ํน์ ์
๋ ฅ์๋ง ์คํจ ๋๋ถ๋ถ์ ์์ฒญ์ ์ฑ๊ณตํ๋๋ฐ ํน์ ํจํด(์: ํน์๋ฌธ์ ํฌํจ)์์๋ง ์ค๋ฅ Input validation ๊ฐํ, ์คํจ ์
๋ ฅ ํ์
๋ณ ๋ถ๋ฅ, ํจํด๋ณ safeguard ์ค๊ณ ์ ๋ขฐ์ฑ ๋ชฉํ ๋ฌ์ฑ ๋ถ๊ฐ 99% ๋ชฉํ๋ ์ค์ ํ์ผ๋ ํ์ฌ 95% โ 4% gap์ ๋ซ์ ๋ฐฉ๋ฒ ๋ถ์กฑ 1) ๋น ๋ฅธ ๊ฐ์ ๊ฐ๋ฅํ ๊ฒ(Input validation) ๋จผ์ ์ํ 2) ์ฅ๊ธฐ ์ํคํ
์ฒ ๊ฐ์ ๋ถ๋ฆฌ Safeguard ๋น์ฉ Retry with backoff ์ถ๊ฐ โ ํ ํฐ ๋น์ฉ 20% ์ฆ๊ฐ ๋น์ฉ-์ ๋ขฐ์ฑ ํธ๋ ์ด๋์คํ ๋ช
์ (๋น์ฉ +$100/์๋ก reliability 98% โ 99% ๋ฌ์ฑ), ์์ฌ๊ฒฐ์
Quality Gate
ํ์ฌ ์ ๋ขฐ์ฑ ๊ธฐ์ค์ (Success Rate, Error Rate)์ด ๋ช
ํํ๊ฒ ์ ์๋๊ณ ์ธก์ ๋์๋๊ฐ? (Yes/No)
์คํจ๊ฐ 5๊ฐ์ง ์ด์์ ์นดํ
๊ณ ๋ฆฌ(Input, Model, Tool, Logic, Output)๋ก ๋ถ๋ฅ๋์๋๊ฐ? (Yes/No)
๊ฐ ์คํจ ์นดํ
๊ณ ๋ฆฌ๋ณ๋ก ํจํด ๋ถ์(Frequency, Root Cause, Impact, Detection, Recovery)์ด ์๋ฃ๋์๋๊ฐ? (Yes/No)
๋์ ์ํฅ๋(High impact) ์คํจ ๊ฐ๊ฐ์ ๋ํด safeguard๊ฐ ์ค๊ณ๋์๋๊ฐ? (Yes/No)
์ ๋ขฐ์ฑ ๋ชฉํ ์์ค(Basic/Standard/High/Critical)์ด ๋น์ฆ๋์ค ์๊ตฌ์ ์ ๋ ฌ๋์๋๊ฐ? (Yes/No)
ํ์ฌ ์์ค โ ๋ชฉํ ์์ค๊น์ง์ ๋ก๋๋งต(Quick Wins, Medium Term, Long Term)์ด ๋ช
์๋์๋๊ฐ? (Yes/No)
Examples
Good Example
์ ๋ขฐ์ฑ ๋ฆฌ๋ทฐ: ๋ด๋ถ ์
๋ฌด ํจ์จํ ์์ด์ ํธ
๊ธฐ์ค์ (30์ผ):
โโโ ์ด ์คํ: 2,400๊ฑด
โโโ ์ฑ๊ณต: 2,280๊ฑด (95%)
โโโ ์คํจ: 120๊ฑด (5%)
โโโ ๋ถ๋ถ ์ฑ๊ณต: 0๊ฑด
์คํจ ๋ถ๋ฅ:
| ์นดํ
๊ณ ๋ฆฌ | ๊ฐ์ | ์์ธ ์์ | ์ฌ๊ฐ๋ |
|---------|------|---------|-------|
| Input Error | 30 | ์๋ชป๋ ํ์(JSON ๋ฏธํ์ฑ) | Low |
| Model Error | 60 | ํ๊ฐ, ํ์ ์ค๋ฅ | Medium |
| Tool Error | 20 | API timeout | High |
| Logic Error | 8 | ์กฐ๊ฑด ๊ฒ์ฌ ๋๋ฝ | High |
| Output Error | 2 | ๋๋ฌด ๊ธด ์๋ต | Low |
Safeguard ์ค๊ณ:
High Impact 3๊ฐ์ง:
1. Model Error (60๊ฐ) โ Confidence gate (threshold 0.7)
- Expected: ์คํจ 60โ 40 (667% ๊ฐ์ ์์ ์๊ฐ: 5์ผ)
2. Tool Error (20๊ฐ) โ Retry with exponential backoff
- Expected: ์คํจ 20โ 5 (timeout ๋ณต๊ตฌ์จ 75%)
3. Input Error (30๊ฐ) โ JSON schema validation
- Expected: ์คํจ 30โ 2 (๊ฑฐ์ ์ ๋ถ ์ฌ์ ์ฐจ๋จ)
๋ชฉํ ์์ค: High (99%)
- ํ์ฌ: 95%
- 3์ฃผ ํ: 98% (safeguard 1,3 ์ ์ฉ)
- 6์ฃผ ํ: 99% (safeguard 2๊น์ง ์ถ๊ฐ)
Bad Example
"์์ด์ ํธ์ ์ ๋ขฐ์ฑ์ด ์ข์ง ์์ ๊ฒ ๊ฐ๋ค"
โ ๋ฌธ์ ์ :
- "์ ๋ขฐ์ฑ"์ ์ ์๊ฐ ์ฃผ๊ด์ (๊ธฐ์ค์ ์์)
- ์คํจ ๋ถ๋ฅ ์์ (์ด๋ค ์คํจ๊ฐ ๋ช ๊ฐ์ธ์ง ๋ชจ๋ฆ)
- Safeguard ๋ฏธ์ค๊ณ (๋์ ๋ฐฉ๋ฒ ๋ถ๋ช
ํ)
- ๋ชฉํ ์์ค ๋ฏธ์ค์ (๋ญ๊ฐ "์ข์" ์ ๋ขฐ์ฑ์ธ์ง ๋ถ๋ช
ํ)
- ๊ฐ์ ๋ก๋๋งต ์์
โ ์ฌ์์
: ๊ธฐ์ค์ ์์ง โ ์คํจ ๋ถ๋ฅ โ ํจํด ๋ถ์ โ safeguard ์ค๊ณ โ ๋ชฉํ ์ค์ โ ๋ก๋๋งต ์๋ฆฝ
์ฌ์ ์ํ ๋ถ์ (Pre-mortem)
๋ฐฐํฌ ์ "์ด ์์ด์ ํธ๊ฐ 3๊ฐ์ ํ ์์ ํ ์คํจํ๋ค๊ณ ๊ฐ์ ํ์. ์ ์คํจํ์๊น?"๋ก ์์ํ๋ FMEA ์ฒดํฌ๋ฆฌ์คํธ.
Pre-mortem Exercise
๋ฐฐํฌ ์ ์ต์ 5๊ฐ์ ์คํจ ์๋๋ฆฌ์ค๋ฅผ ๋์ถํ๋ค:
"The agent failed because..."
1. ___ (๋ชจ๋ธ ์คํจ โ ํ๊ฐ, ์ปจํ
์คํธ ์๋์ฐ ์ค๋ฒํ๋ก์ฐ, prompt injection)
2. ___ (๋ฐ์ดํฐ ์คํจ โ upstream API ๋ณ๊ฒฝ, PII ์ ์ถ, ๋ฐ์ดํฐ ๋๋ฆฌํํธ)
3. ___ (ํตํฉ ์คํจ โ API rate limit, ์ธ์ฆ ํ ํฐ ๋ง๋ฃ, ๋ฒ์ ๋ถ์ผ์น)
4. ___ (๋น์ฆ๋์ค ์คํจ โ ๋น์ฉ ์ด๊ณผ, ๋ฎ์ ์ฌ์ฉ์ ์ฑํ, ๊ท์ ์๋ฐ)
5. ___ (์ด์ ์คํจ โ ๋ชจ๋ํฐ๋ง ๋ถ์ฌ, ์๋ฆผ ๋ฏธ์ค์ , ๋์ ์ ์ฐจ ์์)
RPN ๊ธฐ๋ฐ ์ฐ์ ์์ํ
RPN = Severity ร Probability ร Detection (๊ฐ 1-10)
Detection: 1 = ์ฝ๊ฒ ๊ฐ์ง, 10 = ๊ฐ์ง ๋ถ๊ฐ๋ฅ
RPN > 100 ๊ณ ์ํ: ์ฌ์ค๊ณ ๋๋ ์ํ ์กฐ์น ํ์
RPN 50-100 ์ค์ํ: Yellow alert ์ค์ + ์ ํ๋ ๋ฒ์๋ก ์์
RPN < 50 ์ ์ํ: ๋ชจ๋ํฐ๋ง์ผ๋ก ์ถฉ๋ถ
๋ฐฐํฌ Go/NoGo ๊ธฐ์ค
RPN ๋ฒ์ ์์ฌ๊ฒฐ์ ์กฐ๊ฑด < 50 GO ๋ชจ๋ํฐ๋ง ์ค์ ์ผ๋ก ์ถฉ๋ถ 50-100 CONDITIONAL GO Prevention ๊ตฌํ + Yellow alert ํ์ > 100 NO-GO Prevention ์ ๋ต ์์ฑ + Red alert ๊ตฌํ ํ ์ฌ๊ฒํ
Pre-mortem ์ฒดํฌ๋ฆฌ์คํธ
Further Reading
Google SRE Book โ Site Reliability Engineering principles
Anthropic, "Building Effective Agents" (2024) โ Error handling patterns
Gary Klein, "Performing a Project Premortem" โ HBR, 2007
IEC 60812 โ FMEA standard methodology
Contextual Knowledge (auto-loaded)
๋ณด์กฐ ํ์ผ์ด ์กด์ฌํ ๋๋ง ์๋ ๋ก๋๋ฉ๋๋ค. ํ์ผ์ด ์์ผ๋ฉด ๊ฑด๋๋๋๋ค.
Good Example
!cat examples/good-01.md 2>/dev/null || echo ""
Bad Example
!cat examples/bad-01.md 2>/dev/null || echo ""
Domain Context
!cat context/domain.md 2>/dev/null || echo ""
Test Cases
!cat references/test-cases.md 2>/dev/null || echo ""
Troubleshooting
!cat references/troubleshooting.md 2>/dev/null || echo ""