Expand description
§scema-sim — the counterfactual layer
Between “the agent has ideas” and “the agent acts” there is supposed to be a step where
the ideas are made to compete. This crate is that step. It takes a WorldState, a
Goal and a set of Hypothesis branches and returns a Projection per branch:
expected gain, risk, cost, uncertainty and reversibility, each as a Term that says
whether anybody measured it.
§The rule that shapes everything here
A projection may not invent a number.
A simulator that outputs +31% predicted performance for a refactor nobody has
benchmarked has produced a hallucination with a decimal point on it, and the decimal
point is what makes it dangerous — it survives into a ranking, a report and a decision
record looking exactly like a measurement. So StructuralSimulator scores an
expected gain only for a hypothesis grounded in a measured signal that the observer
actually counted. Everything else is Term::absent with 0.0 and a note saying what
would have to exist.
The consequence is uncomfortable and correct: on a world that was barely perceived, most branches project a gain of exactly zero and the agent abstains. That is the true answer. The alternative — a plausible ranking over invented gains — is the failure this whole workspace is built to avoid.
§What a structural simulator can and cannot know
It knows what the plan declares (how many steps, of what risk class, how reversible)
and what the world recorded (which signals exist, how legible it was, what could not
be read). Those are real observations about the decision, and they are enough to rank
branches by hazard and by ignorance. They are not enough to predict an outcome, and
this crate never claims to. Predicting outcomes requires either a domain model or an
executed experiment; both are Simulator implementations somebody can add, which is
why this is a trait and not a function.
Structs§
- Failure
Mode - A way this branch could go wrong.
- Projection
- The projected consequences of one hypothesis.
- Shadow
Delta - What the world would look like afterwards, to the extent that is knowable.
- Structural
Simulator - Simulation from the structure of the plan and the legibility of the world.
Traits§
- Simulator
- Anything that can project a hypothesis forward.