The CoReason.AI workspace is a high-performance, 100% native Rust monorepo coupled with a decoupled TypeScript/React UI component library. This repository consolidates deterministic computation, cryptographic identity verification, API perimeter routing, and meta-engineering code-generation into a strictly typed, single-process execution engine.
The workspace enforces a strict, one-way dependency flow to prevent cyclic compilation errors and ensure absolute architectural clarity.
-
crates/core/: The immutable domain base. Contains shared Plain Old Data (POD) structs, internal Abstract Syntax Tree (AST) representations, and universal schemas. It has zero internal workspace dependencies. -
crates/engine/: The pure computational core. Houses deterministic WebAssembly (WASM) sandboxes, sensory solvers, and core algorithmic execution loops. It is completely stateless and relies solely oncore. -
crates/trust/: The cryptographic and ledger core. Handles Uniform Resource Name (URN) validation, SPIFFE/x509 identity management, database persistence (SQLx/Diesel), and thermodynamic cost tracking. -
crates/codegen/: The meta-engineering forge. Contains schema compilers, AST translators, and SDK generation tools. Operates exclusively at build-time or via developer CLI tools. -
crates/server/: The asynchronous I/O boundary. Contains Axum web routes, background daemons, and the administrative CLI orchestrator. It wires abstract traits to concrete implementations via dependency injection.
packages/sensory-core/: A reusable React, Vite, and Tailwind CSS component library featuring data visualizers, Wasm sandbox HUDs, and Storybook documentation. This package is strictly isolated from the Cargo toolchain and relies on auto-generated TypeScript definitions fromcrates/codegen.
- Rust Toolchain:
1.75+(managed viarustup) - Node.js:
v20+&npm(for the frontend workspace) - Database: PostgreSQL (for the
trustledger)
The backend is managed as a single Cargo workspace.
# Check compilation across all workspace crates
cargo check --workspace
# Run the test suite
cargo test --workspace
# Build the Axum server binary
cargo build --release -p server
The shared UI assets and Storybook components are managed via npm.
cd packages/sensory-core
npm install
# Run type checks against auto-generated bindings
npm run typecheck
# Launch the isolated component explorer
npm run storybook
This repository is optimized for autonomous and semi-autonomous AI coding agents (e.g., Cursor, Cline, Devin).
If you are an AI agent operating in this workspace, you must adhere strictly to the operational guardrails defined in AGENTS.md. Key rules include:
- Context Bounding: Restrict your context window to the specific crate you are modifying.
- Micro-Verification: You must run the localized
cargo check -p <crate_name>ornpm run typecheckcommand after every file modification to ensure compile-time stability. - Pure Rust: No Python hybrid boundaries or PyO3 extensions are permitted in the data plane.
For IDE-specific agent configuration, see .cursorrules and .clinerules.