Actions are the verbs an agent can emit. Each one is bound to a trigger that can fire it, the set of from-states it's valid in, and the reversal op written alongside it. There is no free-form action — if it isn't in the enum, the agent can't do it.
The move set
- KEEP — no-op with a logged rationale (the agent considered and declined).
- SCALE_WINNER / OPTIMIZE_LOSER — adjust merchandising weight up or down.
- DISCOUNT_TEST / PRICE_DROP — price moves; Tier A only.
- DRAFT / REVIVE_SEASONAL — create or re-list.
- VAULT / FLAG_ORPHAN — archive, or flag a SKU with no cost data.
Each action is fully specified
Action(
name="OPTIMIZE_LOSER",
trigger="roas_below_floor_14d",
valid_from={"active", "promoted", "watch"},
min_tier="B",
reverse_op=lambda sku: f"RESTORE_RANK {sku}",
)Because the reversal op is part of the definition, every emitted action is reversible by construction — the undo is written when the do is written, never derived after the fact.
