How 79 Workspace Members Form a Product
The root Cargo.toml lists 79 members, of which crates/codegen/ accounts for 62. To understand this system, read along five main axes: composition entry, interaction layer, Agent host, domain capabilities, and inference state.
Be able to locate the product's main axes from the root workspace manifest, and distinguish the binary composition entry, TUI library, Shell Agent host, and session state components.
Workspace members
The actual member count in the root manifest. The first line of the root file notes that it is an auto-generated workspace root.
Codegen members
The bulk is concentrated in crates/codegen/, plus build, common, prod, and third_party.
Reading Axes
Composition entry, TUI, Shell host, domain capabilities, inference and state — avoid projecting a fictitious four-layer directory structure.
[workspace]
resolver = "2"
members = [
"crates/build/xai-proto-build",
"crates/codegen/xai-grok-pager-bin",
"crates/codegen/xai-grok-shell",
...
]
[[bin]]
name = "xai-grok-pager"
path = "src/main.rs"
# Agent runtime + leader/stdio/headless entry points.
xai-grok-shell = { workspace = true }
.git metadata, so no specific commit version is claimed.Trace Dependencies to Responsibilities
Starting from xai-grok-pager-bin/Cargo.toml, identify the TUI library and Agent host dependencies. Then go to xai-grok-sampler/src/actor/mod.rs and xai-chat-state/src/actor/mod.rs and note the state owned by each.
pager-bin composition entry through pager, shell, domain crates, sampler, and chat-state.