MarketMirror

v0.5.0
io.github.DarkWorldCoder/market-mirror Checked 15 hours ago Published 13 hours ago

Test ads, prices and sales pitches on simulated buyers; get a go / iterate / no-go report.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

website_test

Run prepared synthetic visitors on a real website URL. Actions and screenshots are observed; only supplied DOM checks verify goals. Cart changes are enabled by cart/checkout goals; signup submission requires explicit test data and opt-in. No payments/orders. Background job: poll job_status.

ParameterTypeDescription
simulation_id *string
spec *object
outstring

provider_setup

List provider choices and official key guides, inspect masked local settings, configure a local model or an existing key environment variable, or discover available models. Never paste an API key into tool arguments. ChatGPT/CLI login choices return local login commands.

ParameterTypeDescription
action *string
base_urlstring
key_envstringEnvironment variable NAME only; never the key itself
modelstring
providerstring

doctor

Check MarketMirror: engine installed, Python deps, API key configured (never shown), backend running.

setup

Install or update the MarketMirror engine (git clone + uv sync). Background job; poll job_status. Needs git and uv.

start_backend

Start the MarketMirror backend (port 5001). Configure an API-key, eligible ChatGPT sign-in, local CLI gateway, or local-model provider first.

market_test

All-in-one market test. Config keys: name, title, seeds (absolute paths to documents), requirement (text), personas (persona spec object or absolute path) or auto_personas (int), creatives (feed-test object with creatives, landing, benchmarks), seeds_n (int, repeat the feed test with N seeds and report ranges), rounds (int), survey {offer, goal, messages (list), split, pricing}, panel {analysts, brief}, report (bool), simulation_id (reuse), approve_spend (bool). Without approve_spend it stops after creating the personas so you can show them to the user; then call again with simulation_id and a…

ParameterTypeDescription
config *object

job_status

Status, log tail and final result of a background job.

ParameterTypeDescription
job_id *string

results

Key results of a run: decision, verdicts, segments, objections, messages, pricing, feed-test metrics, ROI projections, files.

ParameterTypeDescription
run *stringrun name under mirofish_runs or absolute path

list_runs

List previous runs with their decision.

start_live

Serve the live dashboard at http://127.0.0.1:5050/ (newest run, or a given run).

ParameterTypeDescription
runstring

ads_import

Turn a Meta/Google Ads export (CSV or JSON, absolute path) into a seed Markdown file plus benchmarks JSON.

ParameterTypeDescription
file *string
out *stringabsolute path of the seed .md to write

campaign_plan

Save an evidence-led campaign plan and runnable test specs from a profile or existing project. No campaign is sent.

ParameterTypeDescription
budget *object
goal *string
channelsarray
outstring
profileobject
profile_filestring
projectstring
researchobject
research_filestring

actuals_import

Normalize a local ads, email, website, CRM or survey CSV/JSON export, retaining provenance and row-level validation errors.

ParameterTypeDescription
file *string
source_type *string
datestring
mappingobject
marketstring
outstring
qualitystring
sourcestring

holdout_backtest

Evaluate independent held-out real experiments against a training-mean no-persona baseline.

ParameterTypeDescription
pairs *array
outstring

backtest

Score a run's feed test against real ad results (from ads_import): rank correlation, winner match, calibration.

ParameterTypeDescription
actuals *string
run *string
maparray

understand

Step one for any product: read the user's documents (absolute paths to .md/.txt), a landing page URL and/or an ads export into one product profile (what it is, for whom, pricing, offer, proofs, differentiators, competitors, channels, likely objections, brand voice, KPIs, unknowns). Every later step uses it. Synchronous, one Claude call. Writes product_profile.json; pass `project` instead of docs to profile an existing project (also seeds the market map before the graph build).

ParameterTypeDescription
ads_filestring
docsarray
namestring
outstring
projectstring
urlstring

quickstart

Easiest start. Answer a few questions and get a ready scenario folder (brief, personas, two template captions per platform, messages, launch calendar, pitch) plus the simulated people (stops before any paid rounds). Keys: brand, product (what, for whom, price), buyers (who and where), platforms (comma list), tests (ads, messages, price, launch, pitch), budget ('300 USD'), size (small|medium|large), past_ads (absolute path, optional), docs (paths, optional). Background job; poll job_status. The result names the files to edit and the exact next command.

ParameterTypeDescription
answers *object
from_docsarraydocuments to understand first; prefills the answers
no_runboolean
urlstring

pitch

Sales rehearsal: pitch a script to every simulated buyer of a simulation (its environment must be alive: run market_test with rounds first, or start it), collect objections and the questions they ask back, then answer with rebuttals ({objection_type: text, '*': generic}). Scores the pitch, each rebuttal, and every person (lead score). Background job.

