# Measure DNA: start prompts

Paste this into your AI after you unzip Measure DNA (vibedna.ai/store/measure-dna). It also comes inside the Store System, in the measure-dna/ folder.

There are two prompts. Paste the first one once, right after the unzip: it connects your store's database and your ad account and proves the numbers are clean. Paste the second one at the start of every day you want your AI to read how the store is selling.

## Prompt 1: setup (once)

```text
I just unzipped Measure DNA. It is an MCP that reads my store's own data: real sales next to ad spend, where buyers leave the payment, which version of a test wins, what happened to people who left an email, how a list mail did, and who is on the site right now. It only reads; it never changes my database, my ads or my mail list. Set it up with me now, one step at a time, and show me each change before you make it.

WHAT IT IS FOR
Measuring the same way every day, so a change is judged by numbers and not by feel. It reads three tables: events, purchases and mail_log. The store kit of the Store System writes them; any store that writes the same columns works (INSTALL.md section 6).

STEPS IN ORDER
1. Read INSTALL.md in full before anything else.
2. Python 3.10 or newer, then pip install -r requirements.txt. The payment robot (tools/pay_robot.py) needs Playwright too; install it only if I want test purchases.
3. Check my store's data: tell me whether my database has events, purchases and mail_log with the columns of INSTALL.md section 6. If the names differ, the keys schema, events_table, purchases_table, mail_log_table and buy_steps map them. If a table is missing, tell me what my store must write and stop there.
4. Settings: they go in ~/.measure-dna/config.json or in environment variables named MEASURE_ plus the key in capitals. Tell me which keys I need and where to find each value; I write the keys myself. Needed: supabase_url, supabase_key, utc_offset_hours, thankyou_prefix (/library, or /next/ with the upsell funnel). Optional: meta_token and meta_ad_account (ad numbers), meta_usd_rate (ad account not in USD), resend_key and resend_audience (is each lead on my list), stripe_key (new subscriptions after a mail).
5. Clean numbers: ask me which emails I test with and set test_email_patterns (regular expressions, for example "\\+test@"). Test visits carry ?test-run=1 or test=1 (test_query_markers).
6. Who is here: ask me where my plans, passes or memberships live. If they live in my database, write access_lookup and access_labels with me (INSTALL.md, section "Who is here"). If not, leave them out: who_is_here still shows what each person bought.
7. Add it to my AI app: the "measure-dna" entry of INSTALL.md section 3, with the full path to server.py. After a restart, run setup_status until every source I use says "ok" or "set".

WHAT TO CHECK FIRST
- That setup_status reads the database before any other tool runs.
- That a test purchase or a test visit does not count: run sales_by_day(days=1) after one, and if it counts, the test markers are wrong and we fix that first.
- Today's date and my time zone before you call a day good or bad.

NEVER
- Never ask me for a key in the chat, never print or summarize config.json or my environment, never commit them.
- Never write to my database, change an ad, a budget or a price, or send a mail. Measure DNA only reads; anything that changes the store waits for my explicit yes on the final version.
- Never run the payment robot against live keys: test mode and sandbox only.
- Never name a winner on small numbers: when a tool says "too few to decide", say exactly that.

HOW TO REPORT BACK
Result first, in plain words: what is connected (names only, never values), what setup_status says, and what is still mine to do. End with one question if something needs my decision.

FIRST TASK NOW
Run setup_status, then sales_by_day(days=7) and payment_dropoff(days=7). Tell me in four lines how the week went (sales from my purchases table, ad spend next to them) and where buyers stop.
```

## Prompt 2: every day (read the store)

```text
Read my store with Measure DNA. These rules come before anything else you do in this session.

WHAT IT IS FOR
Each tool answers one question the same way every time, from my own data. Money counts only from my purchases table; the ad platform's own number is shown next to it, never in its place.

WHEN TO USE WHICH TOOL
- Session start: setup_status. If a source I use is not ready, say which key and stop.
- "How is the week going": sales_by_day(days=7). Real sales per day next to ad spend and the ad platform's 7-day-click value. A "direct, first visit" buyer is often an ad click from another device: say so before calling a day bad.
- "Why do people not buy": payment_dropoff(days=7), visitor by visitor (page= for one page, split_by= for a test, the browser or the device). "Form never showed" is a broken or slow checkout; "saw the form, never touched it" is price or trust.
- "Card or PayPal, app or browser": payment_rails(days=30).
- "Which version wins": ab_test(test, days=14). For an offer after the purchase: entry="shown:<step>" and goal="product:<id part>".
- "Did the email step earn anything": email_leads(days=7). Only "bought later" counts for the email step.
- "How are the ads": ad_health(days=7): cost, click rate, frequency, learning, where the money went and the split per ad set and day.
- "How did that mail do": mail_campaign(campaign, subject, sent, since=<the minute it went out>). Judge a list mail at 48 hours and at 7 days, never in the first hours. Link scanners are counted apart from people.
- "Who is on the site now": who_is_here(minutes=30). A person identified by a mail click from the same connection can be the wrong person on a shared network: say so.
- "What did this buyer do": buyer(email).
- To measure a change from its minute: since="YYYY-MM-DDTHH:MM:SSZ" on any tool that takes since.

WHAT TO CHECK FIRST
Today's real date and my time zone (utc_offset_hours). A number in an old note is what was true then: read it live before you repeat it. Judge by the week, never by one day.

NEVER
- Never count revenue from anything but the purchases table.
- Never name a winner when the verdict says "too few to decide" or "leaning".
- Never write or print a key, and never paste a full email address of a customer into a report: the masked form is enough.
- Never change the store, an ad, a budget, a price or a mail without my explicit yes on the final version. Measure, propose, wait.
- Never promise sales. Report what was measured, with its source and its time.

HOW TO REPORT BACK
Result first, in plain words: sales this week and yesterday, ad spend next to them, where people leave the payment, which test leads and whether it is decided. Then at most two changes, each with the number that showed it and the number that should move. End with one concrete question: which change to make.

FIRST TASK NOW
Run setup_status and sales_by_day(days=7), tell me in four lines how the week is going and where buyers stop, then ask me what to look at first.
```
