Repository navigation
tracking-implementation: Implement From Spec mode, runtime rules, consent carve-out - #40
Merged
Merged
Conversation
… and consent carve-out Prepares the skill to receive handoffs from Mixpanel's in-product onboarding agent, which arrives with a finished tracking plan and a context block. - New Implement From Spec entry point: skip Mode Selection and Phases 0-4 when a spec arrives; Pre-Flight -> Phase 6 -> Phase 7 -> Live View -> AGENTS.md. Requires a closing report classifying every event as instrumented (file:line), omitted (why), or blocked. - Consent carve-out: the EU/UK/CA question is always asked, even under a "do not re-run discovery" instruction; never inferred from the codebase. - New Runtime Patterns (sdk-snippets.md) + Critical Rules: api_host for EU/India data residency, client-only init for SSR frameworks, server-SDK flush in short-lived processes, deterministic $insert_id derivation. - Resolve two internal contradictions: Simplified ID Merge is org-scoped default (don't block implementation on verification); Autocapture/Session Replay ask is now enforced (items 2-6) with a value-forward question script. Tracked as TOF-451..457. Behavior-tested against a fixture repo: consent asked before init, backend-only events reported blocked rather than silently skipped. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
junhouse
reviewed
Sep 10, 2026
| return mixpanel; | ||
| } | ||
|
|
||
| export function trackEvent(name, properties) { |
Contributor
There was a problem hiding this comment.
better to check init before each call
junhouse
approved these changes
Sep 10, 2026
junhouse
left a comment
Contributor
There was a problem hiding this comment.
I've made some improvements!
tiffanyqi
approved these changes
Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Mixpanel's in-product onboarding agent generates a coding-agent handoff prompt that will invoke this skill with a finished tracking plan. Today the skill has no entry point for "discovery is already done" — an agent loading it re-interrogates a user who came to their coding agent specifically to stop answering questions. Three independent model reviews of the handoff flow also converged on gaps this PR closes.
Tracked in Linear as TOF-451..457 ("In-app onboarding overhaul", tofu).
What changed
Implement From Spec mode (
SKILL.md)Consent carve-out (
SKILL.md)Runtime rules (
SKILL.mdCritical Rules + new Runtime Patterns section insdk-snippets.md, pointer inreference.md)api_hosttable for US/EU/India residency — a wrong host drops every event silently (verified against the EU/India residency docs)typeof windowguard, once-only across HMR/route changesBufferedConsumerloses whatever is buffered at exit)$insert_idderived from the logical occurrence, so retried webhooks dedupe instead of duplicatingTwo internal contradictions resolved
SKILL.mdsaid "verify before sending a single event";quick-start.mdsaid don't require it. Now one rule: org-scoped default (orgs created after April 2024, per the id-management docs) — don't block implementation; confirm only for older orgs or projects with existing dataVerification
Behavior-tested against a fixture Express app with a 5-event handoff prompt (3 implementable, 2 backend confirmations with no source in the repo):
company_size,site_platform) were omitted, not defaulted🤖 Generated with Claude Code