Skip to main content

Module reduce

Module reduce 

Source
Expand description

The whole-turn reduction contract (spec §13).

The reducer is the deterministic decision engine: it takes the turn’s Understanding, the projected views, the active interactions, the target map and the policy snapshot, and produces a ReductionPlan that gives every act an explicit result (I11) and groups executable commands into batches. It performs no I/O and has no side effects.

§Same-turn precedence (normative default, spec §13.2)

  1. A correction or cancellation supersedes the act it names; understanding links them, and the reducer never guesses a correction from a repeated operation.
  2. DoNotSubmit blocks every submission act in the turn.
  3. A question never becomes an action.
  4. An ambiguous target blocks only the acts that depend on it.
  5. Independent questions remain answerable.
  6. A click binds more strongly than a typed answer to the same card.
  7. A high-risk card is never resolved from typed text.

Structs§

ActiveInteractionSummary
What the reducer needs to know about an active interaction.
AnswerTask
A question to answer, with its explicit state basis (spec §19.1).
Capability
One thing the user can do now: an operation on offer, in its workflow’s words.
CommandRef
Reference to a command inside a reduction plan.
PlannedAct
One act with its resolution and result.
ReductionContext
Everything the reducer sees besides the plan and the turn.
ReductionPlan
The reducer’s output (spec §13).
TextSpan
A range of the normalized user message, in bytes.

Enums§

PlannedActResult
The explicit result of one act (spec §13.3, I11).
SourcePolicy
Which sources an answer must rest on (spec §19.1).

Traits§

TurnReducer
The pure whole-turn reducer (spec §13).