Skip to content

feat(onboarding)!: customer deep dive runs on PostHog only (2.0.0) - #234

Merged
danieldanilov merged 1 commit into
mainfrom
onboarding/deep-dive-v2-posthog-only
Oct 20, 2026
Merged

danieldanilov merged 1 commit into
mainfrom
onboarding/deep-dive-v2-posthog-only

Conversation

@danieldanilov

Copy link
Copy Markdown
Contributor

Vitally was turned off at PostHog on 16 October 2026, and this skill was built on it. 2.0.0 reads only PostHog's own data, and the onboarding team's whole record now lives in PostHog, so the skill can finally see what onboarding itself sent and what happened after.

All changes are in skills/team/onboarding/posthog-customer-deep-dive/, plus the marketplace description and the onboarding folder README.

What it reads now

  • Account state from Customer Analytics (system.accounts: tags, relationships, custom properties, notes, tasks, meetings, feature requests) and the onboarding model onboarding_accounts_v8 (stage, eligibility, forecast, cooldown, engagement), with PostHog's own health score.
  • What onboarding sent: every Onboarding:: workflow email, stage change, tag and owner change on the account (the $workflows_* and $account_* events), and when the Email sequence wakes next.
  • The comms record from the email sync (posthog_conversations_email_thread*), labelled by who wrote (onboarding, the rest of PostHog, the customer), plus the two frozen archives for anything before the cutover.
  • Money from the live invoice tables (postgres.revenue.invoice and its line items), the open billing period, credits and runway. Dates are UTC days, the way the invoice shows them, and a paid invoice no longer reads as owed.
  • Salesforce firmographics, support tickets, org status (switched off, BAA, AI approval) and survey answers.

Nothing reads vitally.* or anything built on it. The one deliberate path left is v8's account-wide convo_* history, which the skill never quotes as an onboarding number.

Routing

Step 3 now follows the team's own rules, so a draft never goes where the workflows would not send:

  • A first touch only for an Eligible account with no current CSM, AE or TAM, no referral, no opt-out, and nobody else at PostHog in touch in the last 30 days (email sync or the shared Slack channel). The skill checks whether the Email sequence will send email 1 itself before drafting one.
  • A follow-up whenever onboarding already wrote, at any stage short of terminal.
  • Everything else gets an account brief: the research, the reason there is nothing to send, and the loop-in to whoever holds the account.
  • An opt-out is the one thing an explicit ask cannot override.

Flow

  • Round 1a is four ordered batches, so ownership, history and the shared Slack channel are read before the mode is chosen, not after.
  • Site scans run one per surface (a product host or a sub-app under a path), not one per team.
  • History reads run over every sibling org, because threads, notes and meetings often sit on a test org.
  • Personal config moves to ~/.claude/posthog-customer-deep-dive.local.md, outside the skill folder, so a plugin update no longer wipes it. An older config.local.md in the folder still works.

Scripts

  • site-scan.sh gains --url for product hosts and path-mounted sub-apps and --token for a token the page hides. It reads every token found, including older ones without the phc_ prefix, each in the region that answers, and prints the replay settings instead of cutting the config at 60 lines. It resolves relative script paths, reads bundles up to 20 MB, and says which file each tool hit came from. posthog-js's own vendor strings are kept apart, and parallel scans no longer share a folder.
  • phq.py prints paused-sync warnings and TRUNCATED instead of a silent empty result, and treats a 2xx with no results as an error. It retries gateway errors that come back as HTML and keeps the API key off the command line.

Testing

  • Five independent reviewers read every file and the whole diff. About 100 findings, all addressed or checked and found not to apply.
  • End-to-end runs on 12 real accounts covering every route: first touch, follow-up, reply, call prep and account brief. Shapes covered: multi-org, EU, an account with no Customer Analytics account, an AE-held account, a switched-off org and a BAA account. Every run's problems were fixed and re-run.
  • A local test suite: static checks (no retired source, no customer name, every reference resolves), every SQL block run on nine real accounts, 30 requirement checks on real data, 14 site-scan cases and 5 phq.py cases. Each new check was seen failing before the fix.

For teammates on 1.x

  • Remove the Vitally MCP if you set it up: claude mcp remove vitally -s user, and drop the VITALLY_* keys.
  • Move your config.local.md to ~/.claude/posthog-customer-deep-dive.local.md, or let Setup recreate it on the next run.
  • The US personal API key is now required, because Round 1a reads the direct connection.

🤖 Generated with Claude Code

Vitally was turned off on 16 October 2026. The skill now reads Customer
Analytics, the onboarding model and its Onboarding:: workflows, the email
sync and PostHog's billing tables, and nothing built on Vitally.

- account state from Customer Analytics and onboarding_accounts_v8
- every Onboarding:: send, stage, tag and owner change per account
- the email sync as the comms record, with the frozen archives before the cutover
- money from the live invoice tables, in UTC days, with what is still outstanding
- routing that follows the team's rules: first touch only where the
  workflows would send, follow-up wherever onboarding already wrote,
  an account brief with the loop-in everywhere else, opt-outs absolute
- ownership, history and the shared Slack channel read before the mode
- one site scan per surface; site-scan.sh gains --url and --token
- phq.py surfaces paused syncs and truncation, and never parses half a body
- personal config moves outside the skill folder so updates keep it

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@danieldanilov danieldanilov self-assigned this Oct 20, 2026
@danieldanilov
danieldanilov marked this pull request as ready for review October 20, 2026 11:41
@danieldanilov
danieldanilov merged commit bc52136 into main Oct 20, 2026
11 checks passed
@danieldanilov
danieldanilov deleted the onboarding/deep-dive-v2-posthog-only branch October 20, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant