agentic_codebase/lib.rs
1//! AgenticCodebase — Semantic code compiler for AI agents.
2//!
3//! Transforms source code into a navigable graph of concepts, relationships,
4//! and patterns. Stores the entire semantic structure of a codebase in a
5//! single memory-mappable `.acb` file.
6//!
7//! # Architecture
8//!
9//! - **types** — All data types. No logic. No I/O.
10//! - **parse** — Language-specific parsing via tree-sitter.
11//! - **semantic** — Cross-file resolution, FFI tracing, pattern detection.
12//! - **format** — Binary `.acb` file reader/writer.
13//! - **graph** — In-memory graph operations.
14//! - **engine** — Compilation pipeline and query executor.
15//! - **index** — Fast lookup indexes.
16//! - **temporal** — Change history, stability, coupling, prophecy.
17//! - **collective** — Collective intelligence and pattern sync.
18//! - **grounding** — Anti-hallucination verification of code claims.
19//! - **workspace** — Multi-context workspaces for cross-codebase queries.
20//! - **ffi** — C-compatible FFI bindings.
21//! - **config** — Configuration loading and path resolution.
22//! - **cli** — Command-line interface.
23//! - **mcp** — Model Context Protocol server interface.
24
25pub mod cli;
26pub mod collective;
27pub mod config;
28pub mod engine;
29pub mod ffi;
30pub mod format;
31pub mod graph;
32pub mod grounding;
33pub mod index;
34pub mod mcp;
35pub mod parse;
36pub mod semantic;
37pub mod temporal;
38pub mod types;
39pub mod workspace;
40
41// Re-export key types at crate root for convenience
42pub use format::{AcbReader, AcbWriter};
43pub use graph::{CodeGraph, GraphBuilder};
44pub use grounding::{Evidence, Grounded, GroundingEngine, GroundingResult};
45pub use types::{
46 AcbError, AcbResult, CodeUnit, CodeUnitBuilder, CodeUnitType, Edge, EdgeType, FileHeader,
47 Language, Span, Visibility,
48};