src

src/ holds the systems, and the plain code they call. See Systems for what a system is.

src/
├── sense/
│   └── imu/
│       ├── imu.system.ts        # the system sense/imu/imu
│       └── imu.ts               # plain functions it calls
├── body/
│   ├── odometry.system.rs       # the system body/odometry
│   └── odometry.rs
└── follow/
    └── detect.system.py         # the system follow/detect

There is no required layout, and languages mix freely, file by file.

Names come from the path

A system is named by its path, less src/ and .system.*: src/body/odometry.system.rs is body/odometry. Nobody writes a name, so none drifts from its file. Move a folder and everything in it is renamed with it.

Every record the mind leaves — in the debugger, in Fleet — is labelled with these names.

Folders are parts

A folder is one part of the mind: its systems, their plain code, and — often — the component files they write. What a part offers the rest goes in its export.components.*.

Lay it out as the mind is shaped

The folder tree is how the mind reads in every trace, so lay it out by what each part does. Terry's top level:

src/
├── sense/       # turns what the body senses into what the mind believes
├── world/       # what the mind remembers: the map, the things in it
├── control/     # what it decides
└── motor/       # what it tells the body

Reorganising is moving folders. The names follow.

Systems are glue

A system file is short: what it touches, a few lines reading the world, a call to plain code, a write. The work lives in plain files beside it — odometry.rs beside odometry.system.rs — that take values and return values, and are tested without a world. Code more than one part of the mind needs goes in library/.