Case studies
Each example is a small scenario you run with one cargo run command. Its
page describes the scenario, lists the engine pieces it uses, shows what the
program prints, and walks through the code. The historical settings are
illustrative; the data is synthetic or cited in the reference content.
A warlord asks a neighbor for military aidA warlord's AI decides whether to send troops. Learn how a decision ticket turns a scored choice into a validated command that replays.
Random decisions, LLM selection, and deterministic replayA law passes or fails by a weighted draw, then by an LLM answer. Learn how chance and models enter a run that still replays exactly.
A central relief order with atomic multi-office executionA central office orders grain relief that the treasury and a county each carry out. Learn how several plugins commit one step together or roll it back.
Local community diffusion and institutional responseA new idea spreads from a market to a village and a local institution responds. Learn how the society extension models populations, influence, and observer estimates.
Confidential copy and targeted releaseA confidential document is copied, released to a chosen audience, and withdrawn. Learn how canwu-information tracks copies, access, and which earlier reads stay on record after a withdrawal.
Encoded transfer and in-path interceptionAn encoded message is intercepted on the way and decoded by someone else. Learn how canwu-information separates holding a copy from reading it.
Routed correspondence from WuxiLetters leave Wuxi for a local recipient and for Beijing. Learn how canwu-correspondence plans a route from what the sender knows and hands the letter between carriers.
Ming fiscal caseRun one fiscal cycle from three starting points: Hongwu 1391, Wanli 1581, and Hongguang 1644. Learn how the fiscal extension models tax law, regional reform, and receipts from cited sources.
Grain, production, and military supplyOver fourteen months, a granary feeds civilians, sends grain to a garrison, and takes in a harvest. Learn how conserved resources, production, and military supply fit together.
Commands and crates
Section titled “Commands and crates”| Example | Command | Main crates |
|---|---|---|
| Warlord aid decision | cargo run -p canwu-api --example decision_ticket |
canwu-api |
| Random decisions and LLM selection | cargo run -p canwu-api --example uncertainty_resolution |
canwu-api |
| Central relief order | cargo run -p canwu-api --example governance_transition |
canwu-api |
| Community diffusion | cargo run -p canwu-society --example local_community_diffusion |
canwu-society |
| Confidential copy | cargo run -p canwu-information --example confidential_copy_release |
canwu-information |
| Encoded interception | cargo run -p canwu-information --example encoded_interception |
canwu-information |
| Routed correspondence | cargo run -p canwu-correspondence --example routed_correspondence |
canwu-correspondence, canwu-information |
| Ming fiscal | cargo run -p canwu-ming-fiscal-reference --example ming_fiscal_starter |
canwu-fiscal, canwu-ming-fiscal, canwu-ming-fiscal-reference |
| Production economy | cargo run -p canwu-economy-reference --example grain_loop |
canwu-resource, canwu-production, canwu-economy-reference-content, canwu-economy-reference |
The first three use only the public API
(canwu-api). The others add an optional
domain extension built on that API, and the last
two also use a reference content pack and a reference integration. Historical
rules, personalities, and option generation stay in the application or its
plugins.