Files
2nd/10_Wiki/Topics/AI_and_ML/ICRE-Framework.md
T
Antigravity Agent f8b21af4be Wiki cleanup: error-doc removal, dedup merge, link normalization
10_Wiki/Topics 대규모 정리:
- 오류 캡처/미완성 stub 문서 227개 제거
- 교차폴더 중복 43클러스터 병합 (63파일 → redirect)
- 링크명 정규화: 깨진 링크 수정·redirect 직결·개념 매핑 ~2,400건
- 카테고리 MOC 6개 신규 생성
- Graph 섹션 미해결 related-keyword 링크 10,058건 제거

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 23:52:15 +09:00

7.0 KiB

id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
id title category status canonical_id aliases duplicate_of source_trust_level confidence_score verification_status tags raw_sources last_reinforced github_commit tech_stack
wiki-2026-0508-icre-framework ICRE Framework 10_Wiki/Topics verified self
Issue-Cause-Resolution-Enhancement
ICRE
Incident Analysis Framework
none B 0.85 applied
incident-management
postmortem
sre
framework
root-cause
2026-05-10 pending
language framework
markdown incident-postmortem

ICRE Framework

매 한 줄

"매 incident 는 4 개의 질문에 답해야 끝난다 — 무엇이, 왜, 어떻게 고쳤고, 다시 안 일어나려면". ICRE (Issue-Cause-Resolution-Enhancement) 는 incident postmortem 을 4 개의 명시적 단계로 강제하는 프레임워크로, blameless 5-whys 와 action-item tracking 을 결합해 학습이 실제 시스템 개선으로 이어지도록 만든다.

매 핵심

매 4 단계

  1. Issue (문제): 사용자 관점 증상, 영향 범위, 시간선 — "무엇이 깨졌는가".
  2. Cause (원인): contributing factors + root cause(s) — "왜 깨졌는가" (5-Whys, fishbone, causal tree).
  3. Resolution (해결): 즉시 mitigate 한 액션 — "어떻게 멈췄는가".
  4. Enhancement (개선): 재발 방지 + 시스템 개선 액션 — "다시 안 일어나려면".

매 관련 프레임워크 비교

  • 5 Whys: cause 단계의 도구. ICRE 안에서 사용.
  • CAPA (Corrective + Preventive Action): 의료/제조의 Resolution + Enhancement 와 유사.
  • Google SRE postmortem: timeline + lessons learned 중심, ICRE 는 4-단계 구조 강제.
  • STAMP/CAST: 시스템 사고 기반 — ICRE 의 Cause 분석을 더 깊게.

매 응용

  1. SaaS incident postmortem (P0/P1).
  2. ML 모델 drift 사고 분석.
  3. Security incident response.
  4. 의료/제조 deviation report.

💻 패턴

1. ICRE 템플릿 (Markdown)

# Incident INC-2026-0420 — Checkout 5xx spike

## I — Issue
- Symptom: /checkout 5xx 12% (normal 0.05%)
- Impact: 2,400 orders 실패, 추정 매출 손실 $48k
- Detect: 14:02 UTC (PagerDuty SLO burn alert)
- Resolve: 14:31 UTC · Duration: 29min
- Severity: P1

## C — Cause
- 5-Whys:
  1. 왜 5xx? → DB connection pool exhausted
  2. 왜 exhausted? → 한 query 가 평균 12s 걸림
  3. 왜 12s? → 새 인덱스가 deploy 되지 않은 테이블에 full scan
  4. 왜 deploy 안 됐나? → migration job 이 silently fail
  5. 왜 silent? → exit code 만 보고 stderr 무시
- Root cause: migration runner 의 stderr 무시
- Contributing: connection pool size monitoring 부재

## R — Resolution
- 14:18 hotfix index 생성 (manual)
- 14:25 connection pool size 50 → 200
- 14:31 5xx normalize 확인

## E — Enhancement
- [ ] AI-2611: migration runner stderr capture + alert (owner: @alice, due: 2026-05-01)
- [ ] AI-2612: connection pool saturation SLO (owner: @bob, due: 2026-05-15)
- [ ] AI-2613: chaos test for missing-index scenario (owner: @carol, due: 2026-06-01)

