cogneerca

GitHub Repo View on GitHub ⚡
Release Incident Diagnostic Engine

Pinpoint Post-Release Bugs Using Code Knowledge Graphs

When on-call raises a bug ticket, RCA walks the logical blast radius of stack traces to rank recently changed code commits by proximity. Stop guessing; locate the culprit instantly.

⭐ Star on GitHub Why Powered by Cognee?
github.com/mumin-khan/cognee-hackathon
WATCH COGNEE RCA WALKTHROUGH
Click to play demo (1:13 · Captioned)
Technology Stack

Powered by Cognee Cognitive Memory

RCA is built from the ground up on top of Cognee, the open-source AI memory engine. Rather than querying raw file strings or relying on expensive, non-deterministic LLM vector chunks, RCA structures your codebase as a persistent knowledge graph in Cognee.

🧠

Local Graph Storage

Ingests codebase structures into Cognee's native embedded memory adapters without requiring cloud API keys.

🔗

Semantic Object Alignment

Uses deterministic UUID mapping, allowing git diff line ranges and tree-sitter logical scopes to link to the exact same nodes.

Graph Completion Ingests

Reconciles previous releases, keeping historic MODIFIED_IN edges intact across repeated code baseline synchronizations.

# Ingestion powered by cognee[codegraph]
from rca import env
from rca.baseline import build_baseline
from rca.diff_sync import sync_release
from rca.query import analyze

await env.init()  # embedded Cognee graph, fully local

# tree-sitter -> CodeGraphEntities in the Cognee graph
await build_baseline("/path/to/repo")
await sync_release(repo, prev_sha, rel_sha, "v1.1.0", ts)

# Deterministic ids: uuid5("type:file_path:symbol")
# -> graph add_nodes MERGEs, so re-ingest upserts
findings = await analyze(stack_trace, k_hops=2)

Engine Specifications

RCA represents a paradigm shift from pure string grep or embeddings-only retrieval by introducing historical context directly to code structure.

🌲

AST Symbol Extraction

Parses files into logical components (files, functions, classes, and call/import edges) using tree-sitter grammars. Assigns deterministic IDs to prevent duplicates.

🏷️

Git Release Tagging

Maps git diff prev..rel line ranges directly to enclosing logical symbols, tagging them with MODIFIED_IN edges to release records.

🎯

BFS Proximity Search

Starts at stack traceback "seed nodes" and walks the call graph blast radius up to k-hops, ranking candidates by proximity and release recency.

Run RCA in Your Terminal

Integrate RCA directly into your CI/CD pipeline or run it locally in your developer environment. Sync releases on git tags and parse incidents as they land.

pip install -r requirements.txt python demo.py # narrated CLI walkthrough python dashboard/server.py # web dashboard playground (port 8080)
$ python demo.py
Act 0 · Build a synthetic service and its git history... Done.
Act 1 · Ingest the codebase into a knowledge graph...
Baseline graph: 7 files · 11 functions · 0 classes · 39 edges
Tagged v1.1.0 diff onto the graph ✓
Tagged v1.2.0 diff onto the graph ✓
Act 2 · An incident lands — who caused it?
2. app.utils.format_currency [modified@v1.1.0] hops=1 score=999032 <== TRUE ROOT CAUSE
📺 Cognee RCA Walkthrough Demo