Graphify-Labs/graphify · error · SystemExit
ERROR: No graph found. Run /graphify <path> first to build t
Error message
ERROR: No graph found. Run /graphify <path> first to build the graph.
What it means
In the generated aider render of the graphify skill, the /graphify query (BFS/DFS neighborhood traversal) section begins with a preflight check: an inline python -c script run via $(cat graphify-out/.graphify_python) exits with this error if graphify-out/graph.json does not exist. It is a usage precondition — the query commands need a built graph, and the skill instructs the agent to stop and tell the user to run /graphify <path> first.
Source
Thrown at tools/skillgen/expected/graphify__skill-aider.md:940
---
## For /graphify query
Two traversal modes - choose based on the question:
| Mode | Flag | Best for |
|------|------|----------|
| BFS (default) | _(none)_ | "What is X connected to?" - broad context, nearest neighbors first |
| DFS | `--dfs` | "How does X reach Y?" - trace a specific chain or dependency path |
First check the graph exists:
```bash
$(cat graphify-out/.graphify_python) -c "
from pathlib import Path
if not Path('graphify-out/graph.json').exists():
print('ERROR: No graph found. Run /graphify <path> first to build the graph.')
raise SystemExit(1)
"
```
If it fails, stop and tell the user to run `/graphify <path>` first.
Load `graphify-out/graph.json`, then:
1. Find the 1-3 nodes whose label best matches key terms in the question.
2. Run the appropriate traversal from each starting node.
3. Read the subgraph - node labels, edge relations, confidence tags, source locations.
4. Answer using **only** what the graph contains. Quote `source_location` when citing a specific fact.
5. If the graph lacks enough information, say so - do not hallucinate edges.
```bash
$(cat graphify-out/.graphify_python) -c "
import sys, json
from networkx.readwrite import json_graph
import networkx as nx
from pathlib import PathView on GitHub (pinned to 7fe58b0b0f)
Solutions
- Run the full pipeline first: /graphify <path> (extraction + clustering + export) to create graphify-out/graph.json
- Confirm you are in the same directory where the graph was built (ls graphify-out/graph.json)
- If the graph should exist but does not, re-run the build — check the Step 4 output for the empty-graph or shrink errors that may have aborted it
Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
if not Path('graphify-out/graph.json').exists():
raise SystemExit('no graph — run /graphify <path> before querying')
# ... proceed with BFS/DFS traversal Type guard
def graph_ready() -> bool:
"""True when a built graphify graph exists for this workspace."""
return Path('graphify-out/graph.json').is_file() Prevention
- Always execute the preflight check block before the traversal code, as the skill instructs
- Build the graph immediately after cloning/creating a workspace, before query-style commands
- Run query commands from the same directory the graph was built in
When it happens
Trigger: Invoking the /graphify query command in a workspace where graphify-out/graph.json is missing — /graphify was never run, graphify-out/ was deleted, or the graph was built in a different directory than the current one.
Common situations: Fresh clones or new worktrees with no graphify-out/; running the query from the wrong cwd; the user (or a clean task) removed graphify-out/ artifacts.
Related errors
- graphify output not found: {paths['graph']}. Run graphify fi
- graph.json contains 0 nodes
- no sections defined
- ERROR: Graph is empty - extraction produced no nodes.
- ERROR: refused to shrink graphify-out/graph.json (fewer node
AI-assisted analysis of Graphify-Labs/graphify@7fe58b0b0f (2026-08-14).
Data as JSON: /api/errors/cdb709b27c1f5de0.
Report an issue: GitHub.