diff --git a/graphify/skill-aider.md b/graphify/skill-aider.md index e2c3fd11a2..685d6def7f 100644 --- a/graphify/skill-aider.md +++ b/graphify/skill-aider.md @@ -822,13 +822,13 @@ $(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path # Load existing graph existing_data = json.loads(Path('graphify-out/graph.json').read_text()) -G_existing = json_graph.node_link_graph(existing_data, edges='links') +G_existing = load_node_link_graph(existing_data) # Load new extraction new_extraction = json.loads(Path('.graphify_extract.json').read_text()) @@ -849,7 +849,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -859,7 +859,7 @@ new_extract = json.loads(Path('.graphify_extract.json').read_text()) G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: @@ -885,12 +885,12 @@ from graphify.cluster import cluster, score_all from graphify.analyze import god_nodes, surprising_connections from graphify.report import generate from graphify.export import to_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text()) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) detection = {'total_files': 0, 'total_words': 99999, 'needs_graph': True, 'warning': None, 'files': {'code': [], 'document': [], 'paper': []}} @@ -954,12 +954,12 @@ Load `graphify-out/graph.json`, then: ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text()) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -1069,11 +1069,11 @@ If it fails, stop and tell the user to run `/graphify ` first. $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text()) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -1142,11 +1142,11 @@ If it fails, stop and tell the user to run `/graphify ` first. $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text()) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/graphify/skill-devin.md b/graphify/skill-devin.md index b9e7a0ee3d..ea6a4054cb 100644 --- a/graphify/skill-devin.md +++ b/graphify/skill-devin.md @@ -959,13 +959,13 @@ $(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path # Load existing graph existing_data = json.loads(Path('graphify-out/graph.json').read_text()) -G_existing = json_graph.node_link_graph(existing_data, edges='links') +G_existing = load_node_link_graph(existing_data) # Load new extraction new_extraction = json.loads(Path('graphify-out/.graphify_extract.json').read_text()) @@ -986,7 +986,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -995,7 +995,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text() G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: @@ -1021,12 +1021,12 @@ from graphify.cluster import cluster, score_all from graphify.analyze import god_nodes, surprising_connections from graphify.report import generate from graphify.export import to_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text()) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) detection = {'total_files': 0, 'total_words': 99999, 'needs_graph': True, 'warning': None, 'files': {'code': [], 'document': [], 'paper': []}} @@ -1090,12 +1090,12 @@ Load `graphify-out/graph.json`, then: ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text()) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -1202,11 +1202,11 @@ if not Path('graphify-out/graph.json').exists(): $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text()) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -1274,11 +1274,11 @@ if not Path('graphify-out/graph.json').exists(): $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text()) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/graphify/skills/agents/references/query.md b/graphify/skills/agents/references/query.md index 56565eb782..6dd627863c 100644 --- a/graphify/skills/agents/references/query.md +++ b/graphify/skills/agents/references/query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/graphify/skills/agents/references/update.md b/graphify/skills/agents/references/update.md index 3632fd4126..bd8e659d3c 100644 --- a/graphify/skills/agents/references/update.md +++ b/graphify/skills/agents/references/update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/graphify/skills/amp/references/query.md b/graphify/skills/amp/references/query.md index 56565eb782..6dd627863c 100644 --- a/graphify/skills/amp/references/query.md +++ b/graphify/skills/amp/references/query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/graphify/skills/amp/references/update.md b/graphify/skills/amp/references/update.md index 3632fd4126..bd8e659d3c 100644 --- a/graphify/skills/amp/references/update.md +++ b/graphify/skills/amp/references/update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/graphify/skills/claude/references/query.md b/graphify/skills/claude/references/query.md index 56565eb782..6dd627863c 100644 --- a/graphify/skills/claude/references/query.md +++ b/graphify/skills/claude/references/query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/graphify/skills/claude/references/update.md b/graphify/skills/claude/references/update.md index 3632fd4126..bd8e659d3c 100644 --- a/graphify/skills/claude/references/update.md +++ b/graphify/skills/claude/references/update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/graphify/skills/claw/references/query.md b/graphify/skills/claw/references/query.md index 56565eb782..6dd627863c 100644 --- a/graphify/skills/claw/references/query.md +++ b/graphify/skills/claw/references/query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/graphify/skills/claw/references/update.md b/graphify/skills/claw/references/update.md index 3632fd4126..bd8e659d3c 100644 --- a/graphify/skills/claw/references/update.md +++ b/graphify/skills/claw/references/update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/graphify/skills/codex/references/query.md b/graphify/skills/codex/references/query.md index 56565eb782..6dd627863c 100644 --- a/graphify/skills/codex/references/query.md +++ b/graphify/skills/codex/references/query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/graphify/skills/codex/references/update.md b/graphify/skills/codex/references/update.md index 3632fd4126..bd8e659d3c 100644 --- a/graphify/skills/codex/references/update.md +++ b/graphify/skills/codex/references/update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/graphify/skills/copilot/references/query.md b/graphify/skills/copilot/references/query.md index 56565eb782..6dd627863c 100644 --- a/graphify/skills/copilot/references/query.md +++ b/graphify/skills/copilot/references/query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/graphify/skills/copilot/references/update.md b/graphify/skills/copilot/references/update.md index 3632fd4126..bd8e659d3c 100644 --- a/graphify/skills/copilot/references/update.md +++ b/graphify/skills/copilot/references/update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/graphify/skills/droid/references/query.md b/graphify/skills/droid/references/query.md index 56565eb782..6dd627863c 100644 --- a/graphify/skills/droid/references/query.md +++ b/graphify/skills/droid/references/query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/graphify/skills/droid/references/update.md b/graphify/skills/droid/references/update.md index 3632fd4126..bd8e659d3c 100644 --- a/graphify/skills/droid/references/update.md +++ b/graphify/skills/droid/references/update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/graphify/skills/kilo/references/query.md b/graphify/skills/kilo/references/query.md index 56565eb782..6dd627863c 100644 --- a/graphify/skills/kilo/references/query.md +++ b/graphify/skills/kilo/references/query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/graphify/skills/kilo/references/update.md b/graphify/skills/kilo/references/update.md index 3632fd4126..bd8e659d3c 100644 --- a/graphify/skills/kilo/references/update.md +++ b/graphify/skills/kilo/references/update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/graphify/skills/kiro/references/query.md b/graphify/skills/kiro/references/query.md index 56565eb782..6dd627863c 100644 --- a/graphify/skills/kiro/references/query.md +++ b/graphify/skills/kiro/references/query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/graphify/skills/kiro/references/update.md b/graphify/skills/kiro/references/update.md index 3632fd4126..bd8e659d3c 100644 --- a/graphify/skills/kiro/references/update.md +++ b/graphify/skills/kiro/references/update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/graphify/skills/opencode/references/query.md b/graphify/skills/opencode/references/query.md index 56565eb782..6dd627863c 100644 --- a/graphify/skills/opencode/references/query.md +++ b/graphify/skills/opencode/references/query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/graphify/skills/opencode/references/update.md b/graphify/skills/opencode/references/update.md index 3632fd4126..bd8e659d3c 100644 --- a/graphify/skills/opencode/references/update.md +++ b/graphify/skills/opencode/references/update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/graphify/skills/pi/references/query.md b/graphify/skills/pi/references/query.md index 56565eb782..6dd627863c 100644 --- a/graphify/skills/pi/references/query.md +++ b/graphify/skills/pi/references/query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/graphify/skills/pi/references/update.md b/graphify/skills/pi/references/update.md index 3632fd4126..bd8e659d3c 100644 --- a/graphify/skills/pi/references/update.md +++ b/graphify/skills/pi/references/update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/graphify/skills/trae/references/query.md b/graphify/skills/trae/references/query.md index 56565eb782..6dd627863c 100644 --- a/graphify/skills/trae/references/query.md +++ b/graphify/skills/trae/references/query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/graphify/skills/trae/references/update.md b/graphify/skills/trae/references/update.md index 3632fd4126..bd8e659d3c 100644 --- a/graphify/skills/trae/references/update.md +++ b/graphify/skills/trae/references/update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/graphify/skills/vscode/references/query.md b/graphify/skills/vscode/references/query.md index 56565eb782..6dd627863c 100644 --- a/graphify/skills/vscode/references/query.md +++ b/graphify/skills/vscode/references/query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/graphify/skills/vscode/references/update.md b/graphify/skills/vscode/references/update.md index 3632fd4126..bd8e659d3c 100644 --- a/graphify/skills/vscode/references/update.md +++ b/graphify/skills/vscode/references/update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/graphify/skills/windows/references/query.md b/graphify/skills/windows/references/query.md index 56565eb782..6dd627863c 100644 --- a/graphify/skills/windows/references/query.md +++ b/graphify/skills/windows/references/query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/graphify/skills/windows/references/update.md b/graphify/skills/windows/references/update.md index 3632fd4126..bd8e659d3c 100644 --- a/graphify/skills/windows/references/update.md +++ b/graphify/skills/windows/references/update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/tests/test_skillgen.py b/tests/test_skillgen.py index 6124f54a9c..c51a67b352 100644 --- a/tests/test_skillgen.py +++ b/tests/test_skillgen.py @@ -94,6 +94,14 @@ def test_rendered_instructions_preserve_scan_root_and_runnable_commands(): if line.startswith('{"nodes":'): json.loads(line) + direct_loaders = [ + artifact.path + for artifact in artifacts + if "json_graph.node_link_graph(" in artifact.content + ] + assert direct_loaders == [] + assert any("load_node_link_graph(" in artifact.content for artifact in artifacts) + exports = [ artifact for artifact in artifacts diff --git a/tools/skillgen/expected/graphify__skill-aider.md b/tools/skillgen/expected/graphify__skill-aider.md index e2c3fd11a2..685d6def7f 100644 --- a/tools/skillgen/expected/graphify__skill-aider.md +++ b/tools/skillgen/expected/graphify__skill-aider.md @@ -822,13 +822,13 @@ $(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path # Load existing graph existing_data = json.loads(Path('graphify-out/graph.json').read_text()) -G_existing = json_graph.node_link_graph(existing_data, edges='links') +G_existing = load_node_link_graph(existing_data) # Load new extraction new_extraction = json.loads(Path('.graphify_extract.json').read_text()) @@ -849,7 +849,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -859,7 +859,7 @@ new_extract = json.loads(Path('.graphify_extract.json').read_text()) G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: @@ -885,12 +885,12 @@ from graphify.cluster import cluster, score_all from graphify.analyze import god_nodes, surprising_connections from graphify.report import generate from graphify.export import to_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text()) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) detection = {'total_files': 0, 'total_words': 99999, 'needs_graph': True, 'warning': None, 'files': {'code': [], 'document': [], 'paper': []}} @@ -954,12 +954,12 @@ Load `graphify-out/graph.json`, then: ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text()) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -1069,11 +1069,11 @@ If it fails, stop and tell the user to run `/graphify ` first. $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text()) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -1142,11 +1142,11 @@ If it fails, stop and tell the user to run `/graphify ` first. $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text()) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/tools/skillgen/expected/graphify__skill-devin.md b/tools/skillgen/expected/graphify__skill-devin.md index b9e7a0ee3d..ea6a4054cb 100644 --- a/tools/skillgen/expected/graphify__skill-devin.md +++ b/tools/skillgen/expected/graphify__skill-devin.md @@ -959,13 +959,13 @@ $(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path # Load existing graph existing_data = json.loads(Path('graphify-out/graph.json').read_text()) -G_existing = json_graph.node_link_graph(existing_data, edges='links') +G_existing = load_node_link_graph(existing_data) # Load new extraction new_extraction = json.loads(Path('graphify-out/.graphify_extract.json').read_text()) @@ -986,7 +986,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -995,7 +995,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text() G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: @@ -1021,12 +1021,12 @@ from graphify.cluster import cluster, score_all from graphify.analyze import god_nodes, surprising_connections from graphify.report import generate from graphify.export import to_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text()) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) detection = {'total_files': 0, 'total_words': 99999, 'needs_graph': True, 'warning': None, 'files': {'code': [], 'document': [], 'paper': []}} @@ -1090,12 +1090,12 @@ Load `graphify-out/graph.json`, then: ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text()) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -1202,11 +1202,11 @@ if not Path('graphify-out/graph.json').exists(): $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text()) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -1274,11 +1274,11 @@ if not Path('graphify-out/graph.json').exists(): $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text()) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/tools/skillgen/expected/graphify__skills__agents__references__query.md b/tools/skillgen/expected/graphify__skills__agents__references__query.md index 56565eb782..6dd627863c 100644 --- a/tools/skillgen/expected/graphify__skills__agents__references__query.md +++ b/tools/skillgen/expected/graphify__skills__agents__references__query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/tools/skillgen/expected/graphify__skills__agents__references__update.md b/tools/skillgen/expected/graphify__skills__agents__references__update.md index 3632fd4126..bd8e659d3c 100644 --- a/tools/skillgen/expected/graphify__skills__agents__references__update.md +++ b/tools/skillgen/expected/graphify__skills__agents__references__update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/tools/skillgen/expected/graphify__skills__amp__references__query.md b/tools/skillgen/expected/graphify__skills__amp__references__query.md index 56565eb782..6dd627863c 100644 --- a/tools/skillgen/expected/graphify__skills__amp__references__query.md +++ b/tools/skillgen/expected/graphify__skills__amp__references__query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/tools/skillgen/expected/graphify__skills__amp__references__update.md b/tools/skillgen/expected/graphify__skills__amp__references__update.md index 3632fd4126..bd8e659d3c 100644 --- a/tools/skillgen/expected/graphify__skills__amp__references__update.md +++ b/tools/skillgen/expected/graphify__skills__amp__references__update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/tools/skillgen/expected/graphify__skills__claude__references__query.md b/tools/skillgen/expected/graphify__skills__claude__references__query.md index 56565eb782..6dd627863c 100644 --- a/tools/skillgen/expected/graphify__skills__claude__references__query.md +++ b/tools/skillgen/expected/graphify__skills__claude__references__query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/tools/skillgen/expected/graphify__skills__claude__references__update.md b/tools/skillgen/expected/graphify__skills__claude__references__update.md index 3632fd4126..bd8e659d3c 100644 --- a/tools/skillgen/expected/graphify__skills__claude__references__update.md +++ b/tools/skillgen/expected/graphify__skills__claude__references__update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/tools/skillgen/expected/graphify__skills__claw__references__query.md b/tools/skillgen/expected/graphify__skills__claw__references__query.md index 56565eb782..6dd627863c 100644 --- a/tools/skillgen/expected/graphify__skills__claw__references__query.md +++ b/tools/skillgen/expected/graphify__skills__claw__references__query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/tools/skillgen/expected/graphify__skills__claw__references__update.md b/tools/skillgen/expected/graphify__skills__claw__references__update.md index 3632fd4126..bd8e659d3c 100644 --- a/tools/skillgen/expected/graphify__skills__claw__references__update.md +++ b/tools/skillgen/expected/graphify__skills__claw__references__update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/tools/skillgen/expected/graphify__skills__codex__references__query.md b/tools/skillgen/expected/graphify__skills__codex__references__query.md index 56565eb782..6dd627863c 100644 --- a/tools/skillgen/expected/graphify__skills__codex__references__query.md +++ b/tools/skillgen/expected/graphify__skills__codex__references__query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/tools/skillgen/expected/graphify__skills__codex__references__update.md b/tools/skillgen/expected/graphify__skills__codex__references__update.md index 3632fd4126..bd8e659d3c 100644 --- a/tools/skillgen/expected/graphify__skills__codex__references__update.md +++ b/tools/skillgen/expected/graphify__skills__codex__references__update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/tools/skillgen/expected/graphify__skills__copilot__references__query.md b/tools/skillgen/expected/graphify__skills__copilot__references__query.md index 56565eb782..6dd627863c 100644 --- a/tools/skillgen/expected/graphify__skills__copilot__references__query.md +++ b/tools/skillgen/expected/graphify__skills__copilot__references__query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/tools/skillgen/expected/graphify__skills__copilot__references__update.md b/tools/skillgen/expected/graphify__skills__copilot__references__update.md index 3632fd4126..bd8e659d3c 100644 --- a/tools/skillgen/expected/graphify__skills__copilot__references__update.md +++ b/tools/skillgen/expected/graphify__skills__copilot__references__update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/tools/skillgen/expected/graphify__skills__droid__references__query.md b/tools/skillgen/expected/graphify__skills__droid__references__query.md index 56565eb782..6dd627863c 100644 --- a/tools/skillgen/expected/graphify__skills__droid__references__query.md +++ b/tools/skillgen/expected/graphify__skills__droid__references__query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/tools/skillgen/expected/graphify__skills__droid__references__update.md b/tools/skillgen/expected/graphify__skills__droid__references__update.md index 3632fd4126..bd8e659d3c 100644 --- a/tools/skillgen/expected/graphify__skills__droid__references__update.md +++ b/tools/skillgen/expected/graphify__skills__droid__references__update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/tools/skillgen/expected/graphify__skills__kilo__references__query.md b/tools/skillgen/expected/graphify__skills__kilo__references__query.md index 56565eb782..6dd627863c 100644 --- a/tools/skillgen/expected/graphify__skills__kilo__references__query.md +++ b/tools/skillgen/expected/graphify__skills__kilo__references__query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/tools/skillgen/expected/graphify__skills__kilo__references__update.md b/tools/skillgen/expected/graphify__skills__kilo__references__update.md index 3632fd4126..bd8e659d3c 100644 --- a/tools/skillgen/expected/graphify__skills__kilo__references__update.md +++ b/tools/skillgen/expected/graphify__skills__kilo__references__update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/tools/skillgen/expected/graphify__skills__kiro__references__query.md b/tools/skillgen/expected/graphify__skills__kiro__references__query.md index 56565eb782..6dd627863c 100644 --- a/tools/skillgen/expected/graphify__skills__kiro__references__query.md +++ b/tools/skillgen/expected/graphify__skills__kiro__references__query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/tools/skillgen/expected/graphify__skills__kiro__references__update.md b/tools/skillgen/expected/graphify__skills__kiro__references__update.md index 3632fd4126..bd8e659d3c 100644 --- a/tools/skillgen/expected/graphify__skills__kiro__references__update.md +++ b/tools/skillgen/expected/graphify__skills__kiro__references__update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/tools/skillgen/expected/graphify__skills__opencode__references__query.md b/tools/skillgen/expected/graphify__skills__opencode__references__query.md index 56565eb782..6dd627863c 100644 --- a/tools/skillgen/expected/graphify__skills__opencode__references__query.md +++ b/tools/skillgen/expected/graphify__skills__opencode__references__query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/tools/skillgen/expected/graphify__skills__opencode__references__update.md b/tools/skillgen/expected/graphify__skills__opencode__references__update.md index 3632fd4126..bd8e659d3c 100644 --- a/tools/skillgen/expected/graphify__skills__opencode__references__update.md +++ b/tools/skillgen/expected/graphify__skills__opencode__references__update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/tools/skillgen/expected/graphify__skills__pi__references__query.md b/tools/skillgen/expected/graphify__skills__pi__references__query.md index 56565eb782..6dd627863c 100644 --- a/tools/skillgen/expected/graphify__skills__pi__references__query.md +++ b/tools/skillgen/expected/graphify__skills__pi__references__query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/tools/skillgen/expected/graphify__skills__pi__references__update.md b/tools/skillgen/expected/graphify__skills__pi__references__update.md index 3632fd4126..bd8e659d3c 100644 --- a/tools/skillgen/expected/graphify__skills__pi__references__update.md +++ b/tools/skillgen/expected/graphify__skills__pi__references__update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/tools/skillgen/expected/graphify__skills__trae__references__query.md b/tools/skillgen/expected/graphify__skills__trae__references__query.md index 56565eb782..6dd627863c 100644 --- a/tools/skillgen/expected/graphify__skills__trae__references__query.md +++ b/tools/skillgen/expected/graphify__skills__trae__references__query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/tools/skillgen/expected/graphify__skills__trae__references__update.md b/tools/skillgen/expected/graphify__skills__trae__references__update.md index 3632fd4126..bd8e659d3c 100644 --- a/tools/skillgen/expected/graphify__skills__trae__references__update.md +++ b/tools/skillgen/expected/graphify__skills__trae__references__update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/tools/skillgen/expected/graphify__skills__vscode__references__query.md b/tools/skillgen/expected/graphify__skills__vscode__references__query.md index 56565eb782..6dd627863c 100644 --- a/tools/skillgen/expected/graphify__skills__vscode__references__query.md +++ b/tools/skillgen/expected/graphify__skills__vscode__references__query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/tools/skillgen/expected/graphify__skills__vscode__references__update.md b/tools/skillgen/expected/graphify__skills__vscode__references__update.md index 3632fd4126..bd8e659d3c 100644 --- a/tools/skillgen/expected/graphify__skills__vscode__references__update.md +++ b/tools/skillgen/expected/graphify__skills__vscode__references__update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/tools/skillgen/expected/graphify__skills__windows__references__query.md b/tools/skillgen/expected/graphify__skills__windows__references__query.md index 56565eb782..6dd627863c 100644 --- a/tools/skillgen/expected/graphify__skills__windows__references__query.md +++ b/tools/skillgen/expected/graphify__skills__windows__references__query.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/tools/skillgen/expected/graphify__skills__windows__references__update.md b/tools/skillgen/expected/graphify__skills__windows__references__update.md index 3632fd4126..bd8e659d3c 100644 --- a/tools/skillgen/expected/graphify__skills__windows__references__update.md +++ b/tools/skillgen/expected/graphify__skills__windows__references__update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/tools/skillgen/fragments/core/aider.md b/tools/skillgen/fragments/core/aider.md index e2c3fd11a2..685d6def7f 100644 --- a/tools/skillgen/fragments/core/aider.md +++ b/tools/skillgen/fragments/core/aider.md @@ -822,13 +822,13 @@ $(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path # Load existing graph existing_data = json.loads(Path('graphify-out/graph.json').read_text()) -G_existing = json_graph.node_link_graph(existing_data, edges='links') +G_existing = load_node_link_graph(existing_data) # Load new extraction new_extraction = json.loads(Path('.graphify_extract.json').read_text()) @@ -849,7 +849,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -859,7 +859,7 @@ new_extract = json.loads(Path('.graphify_extract.json').read_text()) G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: @@ -885,12 +885,12 @@ from graphify.cluster import cluster, score_all from graphify.analyze import god_nodes, surprising_connections from graphify.report import generate from graphify.export import to_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text()) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) detection = {'total_files': 0, 'total_words': 99999, 'needs_graph': True, 'warning': None, 'files': {'code': [], 'document': [], 'paper': []}} @@ -954,12 +954,12 @@ Load `graphify-out/graph.json`, then: ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text()) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -1069,11 +1069,11 @@ If it fails, stop and tell the user to run `/graphify ` first. $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text()) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -1142,11 +1142,11 @@ If it fails, stop and tell the user to run `/graphify ` first. $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text()) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/tools/skillgen/fragments/core/devin.md b/tools/skillgen/fragments/core/devin.md index b9e7a0ee3d..ea6a4054cb 100644 --- a/tools/skillgen/fragments/core/devin.md +++ b/tools/skillgen/fragments/core/devin.md @@ -959,13 +959,13 @@ $(cat graphify-out/.graphify_python) -c " import sys, json from graphify.build import build_from_json from graphify.export import to_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path # Load existing graph existing_data = json.loads(Path('graphify-out/graph.json').read_text()) -G_existing = json_graph.node_link_graph(existing_data, edges='links') +G_existing = load_node_link_graph(existing_data) # Load new extraction new_extraction = json.loads(Path('graphify-out/.graphify_extract.json').read_text()) @@ -986,7 +986,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -995,7 +995,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text() G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: @@ -1021,12 +1021,12 @@ from graphify.cluster import cluster, score_all from graphify.analyze import god_nodes, surprising_connections from graphify.report import generate from graphify.export import to_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text()) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) detection = {'total_files': 0, 'total_words': 99999, 'needs_graph': True, 'warning': None, 'files': {'code': [], 'document': [], 'paper': []}} @@ -1090,12 +1090,12 @@ Load `graphify-out/graph.json`, then: ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text()) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -1202,11 +1202,11 @@ if not Path('graphify-out/graph.json').exists(): $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text()) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -1274,11 +1274,11 @@ if not Path('graphify-out/graph.json').exists(): $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text()) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/tools/skillgen/fragments/references/query/default.md b/tools/skillgen/fragments/references/query/default.md index 56565eb782..6dd627863c 100644 --- a/tools/skillgen/fragments/references/query/default.md +++ b/tools/skillgen/fragments/references/query/default.md @@ -79,12 +79,12 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal ```bash $(cat graphify-out/.graphify_python) -c " import sys, json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) question = 'QUESTION' mode = 'MODE' # 'bfs' or 'dfs' @@ -197,11 +197,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) a_term = 'NODE_A' b_term = 'NODE_B' @@ -265,11 +265,11 @@ If the CLI is unavailable, run it inline: $(cat graphify-out/.graphify_python) -c " import json, sys import networkx as nx -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph from pathlib import Path data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8')) -G = json_graph.node_link_graph(data, edges='links') +G = load_node_link_graph(data) term = 'NODE_NAME' term_lower = term.lower() diff --git a/tools/skillgen/fragments/references/shared/update.md b/tools/skillgen/fragments/references/shared/update.md index 3632fd4126..bd8e659d3c 100644 --- a/tools/skillgen/fragments/references/shared/update.md +++ b/tools/skillgen/fragments/references/shared/update.md @@ -174,7 +174,7 @@ $(cat graphify-out/.graphify_python) -c " import json from graphify.analyze import graph_diff from graphify.build import build_from_json -from networkx.readwrite import json_graph +from graphify.paths import load_node_link_graph import networkx as nx from pathlib import Path @@ -184,7 +184,7 @@ new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(e G_new = build_from_json(new_extract, directed=IS_DIRECTED) if old_data: - G_old = json_graph.node_link_graph(old_data, edges='links') + G_old = load_node_link_graph(old_data) diff = graph_diff(G_old, G_new) print(diff['summary']) if diff['new_nodes']: diff --git a/tools/skillgen/gen.py b/tools/skillgen/gen.py index f6356459d8..1038a2fd83 100644 --- a/tools/skillgen/gen.py +++ b/tools/skillgen/gen.py @@ -1147,6 +1147,20 @@ def _is_needs_update_cleanup_fix_line(line: str) -> bool: return "rm -f graphify-out/" in line and "needs_update" in line +def _is_graph_loader_fix_line(line: str) -> bool: + """Whether a monolith delegates graph.json compatibility to the shared loader.""" + return line.strip() in { + "from networkx.readwrite import json_graph", + "from graphify.paths import load_node_link_graph", + "G_existing = json_graph.node_link_graph(existing_data, edges='links')", + "G_existing = load_node_link_graph(existing_data)", + "G_old = json_graph.node_link_graph(old_data, edges='links')", + "G_old = load_node_link_graph(old_data)", + "G = json_graph.node_link_graph(data, edges='links')", + "G = load_node_link_graph(data)", + } + + # Every line that may differ between a rendered monolith and its pristine v8 # baseline. Each predicate documents one sanctioned change-class; a blank line is # allowed because the multi-line fix blocks insert spacing. Anything else failing @@ -1169,6 +1183,7 @@ def _is_needs_update_cleanup_fix_line(line: str) -> bool: _is_semantic_cache_scope_fix_line, _is_community_label_export_fix_line, _is_needs_update_cleanup_fix_line, + _is_graph_loader_fix_line, )