ParameterTypeDescription
script *string
simulation_id *string
channelstring
productstring
rebuttalsobject
runstring
segmentstring

ideas

Next test ideas from real data: pass ad rows you fetched from a connected ads tool (Meta/Google/TikTok: name, campaign, spend, impressions, clicks, conversions, country...) and/or an export file path, plus a previous run (its objections, audiences and decision). Returns prioritised experiments, each citing its evidence, with the MarketMirror config to simulate it first. Writes ideas.json/.md into the run folder and adds a 'Test ideas' section to the dashboard.

ParameterTypeDescription
ads_filestring
brandstring
briefstring
ninteger
rowsarray
runstring

push_context

While a simulation is running (or before it starts), push what people are saying today into every persona card from the next round on: a news item, a competitor's move, a real thread you just read with your browser, a price change. Each update is one or two sentences; the runner re-reads the file every round. Use it to ground the rounds in live reality.

ParameterTypeDescription
simulation_id *string
text *string
roundinteger
sourcestring

research

What real people say about a product, category or competitor, from public keyless sources: Hacker News stories and comments, App Store listings and recent reviews for a country storefront (in, ph, ke, us...), Reddit public search when it answers (it often blocks non-browser clients; the result says so, then use your own browser tools and add what you find as seed files), and any page URLs. Writes research.md (themes with quotes and links), research.json and voices.json (short real quotes the personas and feeds draw on) under scenarios/<query>/research. Run it before planning personas.

ParameterTypeDescription
query *string
countrystring
outstring
sourcesstring
subredditsarray
urlsarray

predict

Predictions with intervals for a run: CTR per ad, cost per lead, would-convert overall and per audience, email click rates, each scaled by the real-vs-simulated results stored so far (from backtest and calibrate) and labelled with its basis ('calibrated on N real results' or 'uncalibrated prior'); optional targets (e.g. {ctr: 2, cpl: 10}) give a probability of success. Also a 30/60/90-day adoption forecast from the best ad, its landing conversion and the word of mouth seen in the rounds.

ParameterTypeDescription
run *string
brandstring
daysinteger
spendnumber
targetsobject

study

Several scenarios x several seeds on the same simulated people, one defended conclusion. spec: {name, base (a market_test config object: creatives, survey, pitch, emails, rounds...), simulation_id (the people to reuse), scenarios: [{name, overrides}], seeds: [1,2,3], steps: [feed_test, rounds, survey, pitch, email_test]}. Writes study_summary.json (per-scenario mean, spread and 95% interval of every metric, deltas, winner stability, decision agreement matrix, conclusion with confidence), study_report.md and study.html under mirofish_runs/<name>/. Finished cells are reused on rerun. Background…

ParameterTypeDescription
spec *object
outstring

run_test

Test anything from one spec on a prepared simulation: type = ad | message | price | offer | positioning | naming | landing | launch | pitch | email | creator_post | channel_mix; variants = the things to compare (ad creatives, message lines, prices, offer wordings, names, landing pages, launch posts with rounds, pitch scripts, emails); audience {segments, countries}; metric (default per type); budget {amount, cpm, currency}; rounds (launch). Returns one result shape for every type: each variant's metric with a 95% margin, the winner, the lift, whether it is clear or a tie, and how to read it. B…

ParameterTypeDescription
simulation_id *string
spec *object
brandstring
runstring

email_test

Email campaign test on the simulated people's inboxes: pass emails [{id, from_name, subject, preheader, body, cta, send_time (morning|midday|evening|night), segments?, sequence?: [{delay_days, subject, body}]}] plus optional list_size and benchmarks {cost_per_send, lead_value, close_rate, deal_value}. Each person gets a realistic inbox for the day; an attention gate decides opens, Claude decides skim/read/click/reply/unsubscribe/spam with honest odds. Returns open, click, click-to-open, unsubscribe and spam rates per variant and audience, subject-line ranking, sequence funnel, projection from…

ParameterTypeDescription
emails *array
simulation_id *string
benchmarksobject
list_sizeinteger
runstring

calibrate

Check a run's simulated survey against real answers (absolute path to a CSV with segment,country,gender,age,y where y is yes/maybe/no or 0-1; 50-300 rows is enough): covariate overlap, per-audience calibration, a trust / correct / walk-away verdict and an AIPW-corrected rate. Writes calibration.json into the run folder.

ParameterTypeDescription
real_csv *string
run *string
bystring
fieldstring
maparray

cli

Advanced: run any MarketMirror CLI command as a background job, e.g. ['survey','--simulation','sim_x','--offer','...']. See CLAUDE.md in the engine.

ParameterTypeDescription
args *array