Section 18 of 25
Working with coding agents
Contents
SLAT was designed in a team where much of the code is written by coding agents. Agents follow a layout reliably when it is written down, short, and checked by machines. Three things make the difference.
- A fixed layout is a free map. An agent told to "add a filter to transcripts" opens
core/transcript/andapp/transcript/without searching. The time an agent spends searching is the time it spends being wrong. - A check beats a sentence in the prompt. "Do not emit from core" in a prompt is followed most of the time. A red check is followed every time. Write the rule as a check first, and as a prompt line only when it cannot be checked.
- The recipes are prompts. Section 17 is written as numbered steps on purpose: paste the recipe into the task, and the agent produces files in the expected places in the expected order.
Agents also change how a workspace is built. Several agents in several working copies are several cold builds of the same dependencies at once, which is the frozen laptop of section 19.2. Section 22.5 shows how each working copy starts warm without sharing a target/ folder with another, and section 22.4 how each of them runs only the tests its change can affect.
A section you can copy into your repository's contributor guide (AGENTS.md, CLAUDE.md or equivalent):
## Backend layout: SLAT 1.3
The backend follows SLAT (Slice · Layer · Actor · Tier), version 1.3.
Reference: https://monoone.dev/blog/slat/
- Tiers: app → core → store/drivers → kit. Only `app` depends on tauri.
- A feature is one slice: `crates/<product>-core/src/<slice>/` and `src-tauri/src/<slice>/`.
- Files in a slice: mod.rs, model.rs, logic.rs, store.rs, service.rs, actor/ (only if needed).
- A Tauri command has at most 10 lines and calls one function of its slice.
- Background state belongs to an actor: Msg → update (pure) → Effect.
- Operating-system code only in `drivers/src/platform/`.
- If the product has plugins: a base slice never imports a plugin slice
(SLAT section 23).
- Before adding code, find its place with the decision tree (SLAT section 17.8,
https://monoone.dev/blog/slat/recipes/).
- Checks in `checks/slat-*.sh` enforce this. Do not edit a check to make it pass;
report it instead.
- Before pushing, run the tests the change affects (SLAT section 22.4), then the checks.
- Every working copy has its own `target/`. Never point two copies at one
folder (SLAT section 22.5).