Order vocabulary: minimal framework-owned set #2

Open
opened 2026-11-15 01:09:51 +00:00 by muse-lantern · 0 comments
Member

The plan

The order vocabulary is the framework-owned contract between the layers: the Commander issues orders, the brain executes them, and later a decision model in either slot will issue them too. A new order type needs brain support, so the vocabulary cannot grow casually — it is settled here, in the framework, and it grows by addition only. A shipped order name is never removed or redefined.

Current state

addons/daisy/src/orders.gd carries a PROVISIONAL starter set of seven constants — move_to, hold_position, patrol, investigate, target, retreat, reinforce — plus is_valid() and make(). DaisyCommander.issue_order drops any order whose type is not in the vocabulary, so the gate already exists; the set behind it is the draft. The design doc's order examples are "move there, target the player, run, interact with that" — note run and interact are NOT in the provisional set yet, and reinforce in the set is currently used as a Director objective that translates into move_to, not as a direct order.

What changes

Settle the minimal order set the brain understands, and define each order's payload schema. The work, in order:

  1. Audit what the layers need. The Commander must be able to express: move a unit somewhere, hold a position, patrol a route, investigate a spot, target something, get a unit out of danger, and interact with a thing. The Director's objectives (see the Director issue) must translate into these orders — if an objective cannot be expressed as orders, either the vocabulary or the objective is wrong.
  2. Decide the minimal set. For each provisional constant: keep, drop, or rename. For each design-doc example not in the set (run, interact): add or deliberately defer with a reason recorded here. The set should be as small as possible while covering the Commander and Director issues' needs — anything speculative stays out until a layer actually needs it.
  3. Define the payload schema per order type. Each type gets its fields in writing, e.g. move_to {position}, patrol {waypoints}, investigate {position, radius}, target {target_id}, interact {target_id}, retreat {position} or {away_from}. The brain reads only the fields its order type defines; unknown fields are ignored.
  4. Update orders.gd to the settled set — constants, ALL, and a doc comment per order type stating its fields. The growth-by-addition rule goes in the file header as the standing rule.
  5. Tests. Every vocabulary order is accepted by issue_order and reaches the brain; an unknown type is dropped and the brain's current order is untouched. The smoke test keeps passing.

What done looks like

orders.gd matches the settled set exactly, each type documented with its payload, the design doc's vocabulary section updated to match, and a test proving acceptance of every type and rejection of unknown types. After this lands, the small-brain issue can build execution against a stable contract, and the model-integration issue can validate model orders against it.

Open questions

  • Is run distinct from retreat, or the same order with a parameter (flee a threat vs withdraw to a position)?
  • Does interact belong in the minimal set, or is it a later extension once an interaction exists to execute?
  • Is reinforce an order at all, or only a Director objective that translates into move_to — should it leave the order vocabulary?
  • Who may propose a new order — framework only, or can a mod propose one for the framework to adopt?
## The plan The order vocabulary is the framework-owned contract between the layers: the Commander issues orders, the brain executes them, and later a decision model in either slot will issue them too. A new order type needs brain support, so the vocabulary cannot grow casually — it is settled here, in the framework, and it grows by addition only. A shipped order name is never removed or redefined. ## Current state `addons/daisy/src/orders.gd` carries a PROVISIONAL starter set of seven constants — `move_to`, `hold_position`, `patrol`, `investigate`, `target`, `retreat`, `reinforce` — plus `is_valid()` and `make()`. `DaisyCommander.issue_order` drops any order whose type is not in the vocabulary, so the gate already exists; the set behind it is the draft. The design doc's order examples are "move there, target the player, run, interact with that" — note `run` and `interact` are NOT in the provisional set yet, and `reinforce` in the set is currently used as a Director objective that translates into `move_to`, not as a direct order. ## What changes Settle the minimal order set the brain understands, and define each order's payload schema. The work, in order: 1. **Audit what the layers need.** The Commander must be able to express: move a unit somewhere, hold a position, patrol a route, investigate a spot, target something, get a unit out of danger, and interact with a thing. The Director's objectives (see the Director issue) must translate into these orders — if an objective cannot be expressed as orders, either the vocabulary or the objective is wrong. 2. **Decide the minimal set.** For each provisional constant: keep, drop, or rename. For each design-doc example not in the set (`run`, `interact`): add or deliberately defer with a reason recorded here. The set should be as small as possible while covering the Commander and Director issues' needs — anything speculative stays out until a layer actually needs it. 3. **Define the payload schema per order type.** Each type gets its fields in writing, e.g. `move_to {position}`, `patrol {waypoints}`, `investigate {position, radius}`, `target {target_id}`, `interact {target_id}`, `retreat {position}` or `{away_from}`. The brain reads only the fields its order type defines; unknown fields are ignored. 4. **Update `orders.gd` to the settled set** — constants, `ALL`, and a doc comment per order type stating its fields. The growth-by-addition rule goes in the file header as the standing rule. 5. **Tests.** Every vocabulary order is accepted by `issue_order` and reaches the brain; an unknown type is dropped and the brain's current order is untouched. The smoke test keeps passing. ## What done looks like `orders.gd` matches the settled set exactly, each type documented with its payload, the design doc's vocabulary section updated to match, and a test proving acceptance of every type and rejection of unknown types. After this lands, the small-brain issue can build execution against a stable contract, and the model-integration issue can validate model orders against it. ## Open questions - Is `run` distinct from `retreat`, or the same order with a parameter (flee a threat vs withdraw to a position)? - Does `interact` belong in the minimal set, or is it a later extension once an interaction exists to execute? - Is `reinforce` an order at all, or only a Director objective that translates into `move_to` — should it leave the order vocabulary? - Who may propose a new order — framework only, or can a mod propose one for the framework to adopt?
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
dead-air/daisy#2
No description provided.