From 8e179736ce46e9ae9d6e96bf97fe2b1aa2b99343 Mon Sep 17 00:00:00 2001 From: Safi Date: Thu, 28 May 2026 16:55:07 +0100 Subject: [PATCH] fix .graphify_python path missing graphify-out/ prefix in skill files Co-Authored-By: Claude Sonnet 4.6 --- graphify/skill-aider.md | 64 ++++++++++++++++++++--------------------- graphify/skill-amp.md | 64 ++++++++++++++++++++--------------------- graphify/skill-claw.md | 64 ++++++++++++++++++++--------------------- graphify/skill-codex.md | 64 ++++++++++++++++++++--------------------- graphify/skill-droid.md | 64 ++++++++++++++++++++--------------------- graphify/skill-kiro.md | 64 ++++++++++++++++++++--------------------- graphify/skill-pi.md | 64 ++++++++++++++++++++--------------------- graphify/skill-trae.md | 64 ++++++++++++++++++++--------------------- 8 files changed, 256 insertions(+), 256 deletions(-) diff --git a/graphify/skill-aider.md b/graphify/skill-aider.md index 7146e87..cc53f9d 100644 --- a/graphify/skill-aider.md +++ b/graphify/skill-aider.md @@ -78,12 +78,12 @@ mkdir -p graphify-out If the import succeeds, print nothing and move straight to Step 2. -**In every subsequent bash block, replace `python3` with `$(cat .graphify_python)` to use the correct interpreter.** +**In every subsequent bash block, replace `python3` with `$(cat graphify-out/.graphify_python)` to use the correct interpreter.** ### Step 2 - Detect files ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.detect import detect from pathlib import Path @@ -170,7 +170,7 @@ Note: Parallelizing AST + semantic saves 5-15s on large corpora. AST is determin For any code files detected, run AST extraction in parallel with Part B subagents: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.extract import collect_files, extract from pathlib import Path @@ -204,7 +204,7 @@ Print: `"Semantic extraction: N files (sequential — Aider)"` Before dispatching any subagents, check which files already have cached extraction results: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.cache import check_semantic_cache from pathlib import Path @@ -282,7 +282,7 @@ print(f'Merged {len(chunks)} chunks: {total_in:,} in / {total_out:,} out tokens' Save new results to cache: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.cache import save_semantic_cache from pathlib import Path @@ -295,7 +295,7 @@ print(f'Cached {saved} files') Merge cached + new results into `.graphify_semantic.json`: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from pathlib import Path @@ -328,7 +328,7 @@ Clean up temp files: `rm -f .graphify_cached.json .graphify_uncached.txt .graphi #### Part C - Merge AST + semantic into final extraction ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from pathlib import Path @@ -363,7 +363,7 @@ print(f'Merged: {total} nodes, {edges} edges ({len(ast[\"nodes\"])} AST + {len(s ```bash mkdir -p graphify-out -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.cluster import cluster, score_all @@ -416,7 +416,7 @@ Read `.graphify_analysis.json`. For each community key, look at its node labels Then regenerate the report and save the labels for the visualizer: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.cluster import score_all @@ -456,7 +456,7 @@ Replace INPUT_PATH with the actual path. If `--obsidian` was given: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_obsidian, to_canvas @@ -487,7 +487,7 @@ print(' _COMMUNITY_* - overview notes with cohesion scores and dataview queries Generate the HTML graph (always, unless `--no-viz`): ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_html @@ -514,7 +514,7 @@ else: **If `--neo4j`** - generate a Cypher file for manual import: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_cypher @@ -529,7 +529,7 @@ print('cypher.txt written - import with: cypher-shell < graphify-out/cypher.txt' **If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.cluster import cluster @@ -551,7 +551,7 @@ Replace `NEO4J_URI`, `NEO4J_USER`, `NEO4J_PASSWORD` with actual values. Default ### Step 7b - SVG export (only if --svg flag) ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_svg @@ -573,7 +573,7 @@ print('graph.svg written - embeds in Obsidian, Notion, GitHub READMEs') ### Step 7c - GraphML export (only if --graphml flag) ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.build import build_from_json from graphify.export import to_graphml @@ -615,7 +615,7 @@ To configure in Claude Desktop, add to `claude_desktop_config.json`: If `total_words` from `.graphify_detect.json` is greater than 5,000, run: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.benchmark import run_benchmark, print_benchmark from pathlib import Path @@ -633,7 +633,7 @@ Print the output directly in chat. If `total_words <= 5000`, skip silently - the ### Step 9 - Save manifest, update cost tracker, clean up, and report ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from pathlib import Path from datetime import datetime, timezone @@ -707,7 +707,7 @@ The graph is the map. Your job after the pipeline is to be the guide. Use when you've added or modified files since the last run. Only re-extracts changed files - saves tokens and time. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.detect import detect_incremental, save_manifest from pathlib import Path @@ -730,7 +730,7 @@ if new_total > 0: If new files exist, first check whether all changed files are code files: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from pathlib import Path @@ -765,7 +765,7 @@ fi Then: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_json @@ -792,7 +792,7 @@ Then run Steps 4–8 on the merged graph as normal. After Step 4, show the graph diff: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json @@ -826,7 +826,7 @@ Clean up after: `rm -f .graphify_old.json` Skip Steps 1–3. Load the existing graph from `graphify-out/graph.json` and re-run clustering: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.cluster import cluster, score_all from graphify.analyze import god_nodes, surprising_connections @@ -879,7 +879,7 @@ Two traversal modes - choose based on the question: First check the graph exists: ```bash -$(cat .graphify_python) -c " +$(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 first to build the graph.') @@ -897,7 +897,7 @@ Load `graphify-out/graph.json`, then: 5. If the graph lacks enough information, say so - do not hallucinate edges. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from networkx.readwrite import json_graph import networkx as nx @@ -988,7 +988,7 @@ Replace `QUESTION` with the user's actual question, `MODE` with `bfs` or `dfs`, After writing the answer, save it back into the graph so it improves future queries: ```bash -$(cat .graphify_python) -m graphify save-result --question "QUESTION" --answer "ANSWER" --type query --nodes NODE1 NODE2 +$(cat graphify-out/.graphify_python) -m graphify save-result --question "QUESTION" --answer "ANSWER" --type query --nodes NODE1 NODE2 ``` Replace `QUESTION` with the question, `ANSWER` with your full answer text, `SOURCE_NODES` with the list of node labels you cited. This closes the feedback loop: the next `--update` will extract this Q&A as a node in the graph. @@ -1001,7 +1001,7 @@ Find the shortest path between two named concepts in the graph. First check the graph exists: ```bash -$(cat .graphify_python) -c " +$(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 first to build the graph.') @@ -1011,7 +1011,7 @@ if not Path('graphify-out/graph.json').exists(): If it fails, stop and tell the user to run `/graphify ` first. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx from networkx.readwrite import json_graph @@ -1063,7 +1063,7 @@ Replace `NODE_A` and `NODE_B` with the actual concept names from the user. Then After writing the explanation, save it back: ```bash -$(cat .graphify_python) -m graphify save-result --question "Path from NODE_A to NODE_B" --answer "ANSWER" --type path_query --nodes NODE_A NODE_B +$(cat graphify-out/.graphify_python) -m graphify save-result --question "Path from NODE_A to NODE_B" --answer "ANSWER" --type path_query --nodes NODE_A NODE_B ``` --- @@ -1074,7 +1074,7 @@ Give a plain-language explanation of a single node - everything connected to it. First check the graph exists: ```bash -$(cat .graphify_python) -c " +$(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 first to build the graph.') @@ -1084,7 +1084,7 @@ if not Path('graphify-out/graph.json').exists(): If it fails, stop and tell the user to run `/graphify ` first. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx from networkx.readwrite import json_graph @@ -1129,7 +1129,7 @@ Replace `NODE_NAME` with the concept the user asked about. Then write a 3-5 sent After writing the explanation, save it back: ```bash -$(cat .graphify_python) -m graphify save-result --question "Explain NODE_NAME" --answer "ANSWER" --type explain --nodes NODE_NAME +$(cat graphify-out/.graphify_python) -m graphify save-result --question "Explain NODE_NAME" --answer "ANSWER" --type explain --nodes NODE_NAME ``` --- @@ -1139,7 +1139,7 @@ $(cat .graphify_python) -m graphify save-result --question "Explain NODE_NAME" - Fetch a URL and add it to the corpus, then update the graph. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys from graphify.ingest import ingest from pathlib import Path diff --git a/graphify/skill-amp.md b/graphify/skill-amp.md index 2aba0ba..39512f3 100644 --- a/graphify/skill-amp.md +++ b/graphify/skill-amp.md @@ -79,12 +79,12 @@ fi If the import succeeds, print nothing and move straight to Step 2. -**In every subsequent bash block, replace `python3` with `$(cat .graphify_python)` to use the correct interpreter.** +**In every subsequent bash block, replace `python3` with `$(cat graphify-out/.graphify_python)` to use the correct interpreter.** ### Step 2 - Detect files ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.detect import detect from pathlib import Path @@ -171,7 +171,7 @@ Note: Parallelizing AST + semantic saves 5-15s on large corpora. AST is determin For any code files detected, run AST extraction in parallel with Part B subagents: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.extract import collect_files, extract from pathlib import Path @@ -209,7 +209,7 @@ Before dispatching subagents, print a timing estimate: Before dispatching any subagents, check which files already have cached extraction results: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.cache import check_semantic_cache from pathlib import Path @@ -337,7 +337,7 @@ print(f'Merged {len(chunks)} chunks: {total_in:,} in / {total_out:,} out tokens' Save new results to cache: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.cache import save_semantic_cache from pathlib import Path @@ -350,7 +350,7 @@ print(f'Cached {saved} files') Merge cached + new results into `.graphify_semantic.json`: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from pathlib import Path @@ -383,7 +383,7 @@ Clean up temp files: `rm -f .graphify_cached.json .graphify_uncached.txt .graphi #### Part C - Merge AST + semantic into final extraction ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from pathlib import Path @@ -418,7 +418,7 @@ print(f'Merged: {total} nodes, {edges} edges ({len(ast[\"nodes\"])} AST + {len(s ```bash mkdir -p graphify-out -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.cluster import cluster, score_all @@ -471,7 +471,7 @@ Read `.graphify_analysis.json`. For each community key, look at its node labels Then regenerate the report and save the labels for the visualizer: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.cluster import score_all @@ -511,7 +511,7 @@ Replace INPUT_PATH with the actual path. If `--obsidian` was given: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_obsidian, to_canvas @@ -542,7 +542,7 @@ print(' _COMMUNITY_* - overview notes with cohesion scores and dataview queries Generate the HTML graph (always, unless `--no-viz`): ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_html @@ -569,7 +569,7 @@ else: **If `--neo4j`** - generate a Cypher file for manual import: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_cypher @@ -584,7 +584,7 @@ print('cypher.txt written - import with: cypher-shell < graphify-out/cypher.txt' **If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.cluster import cluster @@ -606,7 +606,7 @@ Replace `NEO4J_URI`, `NEO4J_USER`, `NEO4J_PASSWORD` with actual values. Default ### Step 7b - SVG export (only if --svg flag) ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_svg @@ -628,7 +628,7 @@ print('graph.svg written - embeds in Obsidian, Notion, GitHub READMEs') ### Step 7c - GraphML export (only if --graphml flag) ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.build import build_from_json from graphify.export import to_graphml @@ -670,7 +670,7 @@ To configure in Claude Desktop, add to `claude_desktop_config.json`: If `total_words` from `.graphify_detect.json` is greater than 5,000, run: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.benchmark import run_benchmark, print_benchmark from pathlib import Path @@ -688,7 +688,7 @@ Print the output directly in chat. If `total_words <= 5000`, skip silently - the ### Step 9 - Save manifest, update cost tracker, clean up, and report ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from pathlib import Path from datetime import datetime, timezone @@ -762,7 +762,7 @@ The graph is the map. Your job after the pipeline is to be the guide. Use when you've added or modified files since the last run. Only re-extracts changed files - saves tokens and time. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.detect import detect_incremental, save_manifest from pathlib import Path @@ -785,7 +785,7 @@ if new_total > 0: If new files exist, first check whether all changed files are code files: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from pathlib import Path @@ -820,7 +820,7 @@ fi Then: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_json @@ -847,7 +847,7 @@ Then run Steps 4–8 on the merged graph as normal. After Step 4, show the graph diff: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json @@ -881,7 +881,7 @@ Clean up after: `rm -f .graphify_old.json` Skip Steps 1–3. Load the existing graph from `graphify-out/graph.json` and re-run clustering: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.cluster import cluster, score_all from graphify.analyze import god_nodes, surprising_connections @@ -934,7 +934,7 @@ Two traversal modes - choose based on the question: First check the graph exists: ```bash -$(cat .graphify_python) -c " +$(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 first to build the graph.') @@ -952,7 +952,7 @@ Load `graphify-out/graph.json`, then: 5. If the graph lacks enough information, say so - do not hallucinate edges. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from networkx.readwrite import json_graph import networkx as nx @@ -1043,7 +1043,7 @@ Replace `QUESTION` with the user's actual question, `MODE` with `bfs` or `dfs`, After writing the answer, save it back into the graph so it improves future queries: ```bash -$(cat .graphify_python) -m graphify save-result --question "QUESTION" --answer "ANSWER" --type query --nodes NODE1 NODE2 +$(cat graphify-out/.graphify_python) -m graphify save-result --question "QUESTION" --answer "ANSWER" --type query --nodes NODE1 NODE2 ``` Replace `QUESTION` with the question, `ANSWER` with your full answer text, `SOURCE_NODES` with the list of node labels you cited. This closes the feedback loop: the next `--update` will extract this Q&A as a node in the graph. @@ -1056,7 +1056,7 @@ Find the shortest path between two named concepts in the graph. First check the graph exists: ```bash -$(cat .graphify_python) -c " +$(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 first to build the graph.') @@ -1066,7 +1066,7 @@ if not Path('graphify-out/graph.json').exists(): If it fails, stop and tell the user to run `/graphify ` first. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx from networkx.readwrite import json_graph @@ -1118,7 +1118,7 @@ Replace `NODE_A` and `NODE_B` with the actual concept names from the user. Then After writing the explanation, save it back: ```bash -$(cat .graphify_python) -m graphify save-result --question "Path from NODE_A to NODE_B" --answer "ANSWER" --type path_query --nodes NODE_A NODE_B +$(cat graphify-out/.graphify_python) -m graphify save-result --question "Path from NODE_A to NODE_B" --answer "ANSWER" --type path_query --nodes NODE_A NODE_B ``` --- @@ -1129,7 +1129,7 @@ Give a plain-language explanation of a single node - everything connected to it. First check the graph exists: ```bash -$(cat .graphify_python) -c " +$(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 first to build the graph.') @@ -1139,7 +1139,7 @@ if not Path('graphify-out/graph.json').exists(): If it fails, stop and tell the user to run `/graphify ` first. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx from networkx.readwrite import json_graph @@ -1184,7 +1184,7 @@ Replace `NODE_NAME` with the concept the user asked about. Then write a 3-5 sent After writing the explanation, save it back: ```bash -$(cat .graphify_python) -m graphify save-result --question "Explain NODE_NAME" --answer "ANSWER" --type explain --nodes NODE_NAME +$(cat graphify-out/.graphify_python) -m graphify save-result --question "Explain NODE_NAME" --answer "ANSWER" --type explain --nodes NODE_NAME ``` --- @@ -1194,7 +1194,7 @@ $(cat .graphify_python) -m graphify save-result --question "Explain NODE_NAME" - Fetch a URL and add it to the corpus, then update the graph. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys from graphify.ingest import ingest from pathlib import Path diff --git a/graphify/skill-claw.md b/graphify/skill-claw.md index f5186c3..9b3def9 100644 --- a/graphify/skill-claw.md +++ b/graphify/skill-claw.md @@ -78,12 +78,12 @@ mkdir -p graphify-out If the import succeeds, print nothing and move straight to Step 2. -**In every subsequent bash block, replace `python3` with `$(cat .graphify_python)` to use the correct interpreter.** +**In every subsequent bash block, replace `python3` with `$(cat graphify-out/.graphify_python)` to use the correct interpreter.** ### Step 2 - Detect files ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.detect import detect from pathlib import Path @@ -170,7 +170,7 @@ Note: Parallelizing AST + semantic saves 5-15s on large corpora. AST is determin For any code files detected, run AST extraction in parallel with Part B subagents: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.extract import collect_files, extract from pathlib import Path @@ -204,7 +204,7 @@ Print: `"Semantic extraction: N files (sequential — OpenClaw)"` Before dispatching any subagents, check which files already have cached extraction results: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.cache import check_semantic_cache from pathlib import Path @@ -282,7 +282,7 @@ print(f'Merged {len(chunks)} chunks: {total_in:,} in / {total_out:,} out tokens' Save new results to cache: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.cache import save_semantic_cache from pathlib import Path @@ -295,7 +295,7 @@ print(f'Cached {saved} files') Merge cached + new results into `.graphify_semantic.json`: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from pathlib import Path @@ -328,7 +328,7 @@ Clean up temp files: `rm -f .graphify_cached.json .graphify_uncached.txt .graphi #### Part C - Merge AST + semantic into final extraction ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from pathlib import Path @@ -363,7 +363,7 @@ print(f'Merged: {total} nodes, {edges} edges ({len(ast[\"nodes\"])} AST + {len(s ```bash mkdir -p graphify-out -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.cluster import cluster, score_all @@ -416,7 +416,7 @@ Read `.graphify_analysis.json`. For each community key, look at its node labels Then regenerate the report and save the labels for the visualizer: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.cluster import score_all @@ -456,7 +456,7 @@ Replace INPUT_PATH with the actual path. If `--obsidian` was given: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_obsidian, to_canvas @@ -487,7 +487,7 @@ print(' _COMMUNITY_* - overview notes with cohesion scores and dataview queries Generate the HTML graph (always, unless `--no-viz`): ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_html @@ -514,7 +514,7 @@ else: **If `--neo4j`** - generate a Cypher file for manual import: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_cypher @@ -529,7 +529,7 @@ print('cypher.txt written - import with: cypher-shell < graphify-out/cypher.txt' **If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.cluster import cluster @@ -551,7 +551,7 @@ Replace `NEO4J_URI`, `NEO4J_USER`, `NEO4J_PASSWORD` with actual values. Default ### Step 7b - SVG export (only if --svg flag) ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_svg @@ -573,7 +573,7 @@ print('graph.svg written - embeds in Obsidian, Notion, GitHub READMEs') ### Step 7c - GraphML export (only if --graphml flag) ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.build import build_from_json from graphify.export import to_graphml @@ -615,7 +615,7 @@ To configure in Claude Desktop, add to `claude_desktop_config.json`: If `total_words` from `.graphify_detect.json` is greater than 5,000, run: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.benchmark import run_benchmark, print_benchmark from pathlib import Path @@ -633,7 +633,7 @@ Print the output directly in chat. If `total_words <= 5000`, skip silently - the ### Step 9 - Save manifest, update cost tracker, clean up, and report ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from pathlib import Path from datetime import datetime, timezone @@ -707,7 +707,7 @@ The graph is the map. Your job after the pipeline is to be the guide. Use when you've added or modified files since the last run. Only re-extracts changed files - saves tokens and time. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.detect import detect_incremental, save_manifest from pathlib import Path @@ -730,7 +730,7 @@ if new_total > 0: If new files exist, first check whether all changed files are code files: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from pathlib import Path @@ -765,7 +765,7 @@ fi Then: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_json @@ -792,7 +792,7 @@ Then run Steps 4–8 on the merged graph as normal. After Step 4, show the graph diff: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json @@ -826,7 +826,7 @@ Clean up after: `rm -f .graphify_old.json` Skip Steps 1–3. Load the existing graph from `graphify-out/graph.json` and re-run clustering: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.cluster import cluster, score_all from graphify.analyze import god_nodes, surprising_connections @@ -879,7 +879,7 @@ Two traversal modes - choose based on the question: First check the graph exists: ```bash -$(cat .graphify_python) -c " +$(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 first to build the graph.') @@ -897,7 +897,7 @@ Load `graphify-out/graph.json`, then: 5. If the graph lacks enough information, say so - do not hallucinate edges. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from networkx.readwrite import json_graph import networkx as nx @@ -988,7 +988,7 @@ Replace `QUESTION` with the user's actual question, `MODE` with `bfs` or `dfs`, After writing the answer, save it back into the graph so it improves future queries: ```bash -$(cat .graphify_python) -m graphify save-result --question "QUESTION" --answer "ANSWER" --type query --nodes NODE1 NODE2 +$(cat graphify-out/.graphify_python) -m graphify save-result --question "QUESTION" --answer "ANSWER" --type query --nodes NODE1 NODE2 ``` Replace `QUESTION` with the question, `ANSWER` with your full answer text, `SOURCE_NODES` with the list of node labels you cited. This closes the feedback loop: the next `--update` will extract this Q&A as a node in the graph. @@ -1001,7 +1001,7 @@ Find the shortest path between two named concepts in the graph. First check the graph exists: ```bash -$(cat .graphify_python) -c " +$(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 first to build the graph.') @@ -1011,7 +1011,7 @@ if not Path('graphify-out/graph.json').exists(): If it fails, stop and tell the user to run `/graphify ` first. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx from networkx.readwrite import json_graph @@ -1063,7 +1063,7 @@ Replace `NODE_A` and `NODE_B` with the actual concept names from the user. Then After writing the explanation, save it back: ```bash -$(cat .graphify_python) -m graphify save-result --question "Path from NODE_A to NODE_B" --answer "ANSWER" --type path_query --nodes NODE_A NODE_B +$(cat graphify-out/.graphify_python) -m graphify save-result --question "Path from NODE_A to NODE_B" --answer "ANSWER" --type path_query --nodes NODE_A NODE_B ``` --- @@ -1074,7 +1074,7 @@ Give a plain-language explanation of a single node - everything connected to it. First check the graph exists: ```bash -$(cat .graphify_python) -c " +$(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 first to build the graph.') @@ -1084,7 +1084,7 @@ if not Path('graphify-out/graph.json').exists(): If it fails, stop and tell the user to run `/graphify ` first. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx from networkx.readwrite import json_graph @@ -1129,7 +1129,7 @@ Replace `NODE_NAME` with the concept the user asked about. Then write a 3-5 sent After writing the explanation, save it back: ```bash -$(cat .graphify_python) -m graphify save-result --question "Explain NODE_NAME" --answer "ANSWER" --type explain --nodes NODE_NAME +$(cat graphify-out/.graphify_python) -m graphify save-result --question "Explain NODE_NAME" --answer "ANSWER" --type explain --nodes NODE_NAME ``` --- @@ -1139,7 +1139,7 @@ $(cat .graphify_python) -m graphify save-result --question "Explain NODE_NAME" - Fetch a URL and add it to the corpus, then update the graph. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys from graphify.ingest import ingest from pathlib import Path diff --git a/graphify/skill-codex.md b/graphify/skill-codex.md index 9fadd9d..b8ea57f 100644 --- a/graphify/skill-codex.md +++ b/graphify/skill-codex.md @@ -79,12 +79,12 @@ fi If the import succeeds, print nothing and move straight to Step 2. -**In every subsequent bash block, replace `python3` with `$(cat .graphify_python)` to use the correct interpreter.** +**In every subsequent bash block, replace `python3` with `$(cat graphify-out/.graphify_python)` to use the correct interpreter.** ### Step 2 - Detect files ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.detect import detect from pathlib import Path @@ -171,7 +171,7 @@ Note: Parallelizing AST + semantic saves 5-15s on large corpora. AST is determin For any code files detected, run AST extraction in parallel with Part B subagents: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.extract import collect_files, extract from pathlib import Path @@ -209,7 +209,7 @@ Before dispatching subagents, print a timing estimate: Before dispatching any subagents, check which files already have cached extraction results: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.cache import check_semantic_cache from pathlib import Path @@ -348,7 +348,7 @@ print(f'Merged {len(chunks)} chunks: {total_in:,} in / {total_out:,} out tokens' Save new results to cache: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.cache import save_semantic_cache from pathlib import Path @@ -361,7 +361,7 @@ print(f'Cached {saved} files') Merge cached + new results into `.graphify_semantic.json`: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from pathlib import Path from graphify.semantic_cleanup import sanitize_semantic_fragment @@ -396,7 +396,7 @@ Clean up temp files: `rm -f .graphify_cached.json .graphify_uncached.txt .graphi #### Part C - Merge AST + semantic into final extraction ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from pathlib import Path from graphify.semantic_cleanup import sanitize_semantic_fragment @@ -433,7 +433,7 @@ print(f'Merged: {total} nodes, {edges} edges ({len(ast[\"nodes\"])} AST + {len(s ```bash mkdir -p graphify-out -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.cluster import cluster, score_all @@ -486,7 +486,7 @@ Read `.graphify_analysis.json`. For each community key, look at its node labels Then regenerate the report and save the labels for the visualizer: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.cluster import score_all @@ -526,7 +526,7 @@ Replace INPUT_PATH with the actual path. If `--obsidian` was given: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_obsidian, to_canvas @@ -557,7 +557,7 @@ print(' _COMMUNITY_* - overview notes with cohesion scores and dataview queries Generate the HTML graph (always, unless `--no-viz`): ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_html @@ -584,7 +584,7 @@ else: **If `--neo4j`** - generate a Cypher file for manual import: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_cypher @@ -599,7 +599,7 @@ print('cypher.txt written - import with: cypher-shell < graphify-out/cypher.txt' **If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.cluster import cluster @@ -621,7 +621,7 @@ Replace `NEO4J_URI`, `NEO4J_USER`, `NEO4J_PASSWORD` with actual values. Default ### Step 7b - SVG export (only if --svg flag) ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_svg @@ -643,7 +643,7 @@ print('graph.svg written - embeds in Obsidian, Notion, GitHub READMEs') ### Step 7c - GraphML export (only if --graphml flag) ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.build import build_from_json from graphify.export import to_graphml @@ -685,7 +685,7 @@ To configure in Claude Desktop, add to `claude_desktop_config.json`: If `total_words` from `.graphify_detect.json` is greater than 5,000, run: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.benchmark import run_benchmark, print_benchmark from pathlib import Path @@ -703,7 +703,7 @@ Print the output directly in chat. If `total_words <= 5000`, skip silently - the ### Step 9 - Save manifest, update cost tracker, clean up, and report ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from pathlib import Path from datetime import datetime, timezone @@ -777,7 +777,7 @@ The graph is the map. Your job after the pipeline is to be the guide. Use when you've added or modified files since the last run. Only re-extracts changed files - saves tokens and time. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.detect import detect_incremental, save_manifest from pathlib import Path @@ -800,7 +800,7 @@ if new_total > 0: If new files exist, first check whether all changed files are code files: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from pathlib import Path @@ -835,7 +835,7 @@ fi Then: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_json @@ -862,7 +862,7 @@ Then run Steps 4–8 on the merged graph as normal. After Step 4, show the graph diff: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json @@ -896,7 +896,7 @@ Clean up after: `rm -f .graphify_old.json` Skip Steps 1–3. Load the existing graph from `graphify-out/graph.json` and re-run clustering: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.cluster import cluster, score_all from graphify.analyze import god_nodes, surprising_connections @@ -949,7 +949,7 @@ Two traversal modes - choose based on the question: First check the graph exists: ```bash -$(cat .graphify_python) -c " +$(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 first to build the graph.') @@ -967,7 +967,7 @@ Load `graphify-out/graph.json`, then: 5. If the graph lacks enough information, say so - do not hallucinate edges. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from networkx.readwrite import json_graph import networkx as nx @@ -1058,7 +1058,7 @@ Replace `QUESTION` with the user's actual question, `MODE` with `bfs` or `dfs`, After writing the answer, save it back into the graph so it improves future queries: ```bash -$(cat .graphify_python) -m graphify save-result --question "QUESTION" --answer "ANSWER" --type query --nodes NODE1 NODE2 +$(cat graphify-out/.graphify_python) -m graphify save-result --question "QUESTION" --answer "ANSWER" --type query --nodes NODE1 NODE2 ``` Replace `QUESTION` with the question, `ANSWER` with your full answer text, `SOURCE_NODES` with the list of node labels you cited. This closes the feedback loop: the next `--update` will extract this Q&A as a node in the graph. @@ -1071,7 +1071,7 @@ Find the shortest path between two named concepts in the graph. First check the graph exists: ```bash -$(cat .graphify_python) -c " +$(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 first to build the graph.') @@ -1081,7 +1081,7 @@ if not Path('graphify-out/graph.json').exists(): If it fails, stop and tell the user to run `/graphify ` first. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx from networkx.readwrite import json_graph @@ -1133,7 +1133,7 @@ Replace `NODE_A` and `NODE_B` with the actual concept names from the user. Then After writing the explanation, save it back: ```bash -$(cat .graphify_python) -m graphify save-result --question "Path from NODE_A to NODE_B" --answer "ANSWER" --type path_query --nodes NODE_A NODE_B +$(cat graphify-out/.graphify_python) -m graphify save-result --question "Path from NODE_A to NODE_B" --answer "ANSWER" --type path_query --nodes NODE_A NODE_B ``` --- @@ -1144,7 +1144,7 @@ Give a plain-language explanation of a single node - everything connected to it. First check the graph exists: ```bash -$(cat .graphify_python) -c " +$(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 first to build the graph.') @@ -1154,7 +1154,7 @@ if not Path('graphify-out/graph.json').exists(): If it fails, stop and tell the user to run `/graphify ` first. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx from networkx.readwrite import json_graph @@ -1199,7 +1199,7 @@ Replace `NODE_NAME` with the concept the user asked about. Then write a 3-5 sent After writing the explanation, save it back: ```bash -$(cat .graphify_python) -m graphify save-result --question "Explain NODE_NAME" --answer "ANSWER" --type explain --nodes NODE_NAME +$(cat graphify-out/.graphify_python) -m graphify save-result --question "Explain NODE_NAME" --answer "ANSWER" --type explain --nodes NODE_NAME ``` --- @@ -1209,7 +1209,7 @@ $(cat .graphify_python) -m graphify save-result --question "Explain NODE_NAME" - Fetch a URL and add it to the corpus, then update the graph. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys from graphify.ingest import ingest from pathlib import Path diff --git a/graphify/skill-droid.md b/graphify/skill-droid.md index 33970a5..9407c41 100644 --- a/graphify/skill-droid.md +++ b/graphify/skill-droid.md @@ -78,12 +78,12 @@ mkdir -p graphify-out If the import succeeds, print nothing and move straight to Step 2. -**In every subsequent bash block, replace `python3` with `$(cat .graphify_python)` to use the correct interpreter.** +**In every subsequent bash block, replace `python3` with `$(cat graphify-out/.graphify_python)` to use the correct interpreter.** ### Step 2 - Detect files ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.detect import detect from pathlib import Path @@ -170,7 +170,7 @@ Note: Parallelizing AST + semantic saves 5-15s on large corpora. AST is determin For any code files detected, run AST extraction in parallel with Part B subagents: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.extract import collect_files, extract from pathlib import Path @@ -208,7 +208,7 @@ Before dispatching subagents, print a timing estimate: Before dispatching any subagents, check which files already have cached extraction results: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.cache import check_semantic_cache from pathlib import Path @@ -338,7 +338,7 @@ print(f'Merged {len(chunks)} chunks: {total_in:,} in / {total_out:,} out tokens' Save new results to cache: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.cache import save_semantic_cache from pathlib import Path @@ -351,7 +351,7 @@ print(f'Cached {saved} files') Merge cached + new results into `.graphify_semantic.json`: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from pathlib import Path @@ -384,7 +384,7 @@ Clean up temp files: `rm -f .graphify_cached.json .graphify_uncached.txt .graphi #### Part C - Merge AST + semantic into final extraction ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from pathlib import Path @@ -419,7 +419,7 @@ print(f'Merged: {total} nodes, {edges} edges ({len(ast[\"nodes\"])} AST + {len(s ```bash mkdir -p graphify-out -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.cluster import cluster, score_all @@ -472,7 +472,7 @@ Read `.graphify_analysis.json`. For each community key, look at its node labels Then regenerate the report and save the labels for the visualizer: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.cluster import score_all @@ -512,7 +512,7 @@ Replace INPUT_PATH with the actual path. If `--obsidian` was given: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_obsidian, to_canvas @@ -543,7 +543,7 @@ print(' _COMMUNITY_* - overview notes with cohesion scores and dataview queries Generate the HTML graph (always, unless `--no-viz`): ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_html @@ -570,7 +570,7 @@ else: **If `--neo4j`** - generate a Cypher file for manual import: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_cypher @@ -585,7 +585,7 @@ print('cypher.txt written - import with: cypher-shell < graphify-out/cypher.txt' **If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.cluster import cluster @@ -607,7 +607,7 @@ Replace `NEO4J_URI`, `NEO4J_USER`, `NEO4J_PASSWORD` with actual values. Default ### Step 7b - SVG export (only if --svg flag) ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_svg @@ -629,7 +629,7 @@ print('graph.svg written - embeds in Obsidian, Notion, GitHub READMEs') ### Step 7c - GraphML export (only if --graphml flag) ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.build import build_from_json from graphify.export import to_graphml @@ -671,7 +671,7 @@ To configure in Claude Desktop, add to `claude_desktop_config.json`: If `total_words` from `.graphify_detect.json` is greater than 5,000, run: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.benchmark import run_benchmark, print_benchmark from pathlib import Path @@ -689,7 +689,7 @@ Print the output directly in chat. If `total_words <= 5000`, skip silently - the ### Step 9 - Save manifest, update cost tracker, clean up, and report ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from pathlib import Path from datetime import datetime, timezone @@ -763,7 +763,7 @@ The graph is the map. Your job after the pipeline is to be the guide. Use when you've added or modified files since the last run. Only re-extracts changed files - saves tokens and time. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.detect import detect_incremental, save_manifest from pathlib import Path @@ -786,7 +786,7 @@ if new_total > 0: If new files exist, first check whether all changed files are code files: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from pathlib import Path @@ -821,7 +821,7 @@ fi Then: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_json @@ -848,7 +848,7 @@ Then run Steps 4–8 on the merged graph as normal. After Step 4, show the graph diff: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json @@ -882,7 +882,7 @@ Clean up after: `rm -f .graphify_old.json` Skip Steps 1–3. Load the existing graph from `graphify-out/graph.json` and re-run clustering: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.cluster import cluster, score_all from graphify.analyze import god_nodes, surprising_connections @@ -935,7 +935,7 @@ Two traversal modes - choose based on the question: First check the graph exists: ```bash -$(cat .graphify_python) -c " +$(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 first to build the graph.') @@ -953,7 +953,7 @@ Load `graphify-out/graph.json`, then: 5. If the graph lacks enough information, say so - do not hallucinate edges. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from networkx.readwrite import json_graph import networkx as nx @@ -1044,7 +1044,7 @@ Replace `QUESTION` with the user's actual question, `MODE` with `bfs` or `dfs`, After writing the answer, save it back into the graph so it improves future queries: ```bash -$(cat .graphify_python) -m graphify save-result --question "QUESTION" --answer "ANSWER" --type query --nodes NODE1 NODE2 +$(cat graphify-out/.graphify_python) -m graphify save-result --question "QUESTION" --answer "ANSWER" --type query --nodes NODE1 NODE2 ``` Replace `QUESTION` with the question, `ANSWER` with your full answer text, `SOURCE_NODES` with the list of node labels you cited. This closes the feedback loop: the next `--update` will extract this Q&A as a node in the graph. @@ -1057,7 +1057,7 @@ Find the shortest path between two named concepts in the graph. First check the graph exists: ```bash -$(cat .graphify_python) -c " +$(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 first to build the graph.') @@ -1067,7 +1067,7 @@ if not Path('graphify-out/graph.json').exists(): If it fails, stop and tell the user to run `/graphify ` first. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx from networkx.readwrite import json_graph @@ -1119,7 +1119,7 @@ Replace `NODE_A` and `NODE_B` with the actual concept names from the user. Then After writing the explanation, save it back: ```bash -$(cat .graphify_python) -m graphify save-result --question "Path from NODE_A to NODE_B" --answer "ANSWER" --type path_query --nodes NODE_A NODE_B +$(cat graphify-out/.graphify_python) -m graphify save-result --question "Path from NODE_A to NODE_B" --answer "ANSWER" --type path_query --nodes NODE_A NODE_B ``` --- @@ -1130,7 +1130,7 @@ Give a plain-language explanation of a single node - everything connected to it. First check the graph exists: ```bash -$(cat .graphify_python) -c " +$(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 first to build the graph.') @@ -1140,7 +1140,7 @@ if not Path('graphify-out/graph.json').exists(): If it fails, stop and tell the user to run `/graphify ` first. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx from networkx.readwrite import json_graph @@ -1185,7 +1185,7 @@ Replace `NODE_NAME` with the concept the user asked about. Then write a 3-5 sent After writing the explanation, save it back: ```bash -$(cat .graphify_python) -m graphify save-result --question "Explain NODE_NAME" --answer "ANSWER" --type explain --nodes NODE_NAME +$(cat graphify-out/.graphify_python) -m graphify save-result --question "Explain NODE_NAME" --answer "ANSWER" --type explain --nodes NODE_NAME ``` --- @@ -1195,7 +1195,7 @@ $(cat .graphify_python) -m graphify save-result --question "Explain NODE_NAME" - Fetch a URL and add it to the corpus, then update the graph. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys from graphify.ingest import ingest from pathlib import Path diff --git a/graphify/skill-kiro.md b/graphify/skill-kiro.md index 952a255..cb6f98e 100644 --- a/graphify/skill-kiro.md +++ b/graphify/skill-kiro.md @@ -77,12 +77,12 @@ mkdir -p graphify-out If the import succeeds, print nothing and move straight to Step 2. -**In every subsequent bash block, replace `python3` with `$(cat .graphify_python)` to use the correct interpreter.** +**In every subsequent bash block, replace `python3` with `$(cat graphify-out/.graphify_python)` to use the correct interpreter.** ### Step 2 - Detect files ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.detect import detect from pathlib import Path @@ -169,7 +169,7 @@ Note: Parallelizing AST + semantic saves 5-15s on large corpora. AST is determin For any code files detected, run AST extraction in parallel with Part B subagents: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.extract import collect_files, extract from pathlib import Path @@ -203,7 +203,7 @@ Print: `"Semantic extraction: N files (sequential — OpenClaw)"` Before dispatching any subagents, check which files already have cached extraction results: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.cache import check_semantic_cache from pathlib import Path @@ -281,7 +281,7 @@ print(f'Merged {len(chunks)} chunks: {total_in:,} in / {total_out:,} out tokens' Save new results to cache: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.cache import save_semantic_cache from pathlib import Path @@ -294,7 +294,7 @@ print(f'Cached {saved} files') Merge cached + new results into `.graphify_semantic.json`: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from pathlib import Path @@ -327,7 +327,7 @@ Clean up temp files: `rm -f .graphify_cached.json .graphify_uncached.txt .graphi #### Part C - Merge AST + semantic into final extraction ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from pathlib import Path @@ -362,7 +362,7 @@ print(f'Merged: {total} nodes, {edges} edges ({len(ast[\"nodes\"])} AST + {len(s ```bash mkdir -p graphify-out -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.cluster import cluster, score_all @@ -415,7 +415,7 @@ Read `.graphify_analysis.json`. For each community key, look at its node labels Then regenerate the report and save the labels for the visualizer: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.cluster import score_all @@ -455,7 +455,7 @@ Replace INPUT_PATH with the actual path. If `--obsidian` was given: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_obsidian, to_canvas @@ -486,7 +486,7 @@ print(' _COMMUNITY_* - overview notes with cohesion scores and dataview queries Generate the HTML graph (always, unless `--no-viz`): ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_html @@ -513,7 +513,7 @@ else: **If `--neo4j`** - generate a Cypher file for manual import: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_cypher @@ -528,7 +528,7 @@ print('cypher.txt written - import with: cypher-shell < graphify-out/cypher.txt' **If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.cluster import cluster @@ -550,7 +550,7 @@ Replace `NEO4J_URI`, `NEO4J_USER`, `NEO4J_PASSWORD` with actual values. Default ### Step 7b - SVG export (only if --svg flag) ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_svg @@ -572,7 +572,7 @@ print('graph.svg written - embeds in Obsidian, Notion, GitHub READMEs') ### Step 7c - GraphML export (only if --graphml flag) ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.build import build_from_json from graphify.export import to_graphml @@ -614,7 +614,7 @@ To configure in Claude Desktop, add to `claude_desktop_config.json`: If `total_words` from `.graphify_detect.json` is greater than 5,000, run: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.benchmark import run_benchmark, print_benchmark from pathlib import Path @@ -632,7 +632,7 @@ Print the output directly in chat. If `total_words <= 5000`, skip silently - the ### Step 9 - Save manifest, update cost tracker, clean up, and report ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from pathlib import Path from datetime import datetime, timezone @@ -706,7 +706,7 @@ The graph is the map. Your job after the pipeline is to be the guide. Use when you've added or modified files since the last run. Only re-extracts changed files - saves tokens and time. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.detect import detect_incremental, save_manifest from pathlib import Path @@ -729,7 +729,7 @@ if new_total > 0: If new files exist, first check whether all changed files are code files: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from pathlib import Path @@ -764,7 +764,7 @@ fi Then: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_json @@ -791,7 +791,7 @@ Then run Steps 4–8 on the merged graph as normal. After Step 4, show the graph diff: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json @@ -825,7 +825,7 @@ Clean up after: `rm -f .graphify_old.json` Skip Steps 1–3. Load the existing graph from `graphify-out/graph.json` and re-run clustering: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.cluster import cluster, score_all from graphify.analyze import god_nodes, surprising_connections @@ -878,7 +878,7 @@ Two traversal modes - choose based on the question: First check the graph exists: ```bash -$(cat .graphify_python) -c " +$(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 first to build the graph.') @@ -896,7 +896,7 @@ Load `graphify-out/graph.json`, then: 5. If the graph lacks enough information, say so - do not hallucinate edges. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from networkx.readwrite import json_graph import networkx as nx @@ -987,7 +987,7 @@ Replace `QUESTION` with the user's actual question, `MODE` with `bfs` or `dfs`, After writing the answer, save it back into the graph so it improves future queries: ```bash -$(cat .graphify_python) -m graphify save-result --question "QUESTION" --answer "ANSWER" --type query --nodes NODE1 NODE2 +$(cat graphify-out/.graphify_python) -m graphify save-result --question "QUESTION" --answer "ANSWER" --type query --nodes NODE1 NODE2 ``` Replace `QUESTION` with the question, `ANSWER` with your full answer text, `SOURCE_NODES` with the list of node labels you cited. This closes the feedback loop: the next `--update` will extract this Q&A as a node in the graph. @@ -1000,7 +1000,7 @@ Find the shortest path between two named concepts in the graph. First check the graph exists: ```bash -$(cat .graphify_python) -c " +$(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 first to build the graph.') @@ -1010,7 +1010,7 @@ if not Path('graphify-out/graph.json').exists(): If it fails, stop and tell the user to run `/graphify ` first. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx from networkx.readwrite import json_graph @@ -1062,7 +1062,7 @@ Replace `NODE_A` and `NODE_B` with the actual concept names from the user. Then After writing the explanation, save it back: ```bash -$(cat .graphify_python) -m graphify save-result --question "Path from NODE_A to NODE_B" --answer "ANSWER" --type path_query --nodes NODE_A NODE_B +$(cat graphify-out/.graphify_python) -m graphify save-result --question "Path from NODE_A to NODE_B" --answer "ANSWER" --type path_query --nodes NODE_A NODE_B ``` --- @@ -1073,7 +1073,7 @@ Give a plain-language explanation of a single node - everything connected to it. First check the graph exists: ```bash -$(cat .graphify_python) -c " +$(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 first to build the graph.') @@ -1083,7 +1083,7 @@ if not Path('graphify-out/graph.json').exists(): If it fails, stop and tell the user to run `/graphify ` first. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx from networkx.readwrite import json_graph @@ -1128,7 +1128,7 @@ Replace `NODE_NAME` with the concept the user asked about. Then write a 3-5 sent After writing the explanation, save it back: ```bash -$(cat .graphify_python) -m graphify save-result --question "Explain NODE_NAME" --answer "ANSWER" --type explain --nodes NODE_NAME +$(cat graphify-out/.graphify_python) -m graphify save-result --question "Explain NODE_NAME" --answer "ANSWER" --type explain --nodes NODE_NAME ``` --- @@ -1138,7 +1138,7 @@ $(cat .graphify_python) -m graphify save-result --question "Explain NODE_NAME" - Fetch a URL and add it to the corpus, then update the graph. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys from graphify.ingest import ingest from pathlib import Path diff --git a/graphify/skill-pi.md b/graphify/skill-pi.md index 4e4dd9e..21dc2e7 100644 --- a/graphify/skill-pi.md +++ b/graphify/skill-pi.md @@ -77,12 +77,12 @@ mkdir -p graphify-out If the import succeeds, print nothing and move straight to Step 2. -**In every subsequent bash block, replace `python3` with `$(cat .graphify_python)` to use the correct interpreter.** +**In every subsequent bash block, replace `python3` with `$(cat graphify-out/.graphify_python)` to use the correct interpreter.** ### Step 2 - Detect files ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.detect import detect from pathlib import Path @@ -169,7 +169,7 @@ Note: Parallelizing AST + semantic saves 5-15s on large corpora. AST is determin For any code files detected, run AST extraction in parallel with Part B subagents: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.extract import collect_files, extract from pathlib import Path @@ -203,7 +203,7 @@ Print: `"Semantic extraction: N files (sequential — OpenClaw)"` Before dispatching any subagents, check which files already have cached extraction results: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.cache import check_semantic_cache from pathlib import Path @@ -281,7 +281,7 @@ print(f'Merged {len(chunks)} chunks: {total_in:,} in / {total_out:,} out tokens' Save new results to cache: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.cache import save_semantic_cache from pathlib import Path @@ -294,7 +294,7 @@ print(f'Cached {saved} files') Merge cached + new results into `.graphify_semantic.json`: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from pathlib import Path @@ -327,7 +327,7 @@ Clean up temp files: `rm -f .graphify_cached.json .graphify_uncached.txt .graphi #### Part C - Merge AST + semantic into final extraction ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from pathlib import Path @@ -362,7 +362,7 @@ print(f'Merged: {total} nodes, {edges} edges ({len(ast[\"nodes\"])} AST + {len(s ```bash mkdir -p graphify-out -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.cluster import cluster, score_all @@ -415,7 +415,7 @@ Read `.graphify_analysis.json`. For each community key, look at its node labels Then regenerate the report and save the labels for the visualizer: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.cluster import score_all @@ -455,7 +455,7 @@ Replace INPUT_PATH with the actual path. If `--obsidian` was given: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_obsidian, to_canvas @@ -486,7 +486,7 @@ print(' _COMMUNITY_* - overview notes with cohesion scores and dataview queries Generate the HTML graph (always, unless `--no-viz`): ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_html @@ -513,7 +513,7 @@ else: **If `--neo4j`** - generate a Cypher file for manual import: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_cypher @@ -528,7 +528,7 @@ print('cypher.txt written - import with: cypher-shell < graphify-out/cypher.txt' **If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.cluster import cluster @@ -550,7 +550,7 @@ Replace `NEO4J_URI`, `NEO4J_USER`, `NEO4J_PASSWORD` with actual values. Default ### Step 7b - SVG export (only if --svg flag) ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_svg @@ -572,7 +572,7 @@ print('graph.svg written - embeds in Obsidian, Notion, GitHub READMEs') ### Step 7c - GraphML export (only if --graphml flag) ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.build import build_from_json from graphify.export import to_graphml @@ -614,7 +614,7 @@ To configure in Claude Desktop, add to `claude_desktop_config.json`: If `total_words` from `.graphify_detect.json` is greater than 5,000, run: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.benchmark import run_benchmark, print_benchmark from pathlib import Path @@ -632,7 +632,7 @@ Print the output directly in chat. If `total_words <= 5000`, skip silently - the ### Step 9 - Save manifest, update cost tracker, clean up, and report ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from pathlib import Path from datetime import datetime, timezone @@ -706,7 +706,7 @@ The graph is the map. Your job after the pipeline is to be the guide. Use when you've added or modified files since the last run. Only re-extracts changed files - saves tokens and time. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.detect import detect_incremental, save_manifest from pathlib import Path @@ -729,7 +729,7 @@ if new_total > 0: If new files exist, first check whether all changed files are code files: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from pathlib import Path @@ -764,7 +764,7 @@ fi Then: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_json @@ -791,7 +791,7 @@ Then run Steps 4–8 on the merged graph as normal. After Step 4, show the graph diff: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json @@ -825,7 +825,7 @@ Clean up after: `rm -f .graphify_old.json` Skip Steps 1–3. Load the existing graph from `graphify-out/graph.json` and re-run clustering: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.cluster import cluster, score_all from graphify.analyze import god_nodes, surprising_connections @@ -878,7 +878,7 @@ Two traversal modes - choose based on the question: First check the graph exists: ```bash -$(cat .graphify_python) -c " +$(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 first to build the graph.') @@ -896,7 +896,7 @@ Load `graphify-out/graph.json`, then: 5. If the graph lacks enough information, say so - do not hallucinate edges. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from networkx.readwrite import json_graph import networkx as nx @@ -987,7 +987,7 @@ Replace `QUESTION` with the user's actual question, `MODE` with `bfs` or `dfs`, After writing the answer, save it back into the graph so it improves future queries: ```bash -$(cat .graphify_python) -m graphify save-result --question "QUESTION" --answer "ANSWER" --type query --nodes NODE1 NODE2 +$(cat graphify-out/.graphify_python) -m graphify save-result --question "QUESTION" --answer "ANSWER" --type query --nodes NODE1 NODE2 ``` Replace `QUESTION` with the question, `ANSWER` with your full answer text, `SOURCE_NODES` with the list of node labels you cited. This closes the feedback loop: the next `--update` will extract this Q&A as a node in the graph. @@ -1000,7 +1000,7 @@ Find the shortest path between two named concepts in the graph. First check the graph exists: ```bash -$(cat .graphify_python) -c " +$(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 first to build the graph.') @@ -1010,7 +1010,7 @@ if not Path('graphify-out/graph.json').exists(): If it fails, stop and tell the user to run `/graphify ` first. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx from networkx.readwrite import json_graph @@ -1062,7 +1062,7 @@ Replace `NODE_A` and `NODE_B` with the actual concept names from the user. Then After writing the explanation, save it back: ```bash -$(cat .graphify_python) -m graphify save-result --question "Path from NODE_A to NODE_B" --answer "ANSWER" --type path_query --nodes NODE_A NODE_B +$(cat graphify-out/.graphify_python) -m graphify save-result --question "Path from NODE_A to NODE_B" --answer "ANSWER" --type path_query --nodes NODE_A NODE_B ``` --- @@ -1073,7 +1073,7 @@ Give a plain-language explanation of a single node - everything connected to it. First check the graph exists: ```bash -$(cat .graphify_python) -c " +$(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 first to build the graph.') @@ -1083,7 +1083,7 @@ if not Path('graphify-out/graph.json').exists(): If it fails, stop and tell the user to run `/graphify ` first. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx from networkx.readwrite import json_graph @@ -1128,7 +1128,7 @@ Replace `NODE_NAME` with the concept the user asked about. Then write a 3-5 sent After writing the explanation, save it back: ```bash -$(cat .graphify_python) -m graphify save-result --question "Explain NODE_NAME" --answer "ANSWER" --type explain --nodes NODE_NAME +$(cat graphify-out/.graphify_python) -m graphify save-result --question "Explain NODE_NAME" --answer "ANSWER" --type explain --nodes NODE_NAME ``` --- @@ -1138,7 +1138,7 @@ $(cat .graphify_python) -m graphify save-result --question "Explain NODE_NAME" - Fetch a URL and add it to the corpus, then update the graph. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys from graphify.ingest import ingest from pathlib import Path diff --git a/graphify/skill-trae.md b/graphify/skill-trae.md index 2e2dc9a..0d2b561 100644 --- a/graphify/skill-trae.md +++ b/graphify/skill-trae.md @@ -77,12 +77,12 @@ fi If the import succeeds, print nothing and move straight to Step 2. -**In every subsequent bash block, replace `python3` with `$(cat .graphify_python)` to use the correct interpreter.** +**In every subsequent bash block, replace `python3` with `$(cat graphify-out/.graphify_python)` to use the correct interpreter.** ### Step 2 - Detect files ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.detect import detect from pathlib import Path @@ -169,7 +169,7 @@ Note: Parallelizing AST + semantic saves 5-15s on large corpora. AST is determin For any code files detected, run AST extraction in parallel with Part B subagents: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.extract import collect_files, extract from pathlib import Path @@ -207,7 +207,7 @@ Before dispatching subagents, print a timing estimate: Before dispatching any subagents, check which files already have cached extraction results: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.cache import check_semantic_cache from pathlib import Path @@ -334,7 +334,7 @@ print(f'Merged {len(chunks)} chunks: {total_in:,} in / {total_out:,} out tokens' Save new results to cache: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.cache import save_semantic_cache from pathlib import Path @@ -347,7 +347,7 @@ print(f'Cached {saved} files') Merge cached + new results into `.graphify_semantic.json`: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from pathlib import Path @@ -380,7 +380,7 @@ Clean up temp files: `rm -f .graphify_cached.json .graphify_uncached.txt .graphi #### Part C - Merge AST + semantic into final extraction ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from pathlib import Path @@ -414,7 +414,7 @@ print(f'Merged: {total} nodes, {edges} edges ({len(ast[\"nodes\"])} AST + {len(s ```bash mkdir -p graphify-out -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.cluster import cluster, score_all @@ -466,7 +466,7 @@ Read `.graphify_analysis.json`. For each community key, look at its node labels Then regenerate the report and save the labels for the visualizer: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.cluster import score_all @@ -504,7 +504,7 @@ Replace INPUT_PATH with the actual path. If `--obsidian` was given: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_obsidian, to_canvas @@ -535,7 +535,7 @@ print(' _COMMUNITY_* - overview notes with cohesion scores and dataview queries Generate the HTML graph (always, unless `--no-viz`): ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_html @@ -562,7 +562,7 @@ else: **If `--neo4j`** - generate a Cypher file for manual import: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_cypher @@ -577,7 +577,7 @@ print('cypher.txt written - import with: cypher-shell < graphify-out/cypher.txt' **If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.cluster import cluster @@ -599,7 +599,7 @@ Replace `NEO4J_URI`, `NEO4J_USER`, `NEO4J_PASSWORD` with actual values. Default ### Step 7b - SVG export (only if --svg flag) ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_svg @@ -621,7 +621,7 @@ print('graph.svg written - embeds in Obsidian, Notion, GitHub READMEs') ### Step 7c - GraphML export (only if --graphml flag) ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.build import build_from_json from graphify.export import to_graphml @@ -651,7 +651,7 @@ This starts a stdio MCP server that exposes tools: `query_graph`, `get_node`, `g If `total_words` from `.graphify_detect.json` is greater than 5,000, run: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.benchmark import run_benchmark, print_benchmark from pathlib import Path @@ -669,7 +669,7 @@ Print the output directly in chat. If `total_words <= 5000`, skip silently - the ### Step 9 - Save manifest, update cost tracker, clean up, and report ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from pathlib import Path from datetime import datetime, timezone @@ -741,7 +741,7 @@ The graph is the map. Your job after the pipeline is to be the guide. Use when you've added or modified files since the last run. Only re-extracts changed files - saves tokens and time. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.detect import detect_incremental, save_manifest from pathlib import Path @@ -764,7 +764,7 @@ if new_total > 0: If new files exist, first check whether all changed files are code files: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from pathlib import Path @@ -799,7 +799,7 @@ fi Then: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_json @@ -823,7 +823,7 @@ Then run Steps 4–8 on the merged graph as normal. After Step 4, show the graph diff: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json @@ -856,7 +856,7 @@ Clean up after: `rm -f .graphify_old.json` Skip Steps 1–3. Load the existing graph from `graphify-out/graph.json` and re-run clustering: ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from graphify.cluster import cluster, score_all from graphify.analyze import god_nodes, surprising_connections @@ -909,7 +909,7 @@ Two traversal modes - choose based on the question: First check the graph exists: ```bash -$(cat .graphify_python) -c " +$(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 first to build the graph.') @@ -927,7 +927,7 @@ Load `graphify-out/graph.json`, then: 5. If the graph lacks enough information, say so - do not hallucinate edges. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys, json from networkx.readwrite import json_graph import networkx as nx @@ -1012,7 +1012,7 @@ Replace `QUESTION` with the user's actual question, `MODE` with `bfs` or `dfs`, After writing the answer, save it back into the graph so it improves future queries: ```bash -$(cat .graphify_python) -m graphify save-result --question "QUESTION" --answer "ANSWER" --type query --nodes NODE1 NODE2 +$(cat graphify-out/.graphify_python) -m graphify save-result --question "QUESTION" --answer "ANSWER" --type query --nodes NODE1 NODE2 ``` Replace `QUESTION` with the question, `ANSWER` with your full answer text, `SOURCE_NODES` with the list of node labels you cited. This closes the feedback loop: the next `--update` will extract this Q&A as a node in the graph. @@ -1025,7 +1025,7 @@ Find the shortest path between two named concepts in the graph. First check the graph exists: ```bash -$(cat .graphify_python) -c " +$(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 first to build the graph.') @@ -1035,7 +1035,7 @@ if not Path('graphify-out/graph.json').exists(): If it fails, stop and tell the user to run `/graphify ` first. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx from networkx.readwrite import json_graph @@ -1087,7 +1087,7 @@ Replace `NODE_A` and `NODE_B` with the actual concept names from the user. Then After writing the explanation, save it back: ```bash -$(cat .graphify_python) -m graphify save-result --question "Path from NODE_A to NODE_B" --answer "ANSWER" --type path_query --nodes NODE_A NODE_B +$(cat graphify-out/.graphify_python) -m graphify save-result --question "Path from NODE_A to NODE_B" --answer "ANSWER" --type path_query --nodes NODE_A NODE_B ``` --- @@ -1098,7 +1098,7 @@ Give a plain-language explanation of a single node - everything connected to it. First check the graph exists: ```bash -$(cat .graphify_python) -c " +$(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 first to build the graph.') @@ -1108,7 +1108,7 @@ if not Path('graphify-out/graph.json').exists(): If it fails, stop and tell the user to run `/graphify ` first. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx from networkx.readwrite import json_graph @@ -1152,7 +1152,7 @@ Replace `NODE_NAME` with the concept the user asked about. Then write a 3-5 sent After writing the explanation, save it back: ```bash -$(cat .graphify_python) -m graphify save-result --question "Explain NODE_NAME" --answer "ANSWER" --type explain --nodes NODE_NAME +$(cat graphify-out/.graphify_python) -m graphify save-result --question "Explain NODE_NAME" --answer "ANSWER" --type explain --nodes NODE_NAME ``` --- @@ -1162,7 +1162,7 @@ $(cat .graphify_python) -m graphify save-result --question "Explain NODE_NAME" - Fetch a URL and add it to the corpus, then update the graph. ```bash -$(cat .graphify_python) -c " +$(cat graphify-out/.graphify_python) -c " import sys from graphify.ingest import ingest from pathlib import Path