Add knowledge management: LightRAG-backed GraphRAG knowledge base - #1
Merged
Merged
Conversation
Persist what a run learns (files, AST entities, dependency graph, user stories) into a queryable knowledge base instead of only writing a JSON report. GraphRAG was chosen over an LLM-wiki or vanilla RAG because a codebase is a graph: multi-hop and global questions need entity/relation retrieval, and the exact dependency graph from static analysis can seed the knowledge graph without spending LLM tokens. LightRAG (MIT) was selected for its incremental inserts, custom-KG import, pluggable Anthropic/OpenAI/ Ollama adapters and storage back-ends (NetworkX/Neo4j/Postgres/Memgraph, nano-vectordb/pgvector/Qdrant/Milvus/FAISS, JSON/Postgres/Redis/Mongo). - New workflow node `knowledge_base` (opt-in: `archaeo --knowledge-base`, `knowledge_base.enabled` in config) with deterministic indexing and an optional LLM entity-extraction pass (`--kb-extract`) - New MCP server `knowledge-base` (kb_query, kb_retrieve, kb_context, kb_graph, kb_stats, kb_add_documents, kb_export_wiki), registered in the config and the in-process MCP client - New CLI `archaeo-kb` (query, retrieve, context, graph, stats, add, wiki) - Obsidian-compatible Markdown wiki export as the human-facing projection - Offline mode (byte tokenizer, hashing embeddings) used by the new tests - AST entities now carry `file_path` so members link to their file - Docs: docs/KNOWLEDGE_MANAGEMENT.md decision record, README, quickstart, MCP usage, changelog; example under examples/knowledge_base; v0.4.0 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011hwnef5pyjkdpQ6deZJYDD
… voice Docs-only: same commands, tables and links, told as a dig. The README is a field guide, the quickstart a first dig, the knowledge-base doc the site archive; the changelog and MCP usage guide get matching intros. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011hwnef5pyjkdpQ6deZJYDD
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.
Persist what a run learns (files, AST entities, dependency graph, user
stories) into a queryable knowledge base instead of only writing a JSON
report. GraphRAG was chosen over an LLM-wiki or vanilla RAG because a
codebase is a graph: multi-hop and global questions need entity/relation
retrieval, and the exact dependency graph from static analysis can seed the
knowledge graph without spending LLM tokens. LightRAG (MIT) was selected
for its incremental inserts, custom-KG import, pluggable Anthropic/OpenAI/
Ollama adapters and storage back-ends (NetworkX/Neo4j/Postgres/Memgraph,
nano-vectordb/pgvector/Qdrant/Milvus/FAISS, JSON/Postgres/Redis/Mongo).
knowledge_base(opt-in:archaeo --knowledge-base,knowledge_base.enabledin config) with deterministic indexing and anoptional LLM entity-extraction pass (
--kb-extract)knowledge-base(kb_query, kb_retrieve, kb_context,kb_graph, kb_stats, kb_add_documents, kb_export_wiki), registered in the
config and the in-process MCP client
archaeo-kb(query, retrieve, context, graph, stats, add, wiki)file_pathso members link to their fileMCP usage, changelog; example under examples/knowledge_base; v0.4.0
Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_011hwnef5pyjkdpQ6deZJYDD