Sync
catalog_sync pulls Shopify products, variants, and cost_per_item into the products table with Tier A cost confidence. performance_sync ingests Shopify orders + Google Ads spend into performance_daily per (date, variant_id).
// catalog specialist
Sync, classify, decide, execute — every product moves through one lifecycle state, gated by ALLOWED_TRANSITIONS, with a reversible decision row attached. Margin-aware. Tier-gated. Append-only.
product : "Brushed Linen Throw — Sand"
variant : 'SKU-LIN-228-SND-L'
from_state : ACTIVE
to_state : ON_DISCOUNT
action : DISCOUNT_TEST
delta : −15% (€89 → €76)
window : 14d, auto-revert
reason : OPTIMIZE_CYCLE_FAILED (2 cycles)
margin tier = A (verified)
p75 winner floor = 2.4x ROAS
current ROAS = 1.6x (28d)
evidence : [perf#9123, cycle#771, judge=0.88]
applied_at : 2026-05-25T08:02:14Z
applied_by : catalog_agent.discount_executor
status : APPLIED (live)
reversal : PRICE_RESTORE on day 14// what it does
catalog_sync pulls Shopify products, variants, and cost_per_item into the products table with Tier A cost confidence. performance_sync ingests Shopify orders + Google Ads spend into performance_daily per (date, variant_id).
self_calibrator derives thresholds from your store's own performance distribution — winner floor at p75, loser floor at p25, no hardcoded ROAS rules. classifier assigns WINNER / MID / LOSER / INSUFFICIENT_DATA / SEASONAL every cycle.
decision_engine emits an Action enum per SKU — KEEP, SCALE_WINNER, OPTIMIZE_LOSER, DISCOUNT_TEST, DRAFT, VAULT, REVIVE_SEASONAL, FLAG_ORPHAN. Every action validated against ALLOWED_TRANSITIONS before write.
action_executor mutates Shopify (draft / publish / edit). discount_executor changes prices. copy_rewriter rewrites titles + descriptions via LLM, gated by trademark filter and uniqueness check.
// the real product

// product deep view
Revenue, spend, ROAS, and orders per day — the same window the classifier reads.
Per-variant performance at a glance — the size that carries the product and the color that drags it.
Every lifecycle move, price change, and copy rewrite the agent made on this SKU — with its evidence.
Each generated title and description is versioned, so you can compare what shipped and roll back.
// lifecycle state machine
Fresh import, awaiting first decision.
Live on storefront, gathering signal.
Selling within range — keep cycle.
Copy or pricing under iteration.
Discount window open, time-bounded.
Unpublished, removed from catalog.
Parked off-season — auto-revived ~6 weeks before its peak.
Permanently removed, recoverable on request.
AUDIT → PUBLISHED, DRAFTED, FLAG
PUBLISHED → ACTIVE, DRAFTED, OPTIMIZING
ACTIVE → OPTIMIZING, ON_DISCOUNT,
DRAFTED, ARCHIVED
OPTIMIZING → ACTIVE, ON_DISCOUNT, DRAFTED
ON_DISCOUNT → ACTIVE, DRAFTED, ARCHIVED
DRAFTED → PUBLISHED, SEASONAL_VAULT,
ARCHIVED
SEASONAL_VAULT → PUBLISHED (window only),
ARCHIVED
ARCHIVED → DRAFTED (operator-only)
validate(from, to) → bool
invalid → review row, not mutation// action enum
| Action | What it does | Valid from | Trigger |
|---|---|---|---|
| KEEP | Continue selling at current price. | PUBLISHED, ACTIVE | Within ROAS band |
| SCALE_WINNER | Flagged for budget lift on paid side. | ACTIVE | ROAS > p75 winner floor |
| OPTIMIZE_LOSER | Copy + image regenerate cycle. | ACTIVE, ON_DISCOUNT | ROAS < floor, 14d window |
| DISCOUNT_TEST | Time-bounded price test, margin gated. | OPTIMIZING | OPTIMIZE_CYCLE_FAILED |
| DRAFT | Unpublish from storefront. | ON_DISCOUNT, ACTIVE | SALES_ZERO_N_DAYS |
| VAULT | Park as seasonal candidate. | DRAFTED | Seasonal pattern detected |
| REVIVE_SEASONAL | Republish ahead of season window. | SEASONAL_VAULT | ~6 weeks before seasonal peak |
| FLAG_ORPHAN | Missing cost data — operator review. | AUDIT | Tier C cost confidence |
// cost confidence
// data source
Shopify cost_per_item field, confirmed per variant.
// what is allowed
All actions enabled — price changes, scale, archive, publish.
// data source
Supplier cost discovered via reverse-image match against supplier sites.
// what is allowed
Performance-based actions only — KEEP, OPTIMIZE, FLAG_ORPHAN. No price or discount writes.
// data source
Missing or unverifiable cost — orphan SKU.
// what is allowed
State-based actions only — publish/draft moves. No performance or price decisions without operator review.
Why this matters. Most catalog tools assume your cost data is right. Magistry assumes it isn't — every SKU is scored, every write is gated, and a Tier-C product never gets a discount on its own. Your margin policy is enforced in the type system.
// built to be trusted
Dead SKUs get archived and every move is a row you can see and reverse. The cost-confidence tier gate refuses to discount orphan-cost products, so price moves stay bounded to SKUs with a known landed cost — the kind of guardrail that gets finance comfortable with autonomy.
// catalog specialist
Connect a read-only Shopify token and the Catalog Specialist will draft its first audit cycle inside an hour — every SKU classified, every action explained, zero mutations until you flip the switch.
Dry-run by default · Append-only logs · One-click rollback
We use cookies to run this site, to see which pages help, and to measure which ads bring people here. You choose per category; everything except the strictly necessary is off until you say otherwise. Cookie policy · Privacy