Graphify-Labs/graphify · error · FileNotFoundError

graphify output not found: {paths['graph']}. Run graphify fi

Error message

graphify output not found: {paths['graph']}. Run graphify first or pass --graph /path/to/graph.json.

What it means

Graph-existence preflight in the aider fragment's /graphify ask flow (tools/skillgen/fragments/core/aider.md:940). Before loading the graph for BFS/DFS traversal, a helper script checks Path('graphify-out/graph.json').exists() and raises SystemExit(1) with this message when the knowledge graph has never been built in the current working tree.

Source

Thrown at graphify/callflow_html.py:1642

    """Generate call-flow architecture HTML from graphify output files."""
    args = CallflowOptions(
        project,
        graphify_out=graphify_out,
        graph=graph,
        report=report,
        labels=labels,
        sections=sections,
        output=output,
        lang=lang,
        max_sections=max_sections,
        diagram_scale=diagram_scale,
        max_diagram_nodes=max_diagram_nodes,
        max_diagram_edges=max_diagram_edges,
    )

    paths = resolve_graphify_paths(args)
    if not paths["graph"].exists():
        raise FileNotFoundError(
            f"graphify output not found: {paths['graph']}. "
            "Run graphify first or pass --graph /path/to/graph.json."
        )

    # Load data
    nodes, edges, hyperedges, meta = load_graph(paths["graph"])
    labels = load_labels(paths["labels"])
    lang = detect_lang(args.lang, nodes, labels)
    if paths["sections"]:
        sections = load_sections(paths["sections"])
    else:
        sections = derive_sections_from_communities(nodes, labels, lang, args.max_sections)
    sections = normalize_sections(sections, lang)
    report_text = load_report(paths["report"])

    if not nodes:
        raise ValueError("graph.json contains 0 nodes")
    if len(sections) <= 1:

View on GitHub (pinned to 7fe58b0b0f)

Solutions

  1. Run /graphify <path> to build the graph, then retry the question.
  2. Verify the working directory contains graphify-out/graph.json (the check uses a relative path).
  3. If a previous build failed (empty graph / shrink refusal), fix that root cause first — no graph.json was produced.
  4. Rebuild if the graph was removed by cleanup: /graphify <path> from the correct root.

Example fix

# before
/graphify ask "what connects to AuthService?"
# ERROR: No graph found ...

# after
/graphify .
/graphify ask "what connects to AuthService?"
Defensive patterns

Strategy: validation

Validate before calling

from pathlib import Path

if not Path('graphify-out/graph.json').is_file():
    print('graph missing - run /graphify <path> before ask')
else:
    print('graph present - proceed with traversal')

Prevention

When it happens

Trigger: Running /graphify ask (free-form Q&A over the graph) when graphify-out/graph.json is absent: never built, built elsewhere, deleted, or a prior build aborted before the export step (empty-extraction or shrink-guard exit).

Common situations: Fresh clone without running /graphify first; agent operating in a subdirectory while the graph lives at the repo root; CI cleaned graphify-out/; previous build failed so graph.json was never written.

Related errors


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