Experiment

From logly/mureo · View interactive version

Experiment is an AI agent skill from the GitHub repository logly/mureo. Design, run, and evaluate a controlled A/B test (split test) on your ad accounts with evidence discipline — one variable, a falsifiable hypothesis, a fixed window, and a per-variant outcome verdict. Use when the user asks to run an A/B test, split test, or experiment, to 'test whether X beats Y', to

How to use this skill

Skill file

Experiment

PREREQUISITE: Read ../_mureo-shared/SKILL.md for auth, security rules, output format, and Tool Selection (Read/Write on Code, mureo_strategy_* / mureo_state_* MCP on Desktop / Cowork).

Tool names below refer to the built-in platforms; a namespaced variant (see _mureo-shared → Namespaced built-in variants) is used with its prefix substituted.

Turn an ad-hoc change into a designed experiment. Most "we tried X and CPA moved" claims are noise — one variable was never isolated, the window was never fixed, and the decision was made by peeking. This skill enforces the discipline: a falsifiable hypothesis, exactly one variable, a success metric tied to a Goal, a pre-committed duration and sample floor, no peeking, and a per-variant verdict where inconclusive is a valid outcome.

Read ../_mureo-learning/SKILL.md first — its Observation Windows and Minimum Sample Sizes tables set the duration and sample floor this skill commits to, and its evidence lifecycle is the rulebook for the no-peeking rule below.

Prerequisites

Steps

Before you start: Run the Diagnostic preamble from ../_mureo-shared/SKILL.md — load learning insights (mureo_learning_insights_get) and consult advisors (mureo_consult_advisor) before drawing conclusions.

  1. Establish today: call mureo_state_get first, on every host (including Claude Code, where you would otherwise Read the file) and take server_now from its response — ISO 8601 with UTC offset, e.g. 2026-07-28T10:12:33+09:00. Its date is the only source of the current date for this run: the designed window's start_time / end_time, the observation_due you commit to in step 7, and the "has the window closed?" gate in step 9 are all measured from it. A stale date is not cosmetic here — it is how a test gets evaluated early, which is precisely the peeking failure step 8 forbids. Do not shell out (this skill must run in Bash-less headless hosts) and do not read the date off STATE.json — last_synced_at, reports.*.period and action_log timestamps are history, never evidence of what day it is now. Never write server_now into STATE.json: it is a response field, and a persisted copy becomes tomorrow's stale "today".
  1. Hypothesis intake — force a falsifiable statement. Take the hypothesis from the operator, from a /creative-refresh finding, or from a VALIDATED learning insight, and rewrite it into a single testable sentence with three explicit parts: variable (the ONE thing that differs), expected effect (direction + rough magnitude), and success metric (the number that decides it). Reject vague inputs ("make it better") — push back until it is falsifiable, e.g. "Video creative (variable) will lower CPA by ≥15% (effect) vs the current static image, measured on cost_per_conversion (metric)." If two things would differ, split into two experiments or drop one.
  1. Design — one variable, tied to a Goal. Confirm exactly one variable changes between variants (creative, headline, audience, placement, bid — not several at once; confounded designs are unattributable). Set the variant count (2 is the default; more variants need proportionally more sample and duration). Bind the success metric to a specific STRATEGY.md Goal so the winner means something (a CTR win that doesn't move the Goal's CPA/CV is not a win). Derive the minimum duration and sample floor from ../_mureo-learning/SKILL.md: creative/targeting changes need a 14-day window; the metric's sample floor (CPA: ≥30 conversions/variant; CTR: ≥1,000 impressions/variant; CVR: ≥200 clicks/variant) must be reachable within the window at current traffic — if it is not, say so and either extend the window or advise against running (an underpowered test wastes spend).
  1. Discover platforms. Identify configured platforms from STATE.json platforms. Include any hosted official-MCP connector present in the session (e.g. TikTok, key tiktok_ads) and mcp__mureo__<plugin>_* plugin platforms — but note honestly that a true randomized split-test tool only exists for Meta below; on other platforms the experiment is a manual/approximate construction (see ../_mureo-shared/SKILL.md → Hosted-connector platforms and Plugin platforms). mureo BYOD data lives in the workspace byod/ directory and is reachable only through mureo MCP tools — do not look for raw CSVs in the project directory.
  1. Setup — Meta (native split test). Meta has a real experiment engine. The variants are ad sets — the split-test tool references pre-existing ad sets and does not create them, so first make sure each variant exists as its own ad set (identical except for the one variable) via meta_ads_ad_sets_list / meta_ads_ad_sets_create. In BYOD mode the list response is wrapped as {"source": "byod_import", "as_of": <import time>, "data": [...]} — take the rows from data and treat them as of as_of, not as live. Then, after the approval gate (step 6), create the test with meta_ads_split_tests_create:

Inspect a running test with meta_ads_split_tests_list / meta_ads_split_tests_get. If mureo's Meta tools are unavailable (MUREO_DISABLE_META_ADS=1 after mureo providers add meta-ads-official), fall back to the official meta-ads-official hosted MCP for whatever experiment surface it exposes, and self-apply the guardrail/confirm rules yourself (mureo's PolicyGate cannot see that call).

  1. Setup — Google Ads (no split-test tool — honest manual paths). mureo ships no Google Ads campaign-experiment / drafts-and-experiments tool — there is no google_ads_experiment* in the tool surface, so do not invent one. Offer the operator the two honest alternatives and require explicit acknowledgment of their caveats before proceeding:

