Orchestrator
Calls the /jobs/* endpoints on the FastAPI worker with X-Worker-Token auth. Every call idempotent — re-runs never double-execute, never double-log.
// otto
Otto orchestrates the daily cycle, kicks off jobs, and answers your questions in decision rows — not paragraphs. Morning sync at 06:00, research at 11:00, discount cycle at 16:00. Always within policy.
// what otto does
Calls the /jobs/* endpoints on the FastAPI worker with X-Worker-Token auth. Every call idempotent — re-runs never double-execute, never double-log.
Runs the daily cycle on cron — morning sync, research lane, discount window. Each cycle takes a store_lock so two timers can't stomp each other.
Conversational layer reads decision_log + ad_decision_log + cs_thread_evaluations. Answers in citations, not paragraphs.
// daily cycle
06:00 daily
catalog_sync + performance_sync pull last 24h of Shopify + Google Ads into Supabase.
self_calibrator recomputes p75 winner floor + thresholds from rolling 28d distribution.
classifier reassigns WINNER / MID / LOSER / INSUFFICIENT_DATA per variant.
decision_engine emits Action per SKU. Phase 1: dry-run. Phase 2: executor applies.
Campaign Specialist runs planner-judge per channel. Creative briefs queue, audiences refresh.
11:00 daily
Researcher walks 6 discovery lanes — Meta Library, AliExpress, competitor BS, frequency, organic, spy tools.
candidate_scorer ranks by margin × uniqueness × market-fit. supplier_matcher cross-refs via DataForSEO.
research_candidates table populated. Top picks land in /dashboard/candidates for operator review.
16:00 daily
Catalog discount_executor checks open discount windows. Margin-tier gated, time-bounded.
Windows past their TTL fire PRICE_RESTORE — pre-stored reversal op, no improvisation.
OPTIMIZE_CYCLE_FAILED SKUs from morning cycle get fresh discount tests, capped by rate limit.
// example conversations
// citation discipline
Otto won't answer a question about a move without citing the row. If the row doesn't exist, the answer is “I don't have a row for that” — never a hallucinated number.
That's the contract. Operator trust scales with citation fidelity. Otto reads the audit plane the same way an analyst would read a ledger — and outputs answers that link back to it.
// quote from the docs
“Otto's job is to be the keyboard shortcut for the audit plane. If you can't click through from an answer back to a row, the answer wasn't real.”
“Otto answers my CFO's questions before they hit Slack. Every reply comes with the decision_log row attached. That's what 'AI for ecommerce' was supposed to mean from day one.”
// otto
Otto runs the daily loop, answers the board, kicks off the research lane, and never moves a euro without an audit row to back it up.
Cited answers · Cron-scheduled · Reversible