# Rivox Internal Code Architecture
Rivox internal codebase structure (`c:\Users\Aaryan Rawat\Documents\Rivox\src`):
- `src/main.rs`: CLI dispatcher and execution coordinator.
- `src/lib.rs`: Library module re-exports.
- `src/cli/`: Clap argument definitions (`build`, `cache`, `verify`, `completions`).
- `src/config/`: TOML/YAML parsers for `rivox.toml` and `rivox.lock`.
- `src/adapters/`: `EcosystemAdapter` trait and implementations (`python.rs`, `rust.rs`, `node.rs`).
- `src/graph/`: `UnifiedGraph` builder (`petgraph`) and Kahn's algorithm scheduler.
- `src/cache/`: Subtree key derivation (`key.rs`), Merkleized CAS filesystem (`local.rs`), and REAPI stub (`reapi.rs`).
- `src/sandbox/`: OS-specific process sandboxing (`linux.rs`, `macos.rs`, `fallback.rs`).
- `src/provenance/`: Attestation emitters (`intoto.rs`, `slsa.rs`, `spdx.rs`, `sigstore.rs`).
- `src/conformance/`: Automated resolution parity verification suite.
See also: [build-system.md](build-system.md), [cas.md](cas.md).