Expand description
Where a city keeps each kind of file on disk: one derivation from
the city root and an address (crates/kernel/spec/Layout.lean §8-56).
Every directory name and file name the city writes is declared here once, and every path it writes them to is spelled here once, so a rename reaches every caller and none is left reading an empty directory.
Nothing here touches a disk. A CityLayout is a value: it answers
where a file would be, and the caller that owns the I/O decides
whether to create it, read it, or refuse. That keeps the layout
inside kernel, where the address grammar it rests on already is.
One rule governs the placement itself: what governs a scope lives
in that scope’s reserved subtree, and no write domain reaches it
(Address::is_reserved). The rules of a building, its configuration
layer and its filters are therefore under RESERVED_PREFIX, while
the documents residents write — the job, the handoff, the urbanite
page, the archive — sit in the open where residents can edit them.
Structs§
- City
Layout - The disk layout of one city, derived from its root.
Constants§
- ARCHIVE_
DIR - Where a building files work it has finished with, by kind and day.
- BROWSERS_
FILE - The browsers paired at this machine’s own door, by public key.
- BUILDING_
SHELF - A building’s own shelf of skills, under that building’s reserved subtree: what this building knows and no other building is given.
- CAS_DIR
- The content-addressed object store, under the city’s reserved subtree.
- CONFIG_
FILE - What one configuration layer declares. The same file name at every layer, because the layer is the scope it sits in rather than a name.
- DEVICES_
FILE - The devices paired to reach the city from outside the machine.
- FILTERS_
FILE - What a scope keeps out of the transcript it sends to a model.
- GUIDE_
FILE - How far the person has got through the first-run guide, under the city’s reserved subtree.
- HANDOFF_
FILE - What the next agent needs before it starts, per room.
- JOB_
FILE - The task of one session, in the room it is run from.
- LEDGER_
DIR - The append-only history of a city, under the city’s reserved subtree.
- LIBRARY_
DIR - The city’s shelves of skills, under the city’s reserved subtree.
- MONITOR_
FILE - The beat the performance monitor samples at, under the city’s
reserved subtree (
crates/sprawling/spec/Monitor.leanD48). - PLAYBACK_
DIR - Where residents’ playback exports land, under the city’s reserved subtree, one directory per building.
- REMOTE_
DIR - What the remote gate keeps on disk, under the city’s reserved subtree.
- RUN_
ID_ PATTERN - A run id as a git ignore pattern: one
?for each character of the hyphenated form acrate::RunIddisplays, so a building can keep every run’s transcript out of its history by name. - SKILL_
FILE - The one document of a skill filed as a directory: a package on a
section shelf, and every skill on a shelf the city mounts from
elsewhere. It is the layout pi, claude and agents all use; the
catalog lists this file’s first line, and
readopens the files beside it by<name>/<path>. - SNAPSHOT_
DIR - What the views held after one ledger line, under the city’s reserved subtree; a projection a start may discard.
- TRANSCRIPT_
EXT - The extension of what one run saw, written in its room as
<run>.jsonl. - URBANITE_
FILE - Who a standing resident is, in that resident’s own directory.
Functions§
- document_
staging_ name - What the staging file of a document named
nameis called: the name hidden by a dot and suffixed.staging, in the document’s own directory (crates/kernel/spec/Layout.lean§8-56). - is_
document_ staging_ name - Whether
nameis spelled the waydocument_staging_namespells the staging file of some document.