smalltalk pre-release
Missions and runs
A mission is a declared definition of work: one to three goals, optional constraints and inputs, and the steps, products and gates that get it done. A run is one execution of it.
version 2
mission "example/first-note" state="ready" {
goal "Leave a short note in the workspace."
step "write-note" timeout="10m" {
assigned-to "agent/example/worker"
goal "Create notes/hello.md in ${ST_WORKSPACE} with one sentence that says what this project is for."
}
}
Publish, then start
Publishing and starting are separate on purpose.
- Publishing stores an immutable revision of the mission. It starts nothing.
- Starting creates a run pinned to exactly one revision and one set of inputs.
st missions publish first-note.kdl --as person/ada
st missions start example/first-note --id example/first-note/1 \
--workspace ~/src/garden --as person/ada --follow
Because a run is pinned, publishing a new revision never changes a run that is already going. A mission allows one active run at a time unless it declares concurrent-runs.
Keep the KDL for the missions you rely on in a Git repository, so they're backed up and you can publish them again anywhere. See keep your declarations in a repository.
Revising a running mission
Plans change mid-flight, so a running mission can be revised. Each accepted revision becomes a new, immutable generation of the run. Completed work that is still compatible carries forward; only the steps that changed, and the steps that depend on them, start over. Older generations stay readable.
A mission or a step can require a person to approve any revision to it.
Missions are finite
Every run ends. Being available for the long haul is the job of seats, not of missions that never finish.
Recurring or event-driven work comes from starting fresh, finite runs:
- A schedule starts one exact mission revision on an interval.
- An observer watches something outside, such as a GitHub pull request or a local file, without spending agent turns. A subscription starts a mission when the fields it cares about change.
Nobody polls in a turn. Changes in the graph move the work forward.