Core’s low modules stay below the shell
Production code in authority, egress, environ, fact, host, io, own,
path and process names no path into shell.
- Lower modules exchange domain data: environment overlays, observations, cancellations and authority refusals. The shell interprets them as runtime values, errors and escapes.
- Intentional cycles among lower modules are permitted; this is a boundary, not a DAG requirement.
data, which they all use, stays below the shell too: the one value printer (data::print) reads a value through aPrintableview the shell’sValueimplements, soauthorityprints a grant without the shell.core/tests/layering.rsenforces it for these modules anddata, by the paths each file names: no productioncrate::shellpath, orsuper::path reaching it, in any of them. The crate root re-exports shell items (Shell,Value,Error, …), socrate::Shellis a shell path too; the test reads that set from thepub use shell::lines oflib.rs, so it cannot drift. It reads paths, not the dependency graph: a dependency through a module outside the list is not caught.- Documentation links and test-only shell fixtures do not create production dependencies.
See core, capabilities and cancellation.