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

A preflight existence check in the generated /graphify query (ask) subcommand. Before loading the graph for BFS/DFS traversal, the embedded Python checks Path('graphify-out/graph.json').exists() and exits 1 with this ERROR when it is missing, telling the agent to stop and instruct the user to build the graph first.

Source

Thrown at tools/skillgen/expected/graphify__skill-devin.md:1076

---

## 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 Path

View on GitHub (pinned to 7fe58b0b0f)

Solutions

  1. Run the build first: /graphify <path> to generate graphify-out/graph.json.
  2. Confirm you are in the same working directory where graphify-out/ was created (the path is relative).
  3. If a build was attempted, check whether it aborted earlier — fix the empty-extraction or shrink-guard error that stopped it before export.
  4. Verify graphify-out/.graphify_python exists too; without it the interpreter selector itself fails.
Defensive patterns

Strategy: validation

Validate before calling

from pathlib import Path

for artifact in ('graphify-out/graph.json', 'graphify-out/.graphify_python'):
    if not Path(artifact).exists():
        raise SystemExit(f'missing {artifact} - run /graphify <path> first from the build directory')

Prevention

When it happens

Trigger: Running the /graphify query step via $(cat graphify-out/.graphify_python) -c '...' when graphify-out/graph.json does not exist — either no build was ever run in this working directory, or a previous build aborted before the export step (e.g. the empty-graph or shrink guard fired).

Common situations: Asking graph questions before running /graphify <path>; running from the wrong cwd so relative path graphify-out/graph.json resolves elsewhere; a build that failed mid-pipeline leaving no graph.json; a cleaned/deleted graphify-out directory.

Related errors


AI-assisted analysis of Graphify-Labs/graphify@7fe58b0b0f (2026-08-14). Data as JSON: /api/errors/99f70bc684e48733. Report an issue: GitHub.