Scaffold a new Rust crate in the workspace. Creates Cargo.toml, lib.rs, error.rs, updates workspace members.
Create a new crate in the Theo Code workspace.
$0: crate name (must start with theo-)$1: description (quoted string)theo-, doesn't already exist in crates/crates/$0/src/crates/$0/Cargo.toml:
[package]
name = "$0"
version = "0.1.0"
edition = "2024"
description = "$1"
[dependencies]
theo-domain = { path = "../theo-domain" }
thiserror.workspace = true
crates/$0/src/lib.rs with module doc commentcrates/$0/src/error.rs with thiserror enumCargo.tomlcrates/$0/tests/ directory with initial integration test:
// crates/$0/tests/smoke.rs
#[test]
fn test_crate_compiles_and_basic_types_exist() {
// RED-GREEN: this test validates the crate is usable
use $0_snake::*; // replace hyphens with underscores
// Basic smoke test — expand as features are added
}
cargo check -p $0 to validate compilationcargo test -p $0 to validate tests pass (TDD — GREEN phase)Every new crate starts with at least one test. The scaffold includes a smoke test that validates the crate compiles and exports are accessible. This is the GREEN phase — the crate must be testable from day zero.