If neither caveat is acceptable, recommend not running the Google Ads experiment rather than shipping a test the operator will over-trust.

  1. Approval gate before ANY write. Setup steps 4–5 create/mutate platform state. Apply the Confirm Before Write Operations rule from ../_mureo-shared/SKILL.md: show the full design (variants, variable, split, budget, window, success metric, sample floor) and get explicit approval before creating any ad set, split test, or duplicated campaign. Respect Operation Mode and ## Guardrails (budget caps, blocked_operations); refuse a design that breaches them.
  1. Record the design in action_log. After the test is created, append one mureo_state_action_log_append entry per variant (or one entry capturing all variants) with metrics_at_action = the baseline per variant (the control's current cpa / conversions / ctr / impressions with their period, and the challenger's starting zero/baseline), command="/experiment", a summary naming the hypothesis, and observation_due = the designed end date (not a default 7/14). This is the commitment device that makes step 8's no-peeking rule enforceable and lets daily-check pick the evaluation up automatically. Give every entry a display line: display_title (at most 40 characters) and display_summary (at most 120) — what this action WAS, in the operator's words, as plain text with no markdown (**bold** reaches a person as asterisks). The dashboard row shows those two and stops there; the full summary is drill-down only, so keep writing it as fully as the next agent needs and let the display line be the short one. Over either bound the append is refused, never truncated.
  1. Interim rule — NO peeking-based decisions before the window closes. While the test runs, you may report interim numbers if asked, but you must refuse to call a winner or stop a variant early on them. State why: repeatedly checking and acting on a running test inflates the false-positive rate (the sequential-testing / "peeking" problem) — a lead that looks significant mid-flight reverses far more often than the confidence level implies. If a variant is causing genuine harm (runaway spend, a policy issue), that is an incident to escalate, not an experiment result — handle it via /rescue, and mark the experiment confounded.
  1. Evaluation — only when the window has closed. Once observation_due has passed — compare it against server_now's date from step 0, never against another action_log timestamp:
  1. Close out. Apply the outcome (approval gate): promote the winner (shift budget to it / adopt the winning creative or copy), and stop the losing variant (meta_ads_split_tests_end if ending a Meta study early is warranted, or pause the losing ad set / ad). Show current-vs-proposed and confirm before each mutation.
  1. Offer to save the finding via /learn. A closed experiment — winner, no-difference, or inconclusive-because-underpowered — is exactly the reusable know-how the knowledge base is for. Propose the generalized lesson (e.g. "Video beat static image by 22% CPA for this Persona — prefer video-first creative briefs") and, on approval, save it through the /learn flow (mureo learn add, per that skill's conventions — do not duplicate its steps here). Never record account IDs or personal data.
  1. Persist the report summary (best-effort): Call mureo_state_report_set with report="experiment" and a concise summary object so the read-only dashboard can render the experiment without re-running you. Follow this convention:

Reflect the FINAL state, and persist this LAST — after every action_log entry and any winner-promotion / loser-stop you applied this run. This is best-effort: if mureo_state_report_set is unavailable (e.g. a pure file-mode host without the context MCP), skip it silently — the rest of this skill still works.

  1. Persist the display contract (best-effort): Call mureo_state_display_set with what the DASHBOARD shows. This is a different audience from the summary above — STATE.json is written for the next agent, and this small bounded section is the only thing the operator's screen reads. Write it in the SAME pass as the report, from the SAME figures, and reach no new verdict here: every value below is one you already decided, and this step only renders it.

The bounds, verbatim from the tool: The dashboard reads THIS section and nothing else — keep your reasoning where it already goes. Every bound below refuses the write rather than truncating it, because a sentence cut in half is worse than a long one. nav_message: one line, at most 80 characters. highlights: at most 3 items of {tone, text}, tone one of good/watch/bad, text at most 60 characters. proposals: {title, body, status, date}, title at most 30 and body at most 80 characters, status one of proposed/done. breakdown.campaigns / breakdown.adgroups: rows of {name, spend, mcpa, target_cpa, state, note} — the three figures are raw numbers, state is one of target_met/improving/watch/worsening/no_data, note at most 40 characters. stated_values: {label, value}, label at most 24 characters and value a raw number or a string of at most 12 characters — a sentence there is refused, because it lands in a numeric column. Do NOT write the KPI funnel or the daily chart: mureo computes both from the stored totals.

Over a bound the write is REFUSED — shorten and rewrite, do not re-send the same sentence trimmed. Lead with the point and drop the connectives; a noun phrase is fine (CPA 12% over target, not The CPA is currently running about 12% above the target we agreed). Trimming one character at a time and calling again spends the run's context on a bound one rewrite would have met.

You may not be the first writer today. `display is REPLACED WHOLE and the last writer wins — there is no merge. Before you write it, read the current one (mureo_state_get). Of what another skill wrote TODAY, carry exactly one thing into your own write: its proposals that are still live — not yet done, and not contradicted by what you just found. Everything else you write from your own run alone, because a screen assembled from two runs shows a moment that never happened. And carry over NOTHING ELSE: never copy another skill's nav_message, highlights, breakdown or stated_values, which would put its judgement under your name when you cannot vouch for it. Name yourself in source` so the screen says whose answer it is.

This is best-effort: if mureo_state_display_set is unavailable (e.g. a pure file-mode host without the context MCP), skip it silently — the rest of this skill still works.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.