Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Tasks and desired state

A task states what should become true. It does not prescribe a mutation or a sequence of steps.

task "deliver-cargo-42" {
    desired {
        @"cargo-42".properties.located_at =
            @"workshop".properties.located_at
    }
}

A task identity is a quoted string. Its desired section contains one or more expressions. Concrete entity references can target entities declared in the same source or supplied through a base context.

The parser and resolver preserve desired expressions. They do not yet require a Boolean result, compile the task into solver input, select mutations, or produce a plan.

Keep desired state separate from mutation mechanics. The task above says where the cargo should be. The transport mutation describes one permitted way to change locations. A later planner will decide whether and how to bind and use that mutation.