{"record":{"id":"cdb709b27c1f5de0","repo":"Graphify-Labs/graphify","slug":"error-no-graph-found-run-graphify-path-first","errorCode":null,"errorMessage":"ERROR: No graph found. Run /graphify <path> first to build the graph.","messagePattern":"ERROR: No graph found\\. Run /graphify <path> first to build the graph\\.","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"tools/skillgen/expected/graphify__skill-aider.md","lineNumber":940,"sourceCode":"\n---\n\n## For /graphify query\n\nTwo traversal modes - choose based on the question:\n\n| Mode | Flag | Best for |\n|------|------|----------|\n| BFS (default) | _(none)_ | \"What is X connected to?\" - broad context, nearest neighbors first |\n| DFS | `--dfs` | \"How does X reach Y?\" - trace a specific chain or dependency path |\n\nFirst check the graph exists:\n```bash\n$(cat graphify-out/.graphify_python) -c \"\nfrom pathlib import Path\nif not Path('graphify-out/graph.json').exists():\n    print('ERROR: No graph found. Run /graphify <path> first to build the graph.')\n    raise SystemExit(1)\n\"\n```\nIf it fails, stop and tell the user to run `/graphify <path>` first.\n\nLoad `graphify-out/graph.json`, then:\n\n1. Find the 1-3 nodes whose label best matches key terms in the question.\n2. Run the appropriate traversal from each starting node.\n3. Read the subgraph - node labels, edge relations, confidence tags, source locations.\n4. Answer using **only** what the graph contains. Quote `source_location` when citing a specific fact.\n5. If the graph lacks enough information, say so - do not hallucinate edges.\n\n```bash\n$(cat graphify-out/.graphify_python) -c \"\nimport sys, json\nfrom networkx.readwrite import json_graph\nimport networkx as nx\nfrom pathlib import Path","sourceCodeStart":922,"sourceCodeEnd":958,"githubUrl":"https://github.com/Graphify-Labs/graphify/blob/7fe58b0b0f3873be9a21c30106b8b8527c353aa6/tools/skillgen/expected/graphify__skill-aider.md#L922-L958","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"from pathlib import Path\n\nif not Path('graphify-out/graph.json').exists():\n    raise SystemExit('no graph — run /graphify <path> before querying')\n# ... proceed with BFS/DFS traversal","typeGuard":"def graph_ready() -> bool:\n    \"\"\"True when a built graphify graph exists for this workspace.\"\"\"\n    return Path('graphify-out/graph.json').is_file()","tryCatchPattern":null,"preventionTips":["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"],"tags":["graphify","generated-skill","precondition","missing-file","aider"],"backgroundTag":null,"analyzedSha":"7fe58b0b0f3873be9a21c30106b8b8527c353aa6","analyzedAt":"2026-08-14T19:23:21.323Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}