| review_agents | plan_review_agents | voltagent_agents | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
GitNexus is a code intelligence tool that builds a knowledge graph from source code using tree-sitter AST parsing across 12 languages and KuzuDB for graph storage. Two packages: gitnexus/ (CLI/MCP, TypeScript) and gitnexus-web/ (browser).
- 12 language-specific type extractors in
gitnexus/src/core/ingestion/type-extractors/must follow identical patterns for: async unwrapping, constructor binding, namespace handling, nullable type stripping, for-loop element typing. - Past bugs: C#/Rust missing
await_expressionunwrapping that TypeScript handled correctly; PHP backslash namespace splitting inconsistent with other languages'::/.splitting. - When reviewing type extractor changes, verify the same pattern exists in ALL applicable language files — asymmetry is the #1 source of bugs.
- KuzuDB graph operations: schema in
gitnexus/src/core/kuzu/schema.ts, adapter inkuzu-adapter.ts. - The ingestion pipeline writes symbols and relationships to the graph — changes to node/relation schemas or the ingestion pipeline can corrupt the index.
- Known issue: KuzuDB
close()hangs on Linux due to C++ destructor — usedetachKuzu()pattern. lbug-adapter.tsfallback path needs quote/newline escaping for Cypher injection prevention.
- Cypher query construction in
lbug-adapter.tsandkuzu-adapter.ts— watch for injection via unescaped user-provided symbol names. - CLI accepts
--repoparameter and file paths — validate against path traversal. - MCP server exposes tools to external AI agents — all tool inputs are untrusted.
- Tree-sitter buffer size is adaptive (512KB–32MB) via
getTreeSitterBufferSize()inconstants.ts. - The ingestion pipeline processes entire repositories — O(n) per file with potential O(n²) in cross-file resolution.
- KuzuDB batch inserts vs individual inserts matter for large repos.
- Ingestion pipeline phases: structure → parsing → imports → calls → heritage → processes → type resolution.
- Shared modules:
export-detection.ts,constants.ts,utils.ts— changes here have wide blast radius. gitnexus-webpackage drifts behind CLI — flag if a change should be mirrored.
Invoke these via the Agent tool alongside /ce:review for deeper specialist analysis. These cover gaps that compound-engineering agents don't:
When: Changes touch type-resolution logic, generics, conditional types, or complex type-level programming in type-env.ts, type-extractors/*.ts, or types.ts.
Why: The type resolution system uses advanced TypeScript patterns (discriminated unions, mapped types, recursive generics) that benefit from deep TS type-system review beyond what kieran-typescript-reviewer covers.
When: Changes touch MCP tool handlers, Cypher query construction, CLI argument parsing, or any code that processes external input.
Why: GitNexus is an MCP server — all tool inputs come from untrusted AI agents. Systematic OWASP-level audit catches injection vectors that spot-checking misses. Past finding: lbug-adapter.ts fallback path had unescaped newlines in Cypher queries.
When: Changes touch kuzu-adapter.ts, schema.ts, lbug-adapter.ts, or any Cypher query construction/execution.
Why: No CE agent specializes in graph database optimization. KuzuDB batch insert patterns, index usage, and query planning directly affect analysis speed on large repos.
- Use
gitnexus_impact()before approving changes to any symbol — check d=1 (WILL BREAK) callers. - Use
gitnexus_detect_changes({scope: "compare", base_ref: "main"})to map PR diffs to affected execution flows. - Use claude-mem to surface past architectural decisions relevant to the code under review.