{"record":{"id":"99f70bc684e48733","repo":"Graphify-Labs/graphify","slug":"error-no-graph-found-run-graphify-path-first-99f70b","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-devin.md","lineNumber":1076,"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":1058,"sourceCodeEnd":1094,"githubUrl":"https://github.com/Graphify-Labs/graphify/blob/7fe58b0b0f3873be9a21c30106b8b8527c353aa6/tools/skillgen/expected/graphify__skill-devin.md#L1058-L1094","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Run the build first: /graphify <path> to generate graphify-out/graph.json.","Confirm you are in the same working directory where graphify-out/ was created (the path is relative).","If a build was attempted, check whether it aborted earlier — fix the empty-extraction or shrink-guard error that stopped it before export.","Verify graphify-out/.graphify_python exists too; without it the interpreter selector itself fails."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"from pathlib import Path\n\nfor artifact in ('graphify-out/graph.json', 'graphify-out/.graphify_python'):\n    if not Path(artifact).exists():\n        raise SystemExit(f'missing {artifact} - run /graphify <path> first from the build directory')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always run the /graphify build before any query/path/explain subcommand.","Run read subcommands from the same cwd the build used — artifact paths are relative.","Treat a failed build as 'no graph': the export step is last, so earlier guard failures leave no graph.json.","Script wrappers can pre-check both graph.json and .graphify_python in one pass."],"tags":["graphify","preflight","missing-artifact","query","filesystem"],"backgroundTag":null,"analyzedSha":"7fe58b0b0f3873be9a21c30106b8b8527c353aa6","analyzedAt":"2026-08-14T19:23:21.323Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}