Skip to main content
Developer docs
core/catalog

Action enum

The full move set the decision engine can emit — one recommended action per product per cycle, each tied to a trigger and a lifecycle transition.

Actions are the verbs the decision engine can emit. Each is bound to the trigger that fired it and to a valid lifecycle transition, and lands in decision_log as evidence.action. There is no free-form action — if it isn't in the enum, the agent can't do it.

The move set

  • keep / wait — no-op with a logged rationale (the agent considered and declined, or is waiting for more data).
  • scale_winner — surface a winner for variant and related-product research.
  • optimize_loser — copy/image rewrite cycle.
  • discount_test — temporary price drop; the only price action, Tier A cost confidence only.
  • draft / vault — pull from the feed, or hold for the season.
  • revive_seasonal — bring a vaulted product back.
  • flag_orphan — zero traffic; needs SEO/copy work or deletion.

The enum, verbatim

decision_engine.Actionpython
class Action(str, Enum):
    KEEP = "keep"
    SCALE_WINNER = "scale_winner"
    OPTIMIZE_LOSER = "optimize_loser"
    DISCOUNT_TEST = "discount_test"
    DRAFT = "draft"
    VAULT = "vault"
    REVIVE_SEASONAL = "revive_seasonal"
    FLAG_ORPHAN = "flag_orphan"
    WAIT = "wait"

Reversal is derived, not stored: because every action verb has a known inverse (a draft or vault republishes, a discount_test restores the price, an optimize_loser restores the previous content version), the revert executor computes the undo from evidence.action at revert time and stamps reverted_at on the row.

// developer docs

Magistry runs your store. We run Magistry.

The SDK is the same one our worker uses in production. Same auth, same rate limits, same audit plane — no shadow surface.

Stable for a year · Versioned changelogs · No silent breaking changes