PLAN.md, TEST.md and README: the Metrics changes from testing

Total spend from charges, MRR and cohorts on paid invoices, renewals as
existing customers, cohorts in full with dollars, and the start month's
cohort labelled. TEST.md gets checks for each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-30 13:07:46 -07:00
co-authored by Claude Opus 5.5
parent e320a64166
commit 185522c0c3
3 changed files with 53 additions and 14 deletions
+30 -8
View File
@@ -29,7 +29,7 @@ running a Federated Core can install as a CoreDesktop sibling.
| Teams and domains | A person can belong to several teams; each team works on **one website domain** (with its subdomains) (2026-11-25) | | Teams and domains | A person can belong to several teams; each team works on **one website domain** (with its subdomains) (2026-11-25) |
| Hosting (multi-tenant) | On a cloud, with **Garage** as the object storage we install, and the cloud's managed Postgres (2026-11-25) | | Hosting (multi-tenant) | On a cloud, with **Garage** as the object storage we install, and the cloud's managed Postgres (2026-11-25) |
## Where things stand (2026-11-26) ## Where things stand (2026-11-30)
**Every phase is built, 0–14**, Phase 12's part 5 (roles from the Core's **Every phase is built, 0–14**, Phase 12's part 5 (roles from the Core's
groups) included, and all of it is merged into `main` and pushed (the user groups) included, and all of it is merged into `main` and pushed (the user
@@ -56,6 +56,26 @@ writes the post; the user pastes each subreddit's rules once (kept in
filled in or copies the title and text, posts, and marks it posted. The filled in or copies the title and text, posts, and marks it posted. The
warnings come from the pasted rules and the posts marked as posted. warnings come from the pasted rules and the posts marked as posted.
**Metrics, from testing (2026-11-30).** Fixes from looking at the live
Stripe data:
- *Customers* means those who have spent more than $0, as Stripe counts
total spend: successful charges, captured less refunded. The sync now
reads charges too (`KindCharge`, and their events); sync state version
2 makes an older database read everything once. `metrics.Spenders`
serves the Stripe card's count and Metrics → Customers.
- MRR and cohorts count only **paid** invoices (open ones count once
paid).
- A customer whose earliest recurring invoice is a renewal
(`subscription_cycle`) was a customer already: their first payment is
reactivation (move `existing`, `Model.Existing`), not new, and puts them
in no cohort. A $0 trial signup before it still makes them new. On the
live data, 38 customers.
- Cohorts show every cohort to the latest month, each as two rows: the
share of starting MRR, and the dollars (`Cohort.MRR`). The start month's
cohort is labelled *existing customers* (`Model.Base`). The CSVs follow.
- The live data shows yearly Federated - Good renewals at $700 since July
2026 (it was $70, then $190 from March): for the user to confirm.
**Next: testing by hand with TEST.md**, in three passes: local, then **Next: testing by hand with TEST.md**, in three passes: local, then
server with the Core, then multi-tenant (TEST.md's table says which server with the Core, then multi-tenant (TEST.md's table says which
sections go with each pass). What the passes find gets fixed as it comes. sections go with each pass). What the passes find gets fixed as it comes.
@@ -1129,7 +1149,8 @@ into `main`. **Parts 1 to 6 built, and merged into `main` on 2026-11-22**
descriptions). Products are read on every sync; without Products descriptions). Products are read on every sync; without Products
access, the sync says so and names come from the line access, the sync says so and names come from the line
descriptions. `metrics.Products` lists each product's last 12 descriptions. `metrics.Products` lists each product's last 12
months billed (paid and open invoices). Margins are a default plus months billed (paid and open invoices; MRR, since 2026-11-30, paid
only). Margins are a default plus
per-product overrides, under Metrics → Gross margin by product. per-product overrides, under Metrics → Gross margin by product.
`WeightedMargin` gives the revenue-weighted margin. `WeightedMargin` gives the revenue-weighted margin.
- On the live account, the first full sync read 857 customers, - On the live account, the first full sync read 857 customers,
@@ -1143,8 +1164,8 @@ into `main`. **Parts 1 to 6 built, and merged into `main` on 2026-11-22**
- **Built 2026-11-22** (no schema change): - **Built 2026-11-22** (no schema change):
- `metrics.Build` measures each customer's MRR at each month's last - `metrics.Build` measures each customer's MRR at each month's last
second (the current month: now). It sums the recurring lines of second (the current month: now). It sums the recurring lines of
paid and open invoices in the main currency whose period covers paid invoices in the main currency whose period covers that moment
that moment. (open ones too, until 2026-11-30).
- A normal line is divided by its interval (a year counts as 12 - A normal line is divided by its interval (a year counts as 12
months, a week as 52/12). A proration is spread over its actual months, a week as 52/12). A proration is spread over its actual
part-period, so an upgrade counts from its day. Under a cent counts part-period, so an upgrade counts from its day. Under a cent counts
@@ -1155,7 +1176,7 @@ into `main`. **Parts 1 to 6 built, and merged into `main` on 2026-11-22**
paid then. NRR over 12 months is what the customers of 12 months paid then. NRR over 12 months is what the customers of 12 months
ago pay now ÷ what they paid then. ago pay now ÷ what they paid then.
- Cohorts are by the first paid month, with the retained share of - Cohorts are by the first paid month, with the retained share of
starting MRR for up to 12 months. starting MRR (since 2026-11-30: and the dollars, every month).
- **Start month.** When 20+ customers and most of the MRR appear as - **Start month.** When 20+ customers and most of the MRR appear as
new in one month, the app suggests counting from it. That's what new in one month, the app suggests counting from it. That's what
happened in January 2025 on the live account: billing came back to happened in January 2025 on the live account: billing came back to
@@ -1174,8 +1195,9 @@ into `main`. **Parts 1 to 6 built, and merged into `main` on 2026-11-22**
tie. tie.
- **Built 2026-11-22** (schema 20: `crm_matches`, the user's choices - **Built 2026-11-22** (schema 20: `crm_matches`, the user's choices
only): only):
- `metrics.Matches` matches every customer with a paid or open - `metrics.Matches` matches every customer who has spent more than
invoice, in this order: $0 (until 2026-11-30: every customer with a paid or open invoice),
in this order:
1. the user's choice; 1. the user's choice;
2. an Account Hermes created from here (a done `stripe-customer:` 2. an Account Hermes created from here (a done `stripe-customer:`
CRM action); CRM action);
@@ -1258,7 +1280,7 @@ into `main`. **Parts 1 to 6 built, and merged into `main` on 2026-11-22**
CLV:CAC. CLV:CAC.
- `metrics.Export` writes eight tables as CSV, amounts in dollars: - `metrics.Export` writes eight tables as CSV, amounts in dollars:
MRR month by month (every month), NRR by cohort and revenue by MRR month by month (every month), NRR by cohort and revenue by
cohort (24 months), CAC by month and by channel, the spend log, cohort (every cohort, every month, since 2026-11-30), CAC by month and by channel, the spend log,
products and margins, and customers with their MRR and CRM match. products and margins, and customers with their MRR and CRM match.
Each is downloaded at `/metrics/export/<name>.csv`, linked under Each is downloaded at `/metrics/export/<name>.csv`, linked under
its table. its table.
+3 -2
View File
@@ -144,10 +144,11 @@ Edit the brief and answer those questions ("not tested" is a fine answer), then
- **Bing:** with a Bing Webmaster API key (Settings → Search engines), Bing's weekly clicks and impressions, its top searches, and its crawl issues. - **Bing:** with a Bing Webmaster API key (Settings → Search engines), Bing's weekly clicks and impressions, its top searches, and its crawl issues.
**Metrics (Metrics).** With the Stripe key from Settings → Website & sales (give it read access to Customers, Invoices, Credit notes, Charges and Refunds, and Events too), Supermarket reads your whole Stripe history once, then the changes every hour. Under *Gross margin by product*, each product shows what it billed over the last 12 months; give each its margin (what you keep after the cost of delivering it), or leave it at the default, 60%. CLV uses them. Metrics shows: **Metrics (Metrics).** With the Stripe key from Settings → Website & sales (give it read access to Customers, Invoices, Credit notes, Charges and Refunds, and Events too), Supermarket reads your whole Stripe history once, then the changes every hour. Under *Gross margin by product*, each product shows what it billed over the last 12 months; give each its margin (what you keep after the cost of delivering it), or leave it at the default, 60%. CLV uses them. Metrics shows:
- MRR today, ARR, the number of paying customers, the average per customer, and NRR for the month and over 12 months; - MRR today, ARR, the number of paying customers, the average per customer, and NRR for the month and over 12 months (MRR counts paid invoices only);
- a 24-month chart; - a 24-month chart;
- each month's movements (new, expansion, contraction, churn, reactivation), with a page per month listing each customer's move; - each month's movements (new, expansion, contraction, churn, reactivation), with a page per month listing each customer's move;
- cohorts by the month customers first paid, with the share of their starting MRR they still pay. - cohorts by the month customers first paid, followed to the latest month: the share of their starting MRR they still pay, and the dollars. With a start month set, its cohort is the existing customers; a customer whose first invoice in Stripe is a renewal was a customer already, and counts as reactivation, not new;
- a customer count that, like Stripe's, takes only customers who have spent more than $0 (payments less refunds).
MRR is built from the invoice lines (each recurring line's amount after discounts, spread over its billing period), so past months are exact. *Spend and CAC* (under Metrics): log what marketing and sales cost each month, by channel, by hand or by pasting a CSV (`month,channel,amount,note`). origami.chat and explee.com campaign spend comes in on its own. CAC is the month's spend over the customers who first paid that month, with a steadier three-month figure. Over the last 12 months it's also shown per channel, using each new customer's first step in the funnel (a reply, a visit, an outreach email), matched by email. MRR is built from the invoice lines (each recurring line's amount after discounts, spread over its billing period), so past months are exact. *Spend and CAC* (under Metrics): log what marketing and sales cost each month, by channel, by hand or by pasting a CSV (`month,channel,amount,note`). origami.chat and explee.com campaign spend comes in on its own. CAC is the month's spend over the customers who first paid that month, with a steadier three-month figure. Over the last 12 months it's also shown per channel, using each new customer's first step in the funnel (a reply, a visit, an outreach email), matched by email.
+20 -4
View File
@@ -511,8 +511,12 @@ Throughout, also notice:
- [ ] With the Stripe key's read access widened (Customers, Invoices, Credit - [ ] With the Stripe key's read access widened (Customers, Invoices, Credit
notes, Charges and Refunds, Events), Metrics → *Sync now* reads your notes, Charges and Refunds, Events), Metrics → *Sync now* reads your
whole history the first time and says so. whole history the first time and says so.
- [ ] The counts of customers, invoices, credit notes and refunds match - [ ] The counts of invoices, credit notes and refunds match Stripe's
Stripe's dashboard (draft invoices aren't counted). dashboard (draft invoices aren't counted).
- [ ] After the first sync with this version (it reads everything once,
charges included), *Customers* matches Stripe's customer list
filtered to total spend above $0, and says "of N in Stripe" (deleted
customers left out). *Payments* counts the charges.
- [ ] A later *Sync now* applies only the changes since the last one; a - [ ] A later *Sync now* applies only the changes since the last one; a
payment or refund made in Stripe shows up within the hour. payment or refund made in Stripe shows up within the hour.
- [ ] The currencies listed are the ones you bill in. - [ ] The currencies listed are the ones you bill in.
@@ -524,8 +528,13 @@ Throughout, also notice:
### MRR, movements and NRR ### MRR, movements and NRR
- [ ] Metrics shows MRR today, close to Stripe's own MRR figure (Billing → - [ ] Metrics shows MRR today, close to Stripe's own MRR figure (Billing →
Overview). Small differences come from how each counts prorations and Overview). Small differences come from how each counts prorations,
open invoices. and Supermarket counts only paid invoices.
- [ ] A customer with only an unpaid (open) invoice isn't in MRR or any
cohort; once it's paid, they are.
- [ ] A customer whose first invoice in Stripe is a renewal shows as
*existing* in that month's moves, counted under reactivation, not
new, and is in no cohort. One with a $0 trial before paying is new.
- [x] The month-by-month table's net change adds up: new + expansion + - [x] The month-by-month table's net change adds up: new + expansion +
reactivation − contraction − churn. reactivation − contraction − churn.
- [ ] Open a month: each customer's move is listed with the MRR before - [ ] Open a month: each customer's move is listed with the MRR before
@@ -534,6 +543,11 @@ Throughout, also notice:
from that month appears; *Count from …* makes those customers the from that month appears; *Count from …* makes those customers the
starting base, and the suggestion goes away. starting base, and the suggestion goes away.
- [x] Cohorts start at 100% in their first month. - [x] Cohorts start at 100% in their first month.
- [ ] Cohorts list every cohort, each followed to the latest month. Each
is two rows: the percentages, and the dollars lined up under them;
the month, customers and starting MRR sit across both.
- [ ] With *Count from* set, that month's cohort says *existing
customers*; with it cleared, none does.
### Spend and CAC ### Spend and CAC
@@ -576,6 +590,8 @@ Throughout, also notice:
- [x] Before Hermes has copied the CRM, Metrics → Customers and the CRM says - [x] Before Hermes has copied the CRM, Metrics → Customers and the CRM says
no Accounts are copied, and lists every customer with billing. no Accounts are copied, and lists every customer with billing.
- [ ] It lists only customers who have spent more than $0: not trials,
not ones with only unpaid invoices, not ones refunded in full.
- [ ] Once Accounts are copied (after the CRM bridge works), customers are - [ ] Once Accounts are copied (after the CRM bridge works), customers are
matched by stored ID, email or domain; check a few against EspoCRM. matched by stored ID, email or domain; check a few against EspoCRM.
Gmail-style addresses never match by domain. Gmail-style addresses never match by domain.