Inspiration
When something goes wrong in production, the clues are scattered: a process monitor sees a spawn burst, a network tool sees an egress spike, a health checker sees missed heartbeats. Each alert alone looks minor. Engineers lose precious minutes stitching them together by hand. I wanted a tool that does the stitching, and is honest about what the evidence does and doesn't prove.
What it does
StitchGuard replays process, network and heartbeat telemetry, detects drift against documented baselines, and correlates alerts only when they share a host, service or process inside a 60-second window. Linked evidence becomes an incident on the Autopsy timeline, where sutures stitch events across swimlanes with the time gap between them. Every link explains its shared keys, timing and rules, and is labelled "correlated, not proven". A lone anomaly stays an isolated warning instead of a false alarm. For real incidents, StitchGuard recommends containment actions, which run only as simulations after a human approves them, and records everything in an audit trail. A read-only MCP server lets Kiro query incidents directly.
How we built it
Python, Pydantic v2, Streamlit, Plotly, SQLite, Hypothesis and the MCP Python SDK, built in the Kiro IDE through two native specs with review gates, seven steering docs, three agent hooks and property-based tests. See the Kiro write-up below.
Challenges we ran into
Making correlation trustworthy: time proximity alone is not evidence, results must not depend on event arrival order, and a single anomaly must not become a critical incident. Also, keeping the response layer provably unable to touch the host.
Accomplishments that we're proud of
Deterministic results across every event order; 566 tests, including 17 property tests, one of which caught a real arrival-order bug; a simulator whose safety is enforced by an import allow-list test; and an Autopsy view where you can watch the evidence get stitched together, live.
What we learned
Spec review gates are where the real engineering happens: the most important fixes (order independence, isolated-signal wording, safety checks) came from reviewing Kiro's requirements before any code existed.
What's next for StitchGuard
Live collectors (psutil, then eBPF), uploading your own JSONL traces, more scenarios, and exporting incidents to ticketing tools.