# Postmortem: {ISSUE_ID}

> Workspace: `{workspace_id}`
> Date: {date}
> Reviewer: {reviewer}

## Issue Summary

| Field | Value |
|-------|-------|
| Issue ID | {ISSUE_ID} |
| Alert Type | {alert_name} |
| Cluster ID | {cluster_id} |
| Cluster Type | {dedicated/starter/essential/premium} |
| TiDB Version | {version} |
| Time Window | {start_time} - {end_time} |

**Issue Description**: {one-line summary}

## Actual Root Cause

> Human-confirmed root cause from Jira resolution, oncall handoff, or expert analysis.

{Describe the actual root cause in 2-3 sentences.}

## Agent Diagnosis Summary

> What the Agent concluded (final answer from unguided first attempt).

{Paste or summarize the Agent's initial diagnosis.}

## Scores

| Dimension | Score (1-5) | Notes |
|-----------|-------------|-------|
| Root Cause Accuracy | {1-5} | {brief justification} |
| Evidence Completeness | {1-5} | {brief justification} |
| Causal Chain | {1-5} | {brief justification} |
| Actionability | {1-5} | {brief justification} |
| Efficiency | {1-5} | {tool_call_count} tool calls, {notes on wasted effort} |
| **Overall** | **{avg}** | |

## Human Guidance Log

> Every point where the reviewer had to manually steer the Agent.

### Intervention 1: {short title}

- **Round**: #{message_number}
- **User said**: "{exact prompt}"
- **Agent's mistake**: {what it was doing wrong}
- **Correct behavior**: {what it should have done}
- **Skill**: `{skill_name}`
- **Deficiency type**: {FLOW / TEMPLATE / KNOWLEDGE / REASONING / CROSS-REF}

### Intervention 2: {short title}

...

## Skill Deficiencies

> Actionable improvement items extracted from the guidance log.

### {ID}: {title}

- **Type**: {FLOW / TEMPLATE / KNOWLEDGE / REASONING / CROSS-REF}
- **Skill**: `{skill_name}`
- **Current behavior**: {what happens now}
- **Expected behavior**: {what should happen}
- **Suggested fix**: {concrete change to make}
- **Priority**: {P0-critical / P1-high / P2-medium}
- **Status**: {open / pr-filed / fixed}

### {ID}: {title}

...

## Key Queries

> Correct queries that the Agent should have used (for skill template reference).

### {query_name}

```bash
{working curl/SQL command}
```

## Lessons Learned

> General insights beyond specific skill fixes.

- {lesson 1}
- {lesson 2}
