AGENTS.md
This commit is contained in:
@@ -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.
|
||||
Reference in New Issue
Block a user