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//! - **ffi** — C-compatible FFI bindings.
19//! - **config** — Configuration loading and path resolution.
20//! - **cli** — Command-line interface.
21//! - **mcp** — Model Context Protocol server interface.
22
23pub mod cli;
24pub mod collective;
25pub mod config;
26pub mod engine;
27pub mod ffi;
28pub mod format;
29pub mod graph;
30pub mod index;
31pub mod mcp;
32pub mod parse;
33pub mod semantic;
34pub mod temporal;
35pub mod types;
36
37// Re-export key types at crate root for convenience
38pub use format::{AcbReader, AcbWriter};
39pub use graph::{CodeGraph, GraphBuilder};
40pub use types::{
41 AcbError, AcbResult, CodeUnit, CodeUnitBuilder, CodeUnitType, Edge, EdgeType, FileHeader,
42 Language, Span, Visibility,
43};