Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions src/recipes/product-support/skills/echo-readonly-postgres/skill.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,34 @@ PGOPTIONS="-c default_transaction_read_only=on -c statement_timeout=15000" \
- **Participant Speech is Personal Data (PII):** Use this dialogue locally in your session context to understand the *why* and *who*.
- **Never paste raw transcript dialogue into Slack** unless it is an internal developer/test conversation or has zero PII. Instead, summarize the findings or quote the specific key technical phrases anonymously (e.g., "The host confirmed they want to migrate database hosts from DO to OVHcloud").

## SaaS Revenue Queries & MRR Reporting

When calculating active subscriptions and Monthly Recurring Revenue (MRR) metrics from the `billing_account` table:

### Exclude Internal and Test Organizations

- **CRITICAL RULE:** Internal and test organizations (such as Jorim Theuns' internal subscription or test organizations created for development) must **never** be counted in any revenue, MRR, or checkout numbers posted to the team (such as in `#alerts-revenue_updates` or `#revenue`).
- **How to display:** If you want internal/test accounts visible at all, you must put them on their own separate lines below, clearly marked as internal and excluded from the total. Headline the post using the true self-serve customer MRR only.
- **Why this matters:** Revenue channels exist as a morale signal, meaning these figures get quoted onward, remembered, and relied upon. Presenting inflated numbers (even by a small amount like €86) damages the credibility of *every* figure posted afterwards if someone notices the inflation later. It is always better to under-claim and be trusted than to over-report.

### Typical Billing Queries

Use this query format to view active paying subscriptions and filter out known internal/test organizations:

```sql
SELECT
ba.id AS billing_account_id,
o.name AS org_name,
ba.seats,
ba.amount_mrr
FROM billing_account ba
JOIN org o ON o.id = ba.org_id
WHERE ba.status = 'active'
-- Exclude known test and internal subscriptions
AND o.name NOT LIKE '%test%'
AND o.name NOT IN ('Jorim Theuns', 'Sameer Test');
```

## Operator-authorized writes (the override)

Reads-only is the default, not an absolute. A write is allowed when —
Expand Down
Loading