diff --git a/graphify/skill-agents.md b/graphify/skill-agents.md index 6ea0ca84cb..846a316445 100644 --- a/graphify/skill-agents.md +++ b/graphify/skill-agents.md @@ -508,8 +508,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -517,6 +515,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/graphify/skill-aider.md b/graphify/skill-aider.md index d0c308b8f7..e2c3fd11a2 100644 --- a/graphify/skill-aider.md +++ b/graphify/skill-aider.md @@ -477,14 +477,15 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report) -Path('.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()})) # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labels) if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (fewer nodes than the existing graph). Run a full rebuild to be safe.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report) +Path('.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()})) print('Report updated with community labels') " ``` diff --git a/graphify/skill-amp.md b/graphify/skill-amp.md index 6ea0ca84cb..846a316445 100644 --- a/graphify/skill-amp.md +++ b/graphify/skill-amp.md @@ -508,8 +508,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -517,6 +515,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/graphify/skill-claw.md b/graphify/skill-claw.md index 7bb1275562..56c5c75fc2 100644 --- a/graphify/skill-claw.md +++ b/graphify/skill-claw.md @@ -511,8 +511,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -520,6 +518,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/graphify/skill-codex.md b/graphify/skill-codex.md index 2aae1ca5d5..4b23633542 100644 --- a/graphify/skill-codex.md +++ b/graphify/skill-codex.md @@ -508,8 +508,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -517,6 +515,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/graphify/skill-copilot.md b/graphify/skill-copilot.md index 7bb1275562..56c5c75fc2 100644 --- a/graphify/skill-copilot.md +++ b/graphify/skill-copilot.md @@ -511,8 +511,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -520,6 +518,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/graphify/skill-devin.md b/graphify/skill-devin.md index 5d720b633f..b9e7a0ee3d 100644 --- a/graphify/skill-devin.md +++ b/graphify/skill-devin.md @@ -542,14 +542,15 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report) -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()})) # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labels) if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (fewer nodes than the existing graph). Run a full rebuild to be safe.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report) +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()})) print('Report updated with community labels') " ``` diff --git a/graphify/skill-droid.md b/graphify/skill-droid.md index 0256942466..f32aac733d 100644 --- a/graphify/skill-droid.md +++ b/graphify/skill-droid.md @@ -508,8 +508,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -517,6 +515,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/graphify/skill-kilo.md b/graphify/skill-kilo.md index 2167b387a8..402fc962e7 100644 --- a/graphify/skill-kilo.md +++ b/graphify/skill-kilo.md @@ -511,8 +511,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -520,6 +518,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/graphify/skill-kiro.md b/graphify/skill-kiro.md index 7bb1275562..56c5c75fc2 100644 --- a/graphify/skill-kiro.md +++ b/graphify/skill-kiro.md @@ -511,8 +511,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -520,6 +518,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/graphify/skill-opencode.md b/graphify/skill-opencode.md index 8a4d352345..f8e24e6272 100644 --- a/graphify/skill-opencode.md +++ b/graphify/skill-opencode.md @@ -503,8 +503,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -512,6 +510,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/graphify/skill-pi.md b/graphify/skill-pi.md index 7bb1275562..56c5c75fc2 100644 --- a/graphify/skill-pi.md +++ b/graphify/skill-pi.md @@ -511,8 +511,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -520,6 +518,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/graphify/skill-trae.md b/graphify/skill-trae.md index fafe80841a..55f8c2caca 100644 --- a/graphify/skill-trae.md +++ b/graphify/skill-trae.md @@ -509,8 +509,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -518,6 +516,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/graphify/skill-vscode.md b/graphify/skill-vscode.md index 83b415079a..9151a264b2 100644 --- a/graphify/skill-vscode.md +++ b/graphify/skill-vscode.md @@ -507,8 +507,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -516,6 +514,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/graphify/skill-windows.md b/graphify/skill-windows.md index 461da113ad..81dc1b133c 100644 --- a/graphify/skill-windows.md +++ b/graphify/skill-windows.md @@ -538,8 +538,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding="utf-8") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding="utf-8") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -547,6 +545,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding="utf-8") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding="utf-8") print('Report updated with community labels') '@ | & (Get-Content graphify-out\.graphify_python) - ``` diff --git a/graphify/skill.md b/graphify/skill.md index 7bb1275562..56c5c75fc2 100644 --- a/graphify/skill.md +++ b/graphify/skill.md @@ -511,8 +511,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -520,6 +518,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/graphify/skills/agents/references/exports.md b/graphify/skills/agents/references/exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/graphify/skills/agents/references/exports.md +++ b/graphify/skills/agents/references/exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/graphify/skills/amp/references/exports.md b/graphify/skills/amp/references/exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/graphify/skills/amp/references/exports.md +++ b/graphify/skills/amp/references/exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/graphify/skills/claude/references/exports.md b/graphify/skills/claude/references/exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/graphify/skills/claude/references/exports.md +++ b/graphify/skills/claude/references/exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/graphify/skills/claw/references/exports.md b/graphify/skills/claw/references/exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/graphify/skills/claw/references/exports.md +++ b/graphify/skills/claw/references/exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/graphify/skills/codex/references/exports.md b/graphify/skills/codex/references/exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/graphify/skills/codex/references/exports.md +++ b/graphify/skills/codex/references/exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/graphify/skills/copilot/references/exports.md b/graphify/skills/copilot/references/exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/graphify/skills/copilot/references/exports.md +++ b/graphify/skills/copilot/references/exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/graphify/skills/droid/references/exports.md b/graphify/skills/droid/references/exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/graphify/skills/droid/references/exports.md +++ b/graphify/skills/droid/references/exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/graphify/skills/kilo/references/exports.md b/graphify/skills/kilo/references/exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/graphify/skills/kilo/references/exports.md +++ b/graphify/skills/kilo/references/exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/graphify/skills/kiro/references/exports.md b/graphify/skills/kiro/references/exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/graphify/skills/kiro/references/exports.md +++ b/graphify/skills/kiro/references/exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/graphify/skills/opencode/references/exports.md b/graphify/skills/opencode/references/exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/graphify/skills/opencode/references/exports.md +++ b/graphify/skills/opencode/references/exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/graphify/skills/pi/references/exports.md b/graphify/skills/pi/references/exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/graphify/skills/pi/references/exports.md +++ b/graphify/skills/pi/references/exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/graphify/skills/trae/references/exports.md b/graphify/skills/trae/references/exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/graphify/skills/trae/references/exports.md +++ b/graphify/skills/trae/references/exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/graphify/skills/vscode/references/exports.md b/graphify/skills/vscode/references/exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/graphify/skills/vscode/references/exports.md +++ b/graphify/skills/vscode/references/exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/graphify/skills/windows/references/exports.md b/graphify/skills/windows/references/exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/graphify/skills/windows/references/exports.md +++ b/graphify/skills/windows/references/exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/tests/test_skillgen.py b/tests/test_skillgen.py index b8925811cf..6124f54a9c 100644 --- a/tests/test_skillgen.py +++ b/tests/test_skillgen.py @@ -94,6 +94,32 @@ def test_rendered_instructions_preserve_scan_root_and_runnable_commands(): if line.startswith('{"nodes":'): json.loads(line) + exports = [ + artifact + for artifact in artifacts + if artifact.path.endswith("/references/exports.md") + ] + assert exports + for artifact in exports: + assert "getpass.getpass" in artifact.content, artifact.path + assert 'Read-Host "Neo4j password" -AsSecureString' in artifact.content, artifact.path + assert "Do not run these blocks through an agent tool" in artifact.content, artifact.path + + labeling_cores = [ + artifact + for artifact in artifacts + if "# Re-export so graph.json nodes carry the curated community_name" in artifact.content + ] + assert labeling_cores + for artifact in labeling_cores: + step_five = artifact.content.split("### Step 5", 1)[1].split("### Step 6", 1)[0] + write_graph = step_five.index("wrote = to_json(") + shrink_guard = step_five.index("if not wrote:") + abort = step_five.index("raise SystemExit(1)", shrink_guard) + write_report = step_five.index("GRAPH_REPORT.md") + write_labels = step_five.index("graphify_labels.json") + assert write_graph < shrink_guard < abort < write_report < write_labels, artifact.path + add_watch = [ artifact for artifact in artifacts diff --git a/tools/skillgen/expected/graphify__skill-agents.md b/tools/skillgen/expected/graphify__skill-agents.md index 6ea0ca84cb..846a316445 100644 --- a/tools/skillgen/expected/graphify__skill-agents.md +++ b/tools/skillgen/expected/graphify__skill-agents.md @@ -508,8 +508,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -517,6 +515,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/tools/skillgen/expected/graphify__skill-aider.md b/tools/skillgen/expected/graphify__skill-aider.md index d0c308b8f7..e2c3fd11a2 100644 --- a/tools/skillgen/expected/graphify__skill-aider.md +++ b/tools/skillgen/expected/graphify__skill-aider.md @@ -477,14 +477,15 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report) -Path('.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()})) # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labels) if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (fewer nodes than the existing graph). Run a full rebuild to be safe.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report) +Path('.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()})) print('Report updated with community labels') " ``` diff --git a/tools/skillgen/expected/graphify__skill-amp.md b/tools/skillgen/expected/graphify__skill-amp.md index 6ea0ca84cb..846a316445 100644 --- a/tools/skillgen/expected/graphify__skill-amp.md +++ b/tools/skillgen/expected/graphify__skill-amp.md @@ -508,8 +508,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -517,6 +515,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/tools/skillgen/expected/graphify__skill-claw.md b/tools/skillgen/expected/graphify__skill-claw.md index 7bb1275562..56c5c75fc2 100644 --- a/tools/skillgen/expected/graphify__skill-claw.md +++ b/tools/skillgen/expected/graphify__skill-claw.md @@ -511,8 +511,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -520,6 +518,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/tools/skillgen/expected/graphify__skill-codex.md b/tools/skillgen/expected/graphify__skill-codex.md index 2aae1ca5d5..4b23633542 100644 --- a/tools/skillgen/expected/graphify__skill-codex.md +++ b/tools/skillgen/expected/graphify__skill-codex.md @@ -508,8 +508,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -517,6 +515,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/tools/skillgen/expected/graphify__skill-copilot.md b/tools/skillgen/expected/graphify__skill-copilot.md index 7bb1275562..56c5c75fc2 100644 --- a/tools/skillgen/expected/graphify__skill-copilot.md +++ b/tools/skillgen/expected/graphify__skill-copilot.md @@ -511,8 +511,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -520,6 +518,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/tools/skillgen/expected/graphify__skill-devin.md b/tools/skillgen/expected/graphify__skill-devin.md index 5d720b633f..b9e7a0ee3d 100644 --- a/tools/skillgen/expected/graphify__skill-devin.md +++ b/tools/skillgen/expected/graphify__skill-devin.md @@ -542,14 +542,15 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report) -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()})) # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labels) if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (fewer nodes than the existing graph). Run a full rebuild to be safe.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report) +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()})) print('Report updated with community labels') " ``` diff --git a/tools/skillgen/expected/graphify__skill-droid.md b/tools/skillgen/expected/graphify__skill-droid.md index 0256942466..f32aac733d 100644 --- a/tools/skillgen/expected/graphify__skill-droid.md +++ b/tools/skillgen/expected/graphify__skill-droid.md @@ -508,8 +508,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -517,6 +515,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/tools/skillgen/expected/graphify__skill-kilo.md b/tools/skillgen/expected/graphify__skill-kilo.md index 2167b387a8..402fc962e7 100644 --- a/tools/skillgen/expected/graphify__skill-kilo.md +++ b/tools/skillgen/expected/graphify__skill-kilo.md @@ -511,8 +511,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -520,6 +518,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/tools/skillgen/expected/graphify__skill-kiro.md b/tools/skillgen/expected/graphify__skill-kiro.md index 7bb1275562..56c5c75fc2 100644 --- a/tools/skillgen/expected/graphify__skill-kiro.md +++ b/tools/skillgen/expected/graphify__skill-kiro.md @@ -511,8 +511,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -520,6 +518,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/tools/skillgen/expected/graphify__skill-opencode.md b/tools/skillgen/expected/graphify__skill-opencode.md index 8a4d352345..f8e24e6272 100644 --- a/tools/skillgen/expected/graphify__skill-opencode.md +++ b/tools/skillgen/expected/graphify__skill-opencode.md @@ -503,8 +503,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -512,6 +510,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/tools/skillgen/expected/graphify__skill-pi.md b/tools/skillgen/expected/graphify__skill-pi.md index 7bb1275562..56c5c75fc2 100644 --- a/tools/skillgen/expected/graphify__skill-pi.md +++ b/tools/skillgen/expected/graphify__skill-pi.md @@ -511,8 +511,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -520,6 +518,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/tools/skillgen/expected/graphify__skill-trae.md b/tools/skillgen/expected/graphify__skill-trae.md index fafe80841a..55f8c2caca 100644 --- a/tools/skillgen/expected/graphify__skill-trae.md +++ b/tools/skillgen/expected/graphify__skill-trae.md @@ -509,8 +509,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -518,6 +516,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/tools/skillgen/expected/graphify__skill-vscode.md b/tools/skillgen/expected/graphify__skill-vscode.md index 83b415079a..9151a264b2 100644 --- a/tools/skillgen/expected/graphify__skill-vscode.md +++ b/tools/skillgen/expected/graphify__skill-vscode.md @@ -507,8 +507,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -516,6 +514,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/tools/skillgen/expected/graphify__skill-windows.md b/tools/skillgen/expected/graphify__skill-windows.md index 461da113ad..81dc1b133c 100644 --- a/tools/skillgen/expected/graphify__skill-windows.md +++ b/tools/skillgen/expected/graphify__skill-windows.md @@ -538,8 +538,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding="utf-8") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding="utf-8") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -547,6 +545,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding="utf-8") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding="utf-8") print('Report updated with community labels') '@ | & (Get-Content graphify-out\.graphify_python) - ``` diff --git a/tools/skillgen/expected/graphify__skill.md b/tools/skillgen/expected/graphify__skill.md index 7bb1275562..56c5c75fc2 100644 --- a/tools/skillgen/expected/graphify__skill.md +++ b/tools/skillgen/expected/graphify__skill.md @@ -511,8 +511,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -520,6 +518,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/tools/skillgen/expected/graphify__skills__agents__references__exports.md b/tools/skillgen/expected/graphify__skills__agents__references__exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/tools/skillgen/expected/graphify__skills__agents__references__exports.md +++ b/tools/skillgen/expected/graphify__skills__agents__references__exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/tools/skillgen/expected/graphify__skills__amp__references__exports.md b/tools/skillgen/expected/graphify__skills__amp__references__exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/tools/skillgen/expected/graphify__skills__amp__references__exports.md +++ b/tools/skillgen/expected/graphify__skills__amp__references__exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/tools/skillgen/expected/graphify__skills__claude__references__exports.md b/tools/skillgen/expected/graphify__skills__claude__references__exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/tools/skillgen/expected/graphify__skills__claude__references__exports.md +++ b/tools/skillgen/expected/graphify__skills__claude__references__exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/tools/skillgen/expected/graphify__skills__claw__references__exports.md b/tools/skillgen/expected/graphify__skills__claw__references__exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/tools/skillgen/expected/graphify__skills__claw__references__exports.md +++ b/tools/skillgen/expected/graphify__skills__claw__references__exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/tools/skillgen/expected/graphify__skills__codex__references__exports.md b/tools/skillgen/expected/graphify__skills__codex__references__exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/tools/skillgen/expected/graphify__skills__codex__references__exports.md +++ b/tools/skillgen/expected/graphify__skills__codex__references__exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/tools/skillgen/expected/graphify__skills__copilot__references__exports.md b/tools/skillgen/expected/graphify__skills__copilot__references__exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/tools/skillgen/expected/graphify__skills__copilot__references__exports.md +++ b/tools/skillgen/expected/graphify__skills__copilot__references__exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/tools/skillgen/expected/graphify__skills__droid__references__exports.md b/tools/skillgen/expected/graphify__skills__droid__references__exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/tools/skillgen/expected/graphify__skills__droid__references__exports.md +++ b/tools/skillgen/expected/graphify__skills__droid__references__exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/tools/skillgen/expected/graphify__skills__kilo__references__exports.md b/tools/skillgen/expected/graphify__skills__kilo__references__exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/tools/skillgen/expected/graphify__skills__kilo__references__exports.md +++ b/tools/skillgen/expected/graphify__skills__kilo__references__exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/tools/skillgen/expected/graphify__skills__kiro__references__exports.md b/tools/skillgen/expected/graphify__skills__kiro__references__exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/tools/skillgen/expected/graphify__skills__kiro__references__exports.md +++ b/tools/skillgen/expected/graphify__skills__kiro__references__exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/tools/skillgen/expected/graphify__skills__opencode__references__exports.md b/tools/skillgen/expected/graphify__skills__opencode__references__exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/tools/skillgen/expected/graphify__skills__opencode__references__exports.md +++ b/tools/skillgen/expected/graphify__skills__opencode__references__exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/tools/skillgen/expected/graphify__skills__pi__references__exports.md b/tools/skillgen/expected/graphify__skills__pi__references__exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/tools/skillgen/expected/graphify__skills__pi__references__exports.md +++ b/tools/skillgen/expected/graphify__skills__pi__references__exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/tools/skillgen/expected/graphify__skills__trae__references__exports.md b/tools/skillgen/expected/graphify__skills__trae__references__exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/tools/skillgen/expected/graphify__skills__trae__references__exports.md +++ b/tools/skillgen/expected/graphify__skills__trae__references__exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/tools/skillgen/expected/graphify__skills__vscode__references__exports.md b/tools/skillgen/expected/graphify__skills__vscode__references__exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/tools/skillgen/expected/graphify__skills__vscode__references__exports.md +++ b/tools/skillgen/expected/graphify__skills__vscode__references__exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/tools/skillgen/expected/graphify__skills__windows__references__exports.md b/tools/skillgen/expected/graphify__skills__windows__references__exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/tools/skillgen/expected/graphify__skills__windows__references__exports.md +++ b/tools/skillgen/expected/graphify__skills__windows__references__exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates. diff --git a/tools/skillgen/fragments/core/aider.md b/tools/skillgen/fragments/core/aider.md index d0c308b8f7..e2c3fd11a2 100644 --- a/tools/skillgen/fragments/core/aider.md +++ b/tools/skillgen/fragments/core/aider.md @@ -477,14 +477,15 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report) -Path('.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()})) # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labels) if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (fewer nodes than the existing graph). Run a full rebuild to be safe.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report) +Path('.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()})) print('Report updated with community labels') " ``` diff --git a/tools/skillgen/fragments/core/core.md b/tools/skillgen/fragments/core/core.md index ba00821d85..437f156447 100644 --- a/tools/skillgen/fragments/core/core.md +++ b/tools/skillgen/fragments/core/core.md @@ -446,8 +446,6 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. @@ -455,6 +453,9 @@ wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labe if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (existing graph has more nodes; #479).') print('If this shrink is intentional (you deleted files), re-run a full build with --force.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding=\"utf-8\") +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding=\"utf-8\") print('Report updated with community labels') " ``` diff --git a/tools/skillgen/fragments/core/devin.md b/tools/skillgen/fragments/core/devin.md index 5d720b633f..b9e7a0ee3d 100644 --- a/tools/skillgen/fragments/core/devin.md +++ b/tools/skillgen/fragments/core/devin.md @@ -542,14 +542,15 @@ labels = LABELS_DICT questions = suggest_questions(G, communities, labels) report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions) -Path('graphify-out/GRAPH_REPORT.md').write_text(report) -Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()})) # Re-export so graph.json nodes carry the curated community_name (#2490). # Same extraction as Step 4, so the #479 shrink-guard passes on node count; # if it still refuses, surface the guard message - do not force past it. wrote = to_json(G, communities, 'graphify-out/graph.json', community_labels=labels) if not wrote: print('ERROR: refused to shrink graphify-out/graph.json (fewer nodes than the existing graph). Run a full rebuild to be safe.') + raise SystemExit(1) +Path('graphify-out/GRAPH_REPORT.md').write_text(report) +Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()})) print('Report updated with community labels') " ``` diff --git a/tools/skillgen/fragments/references/shared/exports.md b/tools/skillgen/fragments/references/shared/exports.md index 5d8e56cf84..89ce996fb7 100644 --- a/tools/skillgen/fragments/references/shared/exports.md +++ b/tools/skillgen/fragments/references/shared/exports.md @@ -20,10 +20,24 @@ graphify export wiki graphify export neo4j ``` -**If `--neo4j-push `** - push directly to a running Neo4j instance. Ask the user for credentials if not provided. Put the password in `NEO4J_PASSWORD` without exposing it in shell history or command arguments: +**If `--neo4j-push `** - push directly to a running Neo4j instance. Do not run these blocks through an agent tool: its shell is non-interactive and cannot read a hidden password. Show the block for the user's shell, ask them to run it in their own terminal, and wait for confirmation before continuing. Never ask them to paste the password into chat. + +POSIX shell: ```bash +NEO4J_PASSWORD="$("$(cat graphify-out/.graphify_python)" -c 'import getpass; print(getpass.getpass("Neo4j password: "))')" +export NEO4J_PASSWORD +graphify export neo4j --push bolt://localhost:7687 --user neo4j +unset NEO4J_PASSWORD +``` + +PowerShell: + +```powershell +$credential = Read-Host "Neo4j password" -AsSecureString +$env:NEO4J_PASSWORD = [System.Net.NetworkCredential]::new("", $credential).Password graphify export neo4j --push bolt://localhost:7687 --user neo4j +Remove-Item Env:NEO4J_PASSWORD ``` Default URI is `bolt://localhost:7687`, default user is `neo4j`. The command reads the password from `NEO4J_PASSWORD`. Uses MERGE - safe to re-run without creating duplicates.