AIA integrates with Cline (VS Code AI coding agent) to run a fully automated multi-step pipeline that analyzes an incident's root cause and applies a fix — all triggered from the dashboard.
The "Cline Pipeline" button on each incident card launches a background pipeline that:
- Fetches incident context from the State service
- Instructs Cline to analyze the root cause
- Has Cline generate and apply a code fix
- Validates the applied fix
- Updates the incident status in the dashboard
You can watch the pipeline run in real-time via a modal that shows each step's status.
| Step | Label | Description |
|---|---|---|
fetch_incident_context |
Fetch incident context | Loads incident data from State service |
cline_analyze_root_cause |
Cline: Analyze root cause | AI analysis of the error |
cline_generate_fix |
Cline: Generate fix | Code fix generation and application |
validate_fix |
Validate fix | Verifies the fix was applied correctly |
update_incident_status |
Update incident status | Marks the incident as resolved or failed |
POST /api/cline/pipeline
Request body:
{
"incident_id": "abc123",
"root_cause": "The user object is null when accessed at line 42",
"patch_diff": "--- a/src/...\n+++ b/src/...",
"file_path": "src/api/users.ts"
}Success response:
{
"success": true,
"pipeline_id": "pipeline_abc123_1708000000",
"cline_command": "cline --fix 'Fix TypeError at src/api/users.ts:42 ...'"
}GET /api/cline/pipeline?pipeline_id=<id>
Response:
{
"pipeline_id": "pipeline_abc123_1708000000",
"status": "running",
"steps": [
{ "name": "fetch_incident_context", "status": "success", "duration_ms": 45 },
{ "name": "cline_analyze_root_cause", "status": "running" },
{ "name": "cline_generate_fix", "status": "pending" },
{ "name": "validate_fix", "status": "pending" },
{ "name": "update_incident_status", "status": "pending" }
],
"cline_command": "..."
}When the pipeline starts, a modal opens over the dashboard showing live step progress:
┌─────────────────────────────────────────┐
│ 🖥 Cline Pipeline 🔄 Running │
│ │
│ ID: pipeline_abc123_1708000000 │
│ │
│ Fetch incident context (45ms) │
│ Cline: Analyze root cause │
│ Cline: Generate fix │
│ Validate fix │
│ Update incident status │
│ │
│ Cline command: │
│ cline --fix 'Fix TypeError...' │
└─────────────────────────────────────────┘
Step icons:
success— Completedfailed— Failedrunning— In progress (animated spinner)pending— Waiting
The modal auto-updates every 800ms and closes automatically when you click Close after completion.
The Cline VS Code extension must be installed, and the backend Cline service must be available (handled by the AIA monorepo).
No additional environment variables are required for local development — the pipeline runs through the web API.
### Find an Incident with Autopsy DataNavigate to the **Incidents** page. Look for incidents that have root cause analysis visible.
The button shows **"Starting..."** briefly, then the pipeline modal opens.
Each step updates in real time. The pipeline typically completes in 30–120 seconds.
- If **completed**: The incident status is updated to `resolved`
- If **failed**: An error message appears in the last step's output
- Kilo Integration — Simpler one-click VS Code prompt
- AI Chat — Ask the assistant about any incident
- Incident Timeline — Live visual status tracker