How sinaigross/code-graph-rag-for-cv works
Code-Graph-RAG indexes mixed-language repositories into a shared knowledge graph, then uses that graph to answer questions and support code changes. The main workflow runs from a user starting an index or asking a question, through parsing and graph storage, to graph-backed retrieval and an answer. Separate capabilities include structural editing, dead-code analysis, runtime trace overlays, and MCP access. The README documents these capabilities; the sampled source and index support selected internal links, but not every runtime dispatch.
Main entry points: function_ingest.py Language Parsing · cli.py CLI Runtime · graph_service.py Graph Service · codebase_query.py Codebase Questions
Components 23
Indexing
- Language Parsing
codebase_rag/parsers/function_ingest.py - Language Specs
codebase_rag/language_spec.py - Route Extraction
codebase_rag/parsers/endpoint_routes.py - Go Build Discovery
codebase_rag/parsers/go/builds.py - Import Analysis
codebase_rag/parsers/import_processor.py - Parameter Nodes
codebase_rag/parsers/parameter_nodes.py - Type Facts
codebase_rag/parsers/type_facts.py
Graph Storage
- Graph Schema
codebase_rag/types_defs.py - Cypher Queries
codebase_rag/cypher_queries.py - Graph Service
codebase_rag/services/graph_service.py - Embedded Graph
codebase_rag/embedded_graph/store.py
Assistant and Editing
- LLM Service
codebase_rag/services/llm.py - Model Providers
codebase_rag/providers/base.py - Codebase Questions
codebase_rag/tools/codebase_query.py - Source Retrieval
codebase_rag/tools/code_retrieval.py - Code Editing
codebase_rag/editing/patcher.py
Analysis and Tracing
- Dead Code
codebase_rag/dead_code.py - AST Search
codebase_rag/tools/ast_grep_service.py - Trace Ingestion
codebase_rag/trace/ingest.py
Interfaces
- CLI Runtime
codebase_rag/cli.py - Configuration
codebase_rag/config.py - MCP Server
codebase_rag/mcp/server.py
Other components
- Engineer
Connections 24
- Engineer → CLI Runtime: starts workflow
README.md - CLI Runtime → Configuration: loads settings
- CLI Runtime → Language Parsing: indexes repository
README.md - Language Parsing → Language Specs: uses language rules
codebase_rag/parsers/function_ingest.py - Language Parsing → Graph Service: ingests graph
README.md - Language Parsing → Route Extraction: extracts routes
- Language Parsing → Go Build Discovery: discovers Go builds
codebase_rag/parsers/function_ingest.py - Language Parsing → Import Analysis: processes imports
codebase_rag/parsers/function_ingest.py - Language Parsing → Parameter Nodes: creates parameters
codebase_rag/parsers/function_ingest.py - Language Parsing → Type Facts: records type facts
codebase_rag/parsers/function_ingest.py - Graph Service → Graph Schema: uses graph types
codebase_rag/services/graph_service.py - Graph Service → Cypher Queries: runs Cypher
codebase_rag/services/graph_service.py - Graph Service → Embedded Graph: accesses store
codebase_rag/services/graph_service.py - CLI Runtime → Codebase Questions: answers questions
README.md - Codebase Questions → LLM Service: generates queries
codebase_rag/tools/codebase_query.py - Codebase Questions → Graph Service: fetches graph results
codebase_rag/tools/codebase_query.py - LLM Service → Model Providers: uses provider
codebase_rag/services/llm.py - Codebase Questions → Source Retrieval: retrieves source
- CLI Runtime → Code Editing: edits code
README.md - CLI Runtime → Dead Code: finds dead code
README.md - CLI Runtime → AST Search: searches AST
README.md - CLI Runtime → Trace Ingestion: ingests traces
README.md - Trace Ingestion → Graph Service: merges observations
codebase_rag/trace/ingest.py - Engineer → MCP Server: connects tools
README.md