Adopt graphify as the synthesis engine#9
Open
Lanzelot1 wants to merge 2 commits into
Open
Conversation
Replaces the hand-rolled wiki pattern with graphify as the synthesis layer. knowledge/ keeps holding authored source files; graphify-out/ is the generated wiki + graph + report, rebuilt by /synthesize. - /synthesize: thin wrapper around `graphify . --update --wiki` - /process-inbox: drop wiki-update step - /recall: read GRAPH_REPORT.md first, then query the graph - /status: Wiki Health -> Graph Layer metrics - /sleep: drop wiki-synthesis and wiki-staleness; graph rebuild at end - validate-frontmatter.sh: drop type:wiki check - CLAUDE.md + README.md: document new flow + swap path (GraphRAG/LightRAG) - .mcp.json + requirements.txt: pin graphifyy and register MCP server - .gitignore: ignore graphify-out/cache/ (regenerable) Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Review caught two bugs in the initial commit: 1. `pipx install -r requirements.txt` is not a valid pipx command (-r is pip convention). Switch to a project-local `.venv/` so `pip install -r requirements.txt` works as documented. 2. `.mcp.json` used `command: "python"`, which can't find the graphify module when it's in a pipx-isolated venv. Point at `.venv/bin/python3` instead — stable across macOS, Linux, WSL. Also update /synthesize, /sleep, /recall to invoke `.venv/bin/graphify` with a note on swapping to plain `graphify` for global pipx installs. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
type: wikipages inknowledge/) and delegate synthesis to graphify, a separate MIT-licensed tool that builds a knowledge graph + wiki from a folder of mixed content.knowledge/keeps its role as the authored layer (source files withtype: source).graphify-out/is the new generated synthesis layer (wiki + graph + report), committed to git exceptcache/./synthesizebecomes a thin wrapper aroundgraphify . --update --wiki;/recall,/status,/sleep,/process-inboxupdated accordingly.Why
The
/synthesizecommand was a smaller, manual version of what graphify does end-to-end (extraction → graph → per-community wiki → queryable JSON → MCP server → always-on PreToolUse hook). Keeping both duplicates effort and leaves the manual one weaker. Graphify also adds multi-modal ingest (code AST, PDFs, images, video transcription) and 71.5x token reduction on queries.Install (one-time, per machine)
These are system-level actions and are not part of this PR. Run them after merging:
Files changed
.claude/commands/synthesize.md— rewrite as graphify wrapper.claude/commands/process-inbox.md— drop wiki-update step.claude/commands/recall.md— readgraphify-out/GRAPH_REPORT.mdfirst, then query graph.claude/commands/status.md— Wiki Health → Graph Layer metrics.claude/commands/sleep.md— drop wiki synthesis/staleness, rebuild graph at end; contradiction check againstAMBIGUOUSedgesscripts/validate-frontmatter.sh— droptype: wiki→## SourcescheckCLAUDE.md— document new flow + swap pathREADME.md— rewrite Folders, Slash Commands, and Synthesis Layer sectionsmemory/_index.md— remove Wiki Pages section, linkgraphify-out/GRAPH_REPORT.mdand wiki.gitignore— ignoregraphify-out/cache/only.mcp.json(new) — expose graphify as MCP serverrequirements.txt(new) — pingraphifyy[mcp]==0.4.23Test plan
graphify --versionprints0.4.23./graphifyappears as a slash command in Claude Code.knowledge/,/synthesizeproducesgraphify-out/wiki/,graph.json,GRAPH_REPORT.md./statusreports graph metrics (nodes, edges, communities, god nodes, AMBIGUOUS count) whengraphify-out/exists./recall "some topic"readsGRAPH_REPORT.mdand queries the graph./mcpin a fresh session listsgraphify;query_graphreturns structured results.graphify-out/after a knowledge/ change.scripts/validate-frontmatter.shpasses..mcp.schema.jsonexists, so.mcp.jsonis not schema-validated — confirmed intentional).Swap path (lock-in mitigation)
If graphify stagnates, migration targets are Microsoft GraphRAG or LightRAG. Outputs are plain markdown + NetworkX JSON, so committed artifacts keep working; only incremental rebuilds are tied to graphify.
🤖 Generated with Claude Code