feat:Hierarchical Knowledge Aggregation for Graphify
Close https://github.com/safishamsi/graphify/issues/265
Hierarchical Knowledge Aggregation for Graphify
Issue Origin: Single flat knowledge graph cannot represent hierarchical project structure. Large-scale codebases need layered knowledge with bottom-up aggregation and intelligent query routing.
1. Problem Statement: Why Hierarchical Knowledge Aggregation?
Graphify originally supported only a single flat knowledge graph — all source files (code, docs, images) are extracted, merged into one graph.json, and served via MCP as a flat graph.
This reveals three core problems in large-scale projects:
-
Information Overload 🤯: A 500+ file project produces a graph with thousands of nodes. LLM query token budgets are wasted on irrelevant details, and key architectural information is buried.
-
Lack of Abstraction Levels 🏗️: Microservice architectures are naturally hierarchical (services → domains → system), but flat graphs cannot represent this. Asking "what is the system architecture?" vs. "how does auth function call work?" requires completely different abstraction levels.
-
Inefficient Queries 🐌: Every query searches the entire graph, unable to leverage hierarchical structure to narrow scope.
Core Insight: Knowledge should be layered like geographic maps — bottom layers are street-level detail, upper layers are city-level overviews. Upper layer graph = own content + lower layer summary, forming a strict layered DAG.
👋 Friendly reminder — this PR has been sitting here for a while and we've already resolved merge conflicts multiple times to keep it in sync with upstream/v4.
At this point, we'd really appreciate a decision on whether this feature aligns with the project's direction:
✅ If this is something you want — a quick review and merge would be amazing. The feature is ready and has been kept up-to-date through multiple conflict resolutions.
❌ If this isn't the right fit — no hard feelings at all! Just let us know and we'll gladly close this PR to keep the backlog clean.
Either way, a response would be greatly appreciated so we can stop burning cycles on conflict resolution and move forward. 🙏
Thanks for your time!
#265
I would double on that. I am unable to use graphify due my vault having too many files. I can however run graphify multiple times in different levels, but that breaks the main proposal of the project.
I would double on that. I am unable to use graphify due my vault having too many files. I can however run graphify multiple times in different levels, but that breaks the main proposal of the project.
https://github.com/safishamsi/graphify/issues/425#issuecomment-4273276460 。 This issue aims to solve similar problems. The author mentioned in this issue that this feature is included in the v5.0 roadmap. We can look forward to it. @safishamsi
Is this feature available now? If so, how do I use it? Also, does it support dynamic updates, such as when I add a new microservice?
Is this feature available now or is no longer in the roadmap? This is a much needed feature so been waiting...