"Graphify turns codebases into queryable knowledge graphs. We designed a layered monorepo wiki extension — per-layer .graphify/ folders with staleness hooks — that doesn't exist yet. Here's the full spec and how to get 90% of it right now."
Transparency note: This post describes a design pattern we invented on top of graphify, an existing open-source tool. The core tool is real. The layered wiki structure and .graphify/ folder convention described here are not official graphify features — they are a proposal. We'll clearly mark every invented part. The "how to approximate it today" sections use only real, working graphify commands.
The Problem: One Graph, Many Layers
If you haven't used graphify yet, the short version: you run /graphify . inside Claude Code (or graphify . --wiki from your terminal), and it turns your entire codebase into a queryable knowledge graph. Claude can then answer questions like "how does the checkout flow work?" or "what calls PaymentService?" with file-and-line citations instead of hallucinated guesses.
It works brilliantly for single-service repos. But for a monorepo that looks like this:
…you hit a wall. Run graphify . at the root and everything lands in a single flat graphify-out/ folder. The community articles generated by the --wiki flag end up mixing TypeScript React components with Java Spring controllers with SQL stored procedures. When you're deep inside the frontend layer fixing a component, Claude is also loading a wiki article about your database trigger — noise you don't need.
The real question: what if each layer had its own scoped graph and wiki, colocated with the source it describes?
The Concept: Layered Graphify Wiki
⚠️ Everything in this section is a design proposal — not official graphify. The folder names, behaviours, and some commands below do not exist in the real tool. Skip to How to Approximate It Today if you only want working commands.
The Proposed Folder Layout
Instead of one graphify-out/ at the root, we imagined a two-level structure:
Global graph — for cross-layer questions: "how does the UI checkout call the Java payment endpoint?"
Per-layer graph — for day-to-day work: "what React hooks does CheckoutForm use?" with no SQL noise
Why .graphify/ Instead of graphify-out/
The real tool writes to graphify-out/. We proposed renaming this to .graphify/ — a small but deliberate signal.
graphify-out/ reads like a build artefact — something to gitignore, like dist/ or build/. Developers instinctively expect build artefacts to be throwaway, regenerated on demand, never committed.
.graphify/ reads like a tool-config directory — something to commit and version, like .github/, .husky/, or .vscode/. The graph and the wiki are not throwaway; they are knowledge artefacts that accumulate value over time, and they should live in git alongside the code they describe.
The needs_update Staleness Marker
The second invented piece was a needs_update file inside each .graphify/ directory, written by a git hook after every commit, checkout, or merge. Claude Code would read this marker before answering a query and prompt: "The graph for this layer is stale — run graphify update api/ to rebuild."
The real tool (installed as pip install graphifyy, used as graphify) supports none of the invented commands above. But you can get to about 90% of the layered wiki pattern right now using only real commands.
Step 1 — Install graphify
pip install graphifyy # PyPI package is graphifyy (double-y)
graphify --version# should print 0.9.41
graphify install# registers the /graphify skill in Claude Code
Step 2 — Build per-layer graphs
Run graphify separately from each layer. Each invocation produces its own graphify-out/ inside that directory:
# Global — from repo root
graphify .--wiki# Per layercd frontend && graphify .--wiki&&cd ..
cd api && graphify .--wiki&&cd ..
cd services/order-service && graphify .--wiki&&cd ../..
cd database && graphify .--wiki&&cd ..
Run layers in parallel (separate terminals) to save time on large repos.
Step 3 — Rename to the .graphify/ convention (optional)
The real tool doesn't care what the output folder is named once it's written. Rename freely:
Step 6 — Manual staleness check (in place of the invented hook)
Since graphify hook install doesn't exist, use a simple git alias as a substitute:
# Add to .git/hooks/post-commit (make it executable)#!/bin/shtouch .graphify/needs_update
for dir in frontend api services/order-service database;do[-d"$dir/.graphify"]&&touch"$dir/.graphify/needs_update"done
echo"graphify: graphs marked stale — run 'cd && graphify . --update --wiki' to refresh"
chmod +x .git/hooks/post-commit
This is a manual implementation of what we designed as graphify hook install. It's eight lines of shell instead of one command, but it works.
What We'd Love to See in Official Graphify
If you've made it this far and agree this pattern is worth having, the graphify team is active on GitHub. The features we'd most want upstreamed:
graphify update — build/refresh a specific subdirectory without cd
graphify hook install — register git hooks that stamp a staleness marker
graphify merge-graphs — compose a global graph from per-layer graphs
Official support for a configurable output directory — so .graphify/ can be the default instead of graphify-out/
The real tool is excellent as-is. This pattern is about taking it one step further for teams running large polyglot monorepos with Claude Code as their primary AI assistant.
If you try this pattern and improve on it, please share — especially if you find a cleaner way to handle staleness detection or the CLAUDE.md layer routing.
The layered-wiki idea is strongest when each layer has a clear authority. Otherwise the graph gets richer but the reader still cannot tell which source should win during conflict.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Top comments (1)
The layered-wiki idea is strongest when each layer has a clear authority. Otherwise the graph gets richer but the reader still cannot tell which source should win during conflict.