From 92ab83ea38833ec0c5d8bf96e39d2344a4511f04 Mon Sep 17 00:00:00 2001 From: Safi Date: Sun, 5 Apr 2026 14:46:06 +0100 Subject: [PATCH] Use graph.json for follow-up questions; bump to 0.1.6 --- CHANGELOG.md | 5 +++++ pyproject.toml | 2 +- skills/graphify/skill.md | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca8efc21..9ff41c18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.1.6 (2026-04-05) + +- Fix: follow-up questions after pipeline now answered from graph.json, not by re-exploring the directory (was 25 tool calls / 1m30s; now instant) +- Skill: added "Answering Follow-up Questions" section with graph query patterns + ## 0.1.5 (2026-04-05) - Perf: semantic extraction chunks 12-15 → 20-25 files (fewer subagent round trips) diff --git a/pyproject.toml b/pyproject.toml index b47617e9..97460a9e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "graphifyy" -version = "0.1.5" +version = "0.1.6" description = "Claude Code skill - turn any folder of code, docs, papers, images, or tweets into a queryable knowledge graph" readme = "README.md" license = { text = "MIT" } diff --git a/skills/graphify/skill.md b/skills/graphify/skill.md index 7e7c62fd..dc13efe6 100644 --- a/skills/graphify/skill.md +++ b/skills/graphify/skill.md @@ -1112,6 +1112,42 @@ For the personal inspo use case: leave this running in a terminal. Drop tweets, --- +## Answering Follow-up Questions After the Pipeline + +**After the pipeline completes, ALL follow-up questions about the corpus MUST be answered from the graph — not by re-reading files or re-exploring the directory.** + +Do NOT use Glob, Grep, Read, Bash, or the Explore agent to answer questions about the corpus content. The graph already has the information. Re-exploring the directory defeats the entire purpose of graphify and wastes time. + +Instead, load and query `graphify-out/graph.json` directly: + +```python +import json +from pathlib import Path +from networkx.readwrite import json_graph +import networkx as nx + +G = json_graph.node_link_graph(json.loads(Path("graphify-out/graph.json").read_text()), edges="links") +``` + +Then answer using graph data: +- **"What X are in this repo?"** → filter nodes by `file_type`, `label`, `source_file`, or node attributes +- **"How does X work?"** → find matching nodes, get their neighbors and edge relations +- **"What calls Y?"** → traverse edges with `relation == "calls"` pointing to Y +- **"What are the main themes?"** → read community labels from the GRAPH_REPORT.md or node `community` attributes +- **"Find verbs / functions / classes / etc."** → filter `G.nodes(data=True)` by label patterns + +Example — finding all verbs (action concepts) in a codebase: +```python +# Functions and methods are the verbs of code +verbs = [(d["label"], d.get("source_file", "")) for _, d in G.nodes(data=True) + if d.get("file_type") == "code" and any(k in d.get("label", "").lower() + for k in ["()", "fn ", "def ", "func"])] +``` + +**The only exception:** if the user explicitly asks you to look at a raw file (e.g., "show me the contents of X"), you may read that specific file. But for any analytical question, use the graph. + +--- + ## Honesty Rules - Never invent an edge. If unsure, use AMBIGUOUS.