2. ICRE JSON schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "required": ["issue", "cause", "resolution", "enhancement"],
  "properties": {
    "issue": {
      "type": "object",
      "required": ["symptom", "impact", "detected_at", "resolved_at", "severity"]
    },
    "cause": {
      "type": "object",
      "required": ["five_whys", "root_cause", "contributing"]
    },
    "resolution": {
      "type": "array",
      "items": { "type": "object", "required": ["at", "action"] }
    },
    "enhancement": {
      "type": "array",
      "items": { "type": "object", "required": ["id", "title", "owner", "due"] }
    }
  }
}

3. ICRE → Jira (Python)

from jira import JIRA

def icre_to_jira(icre: dict, jira: JIRA):
    parent = jira.create_issue(
        project="SRE", summary=f"Postmortem: {icre['issue']['symptom']}",
        issuetype={"name": "Postmortem"},
        description=render_icre(icre),
    )
    for ai in icre["enhancement"]:
        jira.create_issue(
            project="SRE", summary=ai["title"],
            assignee={"name": ai["owner"]},
            duedate=ai["due"],
            customfield_parent=parent.key,
        )

4. action-item tracker (SQL)

CREATE TABLE icre_action_items (
  id           TEXT PRIMARY KEY,
  incident_id  TEXT NOT NULL,
  title        TEXT NOT NULL,
  owner        TEXT NOT NULL,
  due_date     DATE NOT NULL,
  status       TEXT CHECK (status IN ('open','in_progress','done','wontfix')),
  closed_at    TIMESTAMPTZ,
  created_at   TIMESTAMPTZ DEFAULT now()
);
-- weekly stale-AI report
SELECT incident_id, title, owner, due_date
FROM icre_action_items
WHERE status != 'done' AND due_date < CURRENT_DATE - INTERVAL '14 days';

5. blameless 언어 변환 (예시)

BAD : "Alice 가 잘못된 SQL 을 deploy 했다"
GOOD: "deploy 시점에 SQL 검증 게이트가 부재했다"

BAD : "팀이 모니터링을 안 봤다"
GOOD: "alert 가 #ops 채널에서 noise 에 묻혔다"

6. 5-Whys 자동 prompt (LLM)

prompt = f"""
Apply 5-Whys to this incident. Stop when reaching a systemic cause
(not a person, not a single line of code).

Symptom: {symptom}
Known facts:
{facts}

Output JSON: {{ "whys": [...], "root_cause": "...", "systemic": true|false }}
"""

7. Causal tree (Mermaid)

graph TD
  A[5xx spike] --> B[DB pool exhausted]
  B --> C[Slow query 12s]
  C --> D[Missing index]
  D --> E[Migration silently failed]
  E --> F[Runner ignored stderr]
  C --> G[N+1 in checkout endpoint]

매 결정 기준

상황 Approach
P0/P1 incident 전체 ICRE 필수, 72h 내 작성
P2 I + C + E 만 (R 은 ticket 으로)
Near-miss I + C 만, E 는 선택
Security incident ICRE + IR-specific (containment, IOC) 추가
ML drift Cause 단계에 data + model + infra 3축 분리

기본값: P0/P1 은 72h ICRE + AI tracker 등록 + 30 일 후 follow-up review.

🔗 Graph

🤖 LLM 활용

언제: 사실 정리에서 5-Whys 초안, 영향 추정, action item 후보 생성, 유사 incident 검색. 언제 X: 비난 표현 제거 / 윤리적 판단은 사람 — LLM 이 추정 책임자 지목 금지.

안티패턴

  • Resolution 만 쓰고 끝: 재발 방지 없음 = 같은 사고 반복.
  • 개인 비난: blameless 원칙 위배 — 시스템 결함으로 변환.
  • Action item 미추적: 90% 가 30일 내 stale 됨.
  • Root cause 1 개로 단정: contributing factors 무시 — causal tree 사용.
  • 공유 안 함: 다른 팀 학습 차단 — postmortem db / wiki 필수.

🧪 검증 / 중복

  • Verified (Google SRE Workbook ch. 10, PagerDuty Incident Response, ITIL 4 Problem Mgmt 2026).
  • 신뢰도 B (ICRE 자체는 비공식 약어 — 4-단계 구조는 표준).

🕓 Changelog

날짜 변경
2026-05-08 Phase 1
2026-05-10 Manual cleanup — ICRE template + JSON schema + tracker SQL