ChangeGraphChangeGraph
Open source · change correlation

Find what changed when production breaks.

When production errors spike, ChangeGraph maps the incident to recent code changes and shows the evidence. Deterministic code ranks candidates. Mastra workflows explain what the graph already knows.

git clone https://github.com/Ajay-Satish-01/ChangeGraph.git
Fixture A · local
Scenario AinvestigatingCORRELATION only

TypeError in checkout tax calculation

payments@2026.03.15 · LKG production · window 7d · culprit src/payments/tax.ts

Timeline

  1. Mar 14 12:00deploy

    LKG production good000lk

  2. Mar 15 10:00pr

    PR #95 feat: banner copy

  3. Mar 15 17:35pr

    PR #101 feat: adjust checkout tax

  4. Mar 15 18:00sentry

    Error rate spike · checkout

Stack paths · FACT

  • src/payments/tax.ts
  • src/payments/checkout.ts

Sentry opens a window around the spike. The graph already has PRs, commits, and the last-known-good deploy. No SHA is invented.

Investigation flow as the product UI: incident, candidates, evidence, packed context, then Mastra explanation. Not a row of cards.

Local stack

  • GitHub
  • Sentry
  • Vercel
  • Postgres
  • Docker
  • MCP
  • OpenAI
  • Anthropic
  • xAI
  • GitHub
  • Sentry
  • Vercel
  • Postgres
  • Docker
  • MCP
  • OpenAI
  • Anthropic
  • xAI

On-call

Stop spelunking git log. Start with what shipped.

Open an incident window. See ranked PRs with file overlap, deploy membership, and last-known-good bounds. The score is decision support. Root cause stays a human judgment.

  • Deterministic scorer: no LLM in the ranking loop
  • Mastra explain_incident and investigate_incident over a packed, sanitized evidence package
  • FACT vs CORRELATION labeling: never claim proven cause
Candidate · PR #1010.91 · CORRELATION

feat: adjust checkout tax

src/payments/tax.ts · on release · T0 − 25m

File overlap
FACT
Deploy membership
FACT
Rank vs #95 / #90
CORRELATION
Fixture A: PR #101 touches the Sentry culprit path and lands on the mapped release 25 minutes before the spike.

Honesty

The model explains the package. It does not rank.

Identical inputs produce identical ranks. Mastra explanation is bounded to a packed, sanitized evidence package: invented PRs and files are dropped. Absolute causation is softened to hypothesis.

Deep dive: Scoring & LKG · Architecture

Scorer v2

  • Temporal25
  • Deployment25
  • File / stack25
  • Service15
  • Historical10
Weights are fixed. Penalties apply when there is no file overlap or the diff is docs/test-only.

Get started

Clone the repo. Seed fixtures A–D.

Install with pnpm, start Docker Postgres, and investigate sample incidents. Connect GitHub, Sentry, and Vercel with accounts you already have. Ranked candidates, EvidencePackage, and scoring work without LLM keys. Explain and investigate require a configured LLM provider and fail closed as not_configured.

quickstart
pnpm install
cp .env.example .env.local
docker compose up -d postgres
pnpm db:push && pnpm seed
pnpm dev
Five commands from the repository root. Scoring and evidence work without keys; explain requires a provider and fails closed as not_configured.

Capabilities

Built for engineers who want evidence, not vibes

Scroll the rail. Each panel is a different surface of the same investigation path.

01

Change graph

PRs, commits, files, releases, and deploys land in a tenant-scoped timeline. Idempotent upserts. Natural keys, never duplicate a SHA.

temporal25
deploy25
file overlap25
service15
historical10

02

Evidence-first scoring

Weights: temporal 25 · deployment 25 · file/stack 25 · service 15 · historical 10. Penalties for no overlap or docs-only diffs. No model in the loop.

LKGhealthy deploy
24h72h7d
incident

03

Last-known-good

Bound candidates between LKG deploy and the incident. Expand 24h → 72h → 7d only when the window is thin.

Rank #1 · PR #101 · 0.91
Why not #95: no file overlap
Evidence package · sanitized

04

Investigation UI

Timeline, ranked candidates, score breakdown, why-not-others, and Mastra explanation over a packed digest.

tools

list_incidents

get_incident

get_evidence_package

read-only · stdio

05

MCP + Mastra

Read-only MCP tools for incidents and evidence. Mastra investigate_incident never mutates scores. Context is packed before the model.

A Top-1
B control
C multi
D empty

06

Fixtures A–D

Offline scenarios prove Top-1 ranking, negative controls, multi-candidate discrimination, and empty-evidence honesty.

Clone it. Run the fixtures.

Docker Compose, seed fixtures A–D, and investigate with ranked change candidates, evidence, and Mastra workflows.