Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions graphify/skills/agents/references/add-watch.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Load this when the user ran `/graphify add <url>` or passed `--watch`. Neither i
Fetch a URL and add it to the corpus, then update the graph.

```bash
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import sys
from graphify.ingest import ingest
from pathlib import Path
Expand Down Expand Up @@ -41,7 +41,7 @@ Supported URL types (auto-detected):
Start a background watcher that monitors a folder and auto-updates the graph when files change.

```bash
$(cat graphify-out/.graphify_python) -m graphify.watch INPUT_PATH --debounce 3
"$(cat graphify-out/.graphify_python)" -m graphify.watch INPUT_PATH --debounce 3
```

Replace INPUT_PATH with the folder to watch. Behavior depends on what changed:
Expand Down
2 changes: 1 addition & 1 deletion graphify/skills/agents/references/exports.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ graphify export graphml
### Step 7d - MCP server (only if --mcp flag)

```bash
$(cat graphify-out/.graphify_python) -m graphify.serve graphify-out/graph.json
"$(cat graphify-out/.graphify_python)" -m graphify.serve graphify-out/graph.json
```

This starts a stdio MCP server that exposes tools: `query_graph`, `get_node`, `get_neighbors`, `get_community`, `god_nodes`, `graph_stats`, `shortest_path`. Add to Claude Desktop or any MCP-compatible agent orchestrator so other agents can query the graph live.
Expand Down
22 changes: 11 additions & 11 deletions graphify/skills/agents/references/query.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Two traversal modes - choose based on the question:

First check the graph exists:
```bash
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
from pathlib import Path
if not Path('graphify-out/graph.json').exists():
print('ERROR: No graph found. Run /graphify <path> first to build the graph.')
Expand All @@ -28,7 +28,7 @@ Fix this **without inventing tokens** by expanding the query against the actual

1. Extract the token vocabulary from node labels:
```bash
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import json, re
from pathlib import Path
data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8'))
Expand Down Expand Up @@ -77,7 +77,7 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal
5. If the graph lacks enough information, say so - do not hallucinate edges.

```bash
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import sys, json
from networkx.readwrite import json_graph
import networkx as nx
Expand Down Expand Up @@ -168,10 +168,10 @@ Replace `QUESTION` with the **expanded** query string, `MODE` with `bfs` or `dfs
After writing the answer, save it back into the graph so it improves future queries. Include the expanded tokens inside the `--answer` text (e.g. `"Expanded from original query via vocab: [tokens]. Then traversed..."`) so the next `--update` extracts the expansion history as a graph node:

```bash
$(cat graphify-out/.graphify_python) -m graphify save-result --question "ORIGINAL_QUESTION" --answer "ANSWER" --type query --nodes NODE1 NODE2
"$(cat graphify-out/.graphify_python)" -m graphify save-result --question 'ORIGINAL_QUESTION' --answer 'ANSWER' --type query --nodes NODE1 NODE2
```

Replace `ORIGINAL_QUESTION` with the user's verbatim question, `ANSWER` with your full answer text (containing the expanded-token trace), `NODE1 NODE2` with the list of node labels you cited. This closes the feedback loop: the next `--update` will extract this Q&A as a node in the graph.
Replace `ORIGINAL_QUESTION` with the user's verbatim question, `ANSWER` with your full answer text (containing the expanded-token trace), `NODE1 NODE2` with the list of node labels you cited. The single quotes around the user-supplied values make the substitution injection-safe: a question like `hello"; rm -rf /` cannot escape the argument. If your content contains a literal single quote, replace it with `'\''` (close-quote, escaped-quote, open-quote). This closes the feedback loop: the next `--update` will extract this Q&A as a node in the graph.

**Work memory (self-improving loop).** Add an `--outcome` so future sessions learn from this one — append `--outcome useful|dead_end|corrected` to the `save-result` command (and `--correction "the right answer"` when correcting):

Expand All @@ -194,7 +194,7 @@ graphify path "NODE_A" "NODE_B"
If the CLI is unavailable, run it inline:

```bash
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import json, sys
import networkx as nx
from networkx.readwrite import json_graph
Expand Down Expand Up @@ -243,10 +243,10 @@ except nx.NodeNotFound as e:

Replace `NODE_A` and `NODE_B` with the actual concept names from the user. Then explain the path in plain language - what each hop means, why it's significant.

After writing the explanation, save it back:
After writing the explanation, save it back (single quotes around the user-supplied values keep the substitution injection-safe; replace any literal `'` in the substituted text with `'\''`):

```bash
$(cat graphify-out/.graphify_python) -m graphify save-result --question "Path from NODE_A to NODE_B" --answer "ANSWER" --type path_query --nodes NODE_A NODE_B
"$(cat graphify-out/.graphify_python)" -m graphify save-result --question 'Path from NODE_A to NODE_B' --answer 'ANSWER' --type path_query --nodes NODE_A NODE_B
```

---
Expand All @@ -262,7 +262,7 @@ graphify explain "NODE_NAME"
If the CLI is unavailable, run it inline:

```bash
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import json, sys
import networkx as nx
from networkx.readwrite import json_graph
Expand Down Expand Up @@ -304,8 +304,8 @@ for neighbor in G.neighbors(nid):

Replace `NODE_NAME` with the concept the user asked about. Then write a 3-5 sentence explanation of what this node is, what it connects to, and why those connections are significant. Use the source locations as citations.

After writing the explanation, save it back:
After writing the explanation, save it back (single quotes around the user-supplied values keep the substitution injection-safe; replace any literal `'` in the substituted text with `'\''`):

```bash
$(cat graphify-out/.graphify_python) -m graphify save-result --question "Explain NODE_NAME" --answer "ANSWER" --type explain --nodes NODE_NAME
"$(cat graphify-out/.graphify_python)" -m graphify save-result --question 'Explain NODE_NAME' --answer 'ANSWER' --type explain --nodes NODE_NAME
```
2 changes: 1 addition & 1 deletion graphify/skills/agents/references/transcribe.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Read the top god node labels from detect output or analysis, then compose a shor
```bash
export GRAPHIFY_WHISPER_MODEL=base # or whatever --whisper-model the user passed (must be exported)
export GRAPHIFY_WHISPER_PROMPT="<the one-sentence domain hint you composed in Step 1>"
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import json, os, sys
from pathlib import Path
from graphify.transcribe import transcribe_all
Expand Down
12 changes: 6 additions & 6 deletions graphify/skills/agents/references/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Load this only when the user passed `--update` or `--cluster-only`. A first-time
Use when you've added or modified files since the last run. Only re-extracts changed files - saves tokens and time.

```bash
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import sys, json
from graphify.detect import detect_incremental, save_manifest
from pathlib import Path
Expand All @@ -30,7 +30,7 @@ if new_total > 0:
Then populate `.graphify_detect.json` so Steps 3A–6 (which read it unconditionally) see the right state for an incremental run. `files` carries the changed subset (drives Step 3A AST + Step 3B0 cache check on only what changed); `all_files` carries the full corpus for any step that needs corpus-wide context:

```bash
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import json
from pathlib import Path
r = json.loads(Path('graphify-out/.graphify_incremental.json').read_text(encoding=\"utf-8\"))
Expand All @@ -48,7 +48,7 @@ Path('graphify-out/.graphify_detect.json').write_text(json.dumps({
If new files exist, first check whether all changed files are code files:

```bash
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import json
from pathlib import Path

Expand All @@ -71,7 +71,7 @@ If no new files exist (only deletions), create an empty extraction so the merge
```bash
if [ ! -f graphify-out/.graphify_extract.json ]; then
echo '[graphify update] Only deletions -- creating empty extraction for merge.'
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import json
from pathlib import Path
Path('graphify-out/.graphify_extract.json').write_text(json.dumps({'nodes':[],'edges':[],'hyperedges':[],'input_tokens':0,'output_tokens':0}), encoding='utf-8')
Expand All @@ -83,7 +83,7 @@ fi
Then:

```bash
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import json
from pathlib import Path
from graphify.build import build_merge
Expand Down Expand Up @@ -170,7 +170,7 @@ Then run Steps 4–8 on the merged graph as normal.
After Step 4, show the graph diff:

```bash
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import json
from graphify.analyze import graph_diff
from graphify.build import build_from_json
Expand Down
4 changes: 2 additions & 2 deletions graphify/skills/amp/references/add-watch.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Load this when the user ran `/graphify add <url>` or passed `--watch`. Neither i
Fetch a URL and add it to the corpus, then update the graph.

```bash
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import sys
from graphify.ingest import ingest
from pathlib import Path
Expand Down Expand Up @@ -41,7 +41,7 @@ Supported URL types (auto-detected):
Start a background watcher that monitors a folder and auto-updates the graph when files change.

```bash
$(cat graphify-out/.graphify_python) -m graphify.watch INPUT_PATH --debounce 3
"$(cat graphify-out/.graphify_python)" -m graphify.watch INPUT_PATH --debounce 3
```

Replace INPUT_PATH with the folder to watch. Behavior depends on what changed:
Expand Down
2 changes: 1 addition & 1 deletion graphify/skills/amp/references/exports.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ graphify export graphml
### Step 7d - MCP server (only if --mcp flag)

