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