rootly-graphify connects the Rootly API to the graphify knowledge graph pipeline. It has two phases: collection (Rootly API → local corpus) and graph analysis (corpus → knowledge graph).
Rootly API → rootly_export → rootly_runner → cluster() → analyze() → report() → export()
| Module | Function | Input → Output |
|---|---|---|
rootly_export.py |
run_rootly_export() |
Rootly API → local corpus (markdown + JSON) |
rootly_runner.py |
rootly_build_graph() |
corpus → nx.Graph with typed nodes and edges |
cluster.py |
cluster(G) |
graph → graph with community attr on each node |
analyze.py |
analyze(G) |
graph → analysis dict (god nodes, surprises, questions) |
report.py |
render_report(G, analysis) |
graph + analysis → GRAPH_REPORT.md string |
export.py |
export(G, out_dir, ...) |
graph → graph.json, graph.html |
- Validate API key (from
.envor--api-key-env) - Prompt for time window (7, 30, or 90 days)
- Fetch incidents whose
started_atfalls inside the window - Fetch triggered alerts per incident via sub-resource endpoint
- Fetch all teams
- Write markdown + raw JSON to corpus directory
- Write
.graphifyignoreto exclude retrospectives from graph
Reads incident JSON and creates a typed graph:
Nodes:
- Incident (labeled by title, colored by severity)
- Alert (linked to triggering incident)
- Team (organizational unit)
- Service (affected infrastructure)
- Severity level (SEV0–SEV3)
Edges:
triggered— alert → incidentaffects— incident → serviceowns— team → serviceresponded_by— incident → teamhas_severity— incident → severityassigned_to_team— incident → team
| Label | Meaning |
|---|---|
EXTRACTED |
Relationship directly from Rootly API data (severity, team assignment) |
INFERRED |
Reasonable deduction (shared service, co-occurrence) |
AMBIGUOUS |
Uncertain — flagged for review |
Running /graphify ./corpus --mode deep dispatches parallel subagents over the markdown files to infer cross-incident themes, rationale, and conceptual links. This adds INFERRED and semantically_similar_to edges on top of the deterministic graph.
pytest tests/ -q