```bash
$(cat graphify-out/.graphify_python) -m graphify.serve graphify-out/graph.json
"$(cat graphify-out/.graphify_python)" -m graphify.serve graphify-out/graph.json
```

This starts a stdio MCP server that exposes tools: `query_graph`, `get_node`, `get_neighbors`, `get_community`, `god_nodes`, `graph_stats`, `shortest_path`. Add to Claude Desktop or any MCP-compatible agent orchestrator so other agents can query the graph live.
Expand Down
22 changes: 11 additions & 11 deletions graphify/skills/amp/references/query.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Two traversal modes - choose based on the question:

First check the graph exists:
```bash
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
from pathlib import Path
if not Path('graphify-out/graph.json').exists():
print('ERROR: No graph found. Run /graphify <path> first to build the graph.')
Expand All @@ -28,7 +28,7 @@ Fix this **without inventing tokens** by expanding the query against the actual

1. Extract the token vocabulary from node labels:
```bash
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import json, re
from pathlib import Path
data = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8'))
Expand Down Expand Up @@ -77,7 +77,7 @@ If the CLI is unavailable, load `graphify-out/graph.json` and run the traversal
5. If the graph lacks enough information, say so - do not hallucinate edges.

```bash
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import sys, json
from networkx.readwrite import json_graph
import networkx as nx
Expand Down Expand Up @@ -168,10 +168,10 @@ Replace `QUESTION` with the **expanded** query string, `MODE` with `bfs` or `dfs
After writing the answer, save it back into the graph so it improves future queries. Include the expanded tokens inside the `--answer` text (e.g. `"Expanded from original query via vocab: [tokens]. Then traversed..."`) so the next `--update` extracts the expansion history as a graph node:

```bash
$(cat graphify-out/.graphify_python) -m graphify save-result --question "ORIGINAL_QUESTION" --answer "ANSWER" --type query --nodes NODE1 NODE2
"$(cat graphify-out/.graphify_python)" -m graphify save-result --question 'ORIGINAL_QUESTION' --answer 'ANSWER' --type query --nodes NODE1 NODE2
```

Replace `ORIGINAL_QUESTION` with the user's verbatim question, `ANSWER` with your full answer text (containing the expanded-token trace), `NODE1 NODE2` with the list of node labels you cited. This closes the feedback loop: the next `--update` will extract this Q&A as a node in the graph.
Replace `ORIGINAL_QUESTION` with the user's verbatim question, `ANSWER` with your full answer text (containing the expanded-token trace), `NODE1 NODE2` with the list of node labels you cited. The single quotes around the user-supplied values make the substitution injection-safe: a question like `hello"; rm -rf /` cannot escape the argument. If your content contains a literal single quote, replace it with `'\''` (close-quote, escaped-quote, open-quote). This closes the feedback loop: the next `--update` will extract this Q&A as a node in the graph.

**Work memory (self-improving loop).** Add an `--outcome` so future sessions learn from this one — append `--outcome useful|dead_end|corrected` to the `save-result` command (and `--correction "the right answer"` when correcting):

Expand All @@ -194,7 +194,7 @@ graphify path "NODE_A" "NODE_B"
If the CLI is unavailable, run it inline:

```bash
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import json, sys
import networkx as nx
from networkx.readwrite import json_graph
Expand Down Expand Up @@ -243,10 +243,10 @@ except nx.NodeNotFound as e:

Replace `NODE_A` and `NODE_B` with the actual concept names from the user. Then explain the path in plain language - what each hop means, why it's significant.

After writing the explanation, save it back:
After writing the explanation, save it back (single quotes around the user-supplied values keep the substitution injection-safe; replace any literal `'` in the substituted text with `'\''`):

```bash
$(cat graphify-out/.graphify_python) -m graphify save-result --question "Path from NODE_A to NODE_B" --answer "ANSWER" --type path_query --nodes NODE_A NODE_B
"$(cat graphify-out/.graphify_python)" -m graphify save-result --question 'Path from NODE_A to NODE_B' --answer 'ANSWER' --type path_query --nodes NODE_A NODE_B
```

---
Expand All @@ -262,7 +262,7 @@ graphify explain "NODE_NAME"
If the CLI is unavailable, run it inline:

