From 868b7aa3e432c4cf738f734c77a2ff4044fb3510 Mon Sep 17 00:00:00 2001 From: Surma Date: Thu, 15 Oct 2026 11:22:39 +0100 Subject: [PATCH] AGENTS.md --- AGENTS.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..759f3c5 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,39 @@ +# Working on Sausage + +Sausage is meant to be read and changed by agents, including its own agent. +Keep it that way. + +## Priorities + +1. **Correct.** Every behavior in `PROTOCOL.md` has a test in `cli/tests/`. +2. **Simple and short.** Prefer the obvious code. No abstraction for one + caller. No configuration that nobody asked for. +3. **Readable.** A new reader must understand a file without the others. + Each module starts with a doc comment that says what it owns. +4. **Efficient** on the paths that run per message. +5. **Raw.** Sausage has no permissions, sandboxing beyond WASI, limits, or + authentication. Do not add them to the core. People who want them can + build them as actors or as a fork. + +## Layout + +- `cli/`: the host (`sausage` binary and library). `broker.rs` routes and + supervises, `fs.rs` is the filesystem layer, `runtime.rs` runs Wasmtime, + `candidate.rs` tests new versions, `cargo_actor.rs` builds Rust actors. +- `sdk/`: `sausage-actor`, the SDK for Rust actors. Never published: the + `cargo` actor points `sausage-actor = "0.1"` at its local copy. +- `agent/`: the agent actor. `sausage init` embeds and builds it. +- `examples/`: small actors. They are not workspace members. +- `PROTOCOL.md`: the contract between the host and the actors. Change it in + the same commit as the behavior. + +## Checks + +```sh +nix develop -c cargo test -p sausage -p sausage-actor +nix develop -c cargo build --release -p agent --target wasm32-wasip2 +nix develop -c cargo clippy --workspace +``` + +`nix run -- init` and `nix run -- run` must keep working without other +setup.