```bash
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import json, sys
import networkx as nx
from networkx.readwrite import json_graph
Expand Down Expand Up @@ -304,8 +304,8 @@ for neighbor in G.neighbors(nid):

Replace `NODE_NAME` with the concept the user asked about. Then write a 3-5 sentence explanation of what this node is, what it connects to, and why those connections are significant. Use the source locations as citations.

After writing the explanation, save it back:
After writing the explanation, save it back (single quotes around the user-supplied values keep the substitution injection-safe; replace any literal `'` in the substituted text with `'\''`):

```bash
$(cat graphify-out/.graphify_python) -m graphify save-result --question "Explain NODE_NAME" --answer "ANSWER" --type explain --nodes NODE_NAME
"$(cat graphify-out/.graphify_python)" -m graphify save-result --question 'Explain NODE_NAME' --answer 'ANSWER' --type explain --nodes NODE_NAME
```
2 changes: 1 addition & 1 deletion graphify/skills/amp/references/transcribe.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Read the top god node labels from detect output or analysis, then compose a shor
```bash
export GRAPHIFY_WHISPER_MODEL=base # or whatever --whisper-model the user passed (must be exported)
export GRAPHIFY_WHISPER_PROMPT="<the one-sentence domain hint you composed in Step 1>"
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import json, os, sys
from pathlib import Path
from graphify.transcribe import transcribe_all
Expand Down
12 changes: 6 additions & 6 deletions graphify/skills/amp/references/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Load this only when the user passed `--update` or `--cluster-only`. A first-time
Use when you've added or modified files since the last run. Only re-extracts changed files - saves tokens and time.

```bash
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import sys, json
from graphify.detect import detect_incremental, save_manifest
from pathlib import Path
Expand All @@ -30,7 +30,7 @@ if new_total > 0:
Then populate `.graphify_detect.json` so Steps 3A–6 (which read it unconditionally) see the right state for an incremental run. `files` carries the changed subset (drives Step 3A AST + Step 3B0 cache check on only what changed); `all_files` carries the full corpus for any step that needs corpus-wide context:

```bash
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import json
from pathlib import Path
r = json.loads(Path('graphify-out/.graphify_incremental.json').read_text(encoding=\"utf-8\"))
Expand All @@ -48,7 +48,7 @@ Path('graphify-out/.graphify_detect.json').write_text(json.dumps({
If new files exist, first check whether all changed files are code files:

```bash
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import json
from pathlib import Path

Expand All @@ -71,7 +71,7 @@ If no new files exist (only deletions), create an empty extraction so the merge
```bash
if [ ! -f graphify-out/.graphify_extract.json ]; then
echo '[graphify update] Only deletions -- creating empty extraction for merge.'
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import json
from pathlib import Path
Path('graphify-out/.graphify_extract.json').write_text(json.dumps({'nodes':[],'edges':[],'hyperedges':[],'input_tokens':0,'output_tokens':0}), encoding='utf-8')
Expand All @@ -83,7 +83,7 @@ fi
Then:

```bash
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import json
from pathlib import Path
from graphify.build import build_merge
Expand Down Expand Up @@ -170,7 +170,7 @@ Then run Steps 4–8 on the merged graph as normal.
After Step 4, show the graph diff:

```bash
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import json
from graphify.analyze import graph_diff
from graphify.build import build_from_json
Expand Down
4 changes: 2 additions & 2 deletions graphify/skills/claude/references/add-watch.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Load this when the user ran `/graphify add <url>` or passed `--watch`. Neither i
Fetch a URL and add it to the corpus, then update the graph.

```bash
$(cat graphify-out/.graphify_python) -c "
"$(cat graphify-out/.graphify_python)" -c "
import sys
from graphify.ingest import ingest
from pathlib import Path
Expand Down Expand Up @@ -41,7 +41,7 @@ Supported URL types (auto-detected):
Start a background watcher that monitors a folder and auto-updates the graph when files change.

```bash
$(cat graphify-out/.graphify_python) -m graphify.watch INPUT_PATH --debounce 3
"$(cat graphify-out/.graphify_python)" -m graphify.watch INPUT_PATH --debounce 3
```

Replace INPUT_PATH with the folder to watch. Behavior depends on what changed:
Expand Down
2 changes: 1 addition & 1 deletion graphify/skills/claude/references/exports.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ graphify export graphml
### Step 7d - MCP server (only if --mcp flag)

```bash
$(cat graphify-out/.graphify_python) -m graphify.serve graphify-out/graph.json
"$(cat graphify-out/.graphify_python)" -m graphify.serve graphify-out/graph.json
```

This starts a stdio MCP server that exposes tools: `query_graph`, `get_node`, `get_neighbors`, `get_community`, `god_nodes`, `graph_stats`, `shortest_path`. Add to Claude Desktop or any MCP-compatible agent orchestrator so other agents can query the graph live.
Expand Down
Loading