feat(migrate-eppo): add Eppo migration kit and extract shared core#17
Draft
fabriziodemaria wants to merge 2 commits into
Draft
feat(migrate-eppo): add Eppo migration kit and extract shared core#17fabriziodemaria wants to merge 2 commits into
fabriziodemaria wants to merge 2 commits into
Conversation
Adds a /migrate-eppo slash command and skill that mirror the existing PostHog migration: two-phase flow (flag definitions then code), opt-in gating per flag, progressive plan files, and the same execute sequence with positive- and negative-case resolve verification. Eppo-specific adjustments: - Uses Eppo's REST admin API via curl since no Claude MCP exists yet; requires an EPPO_API_KEY and never persists it to the plan file. - Asks the user to pick a source environment before scanning, because Eppo flag state is per-environment. - Maps Eppo's subjectKey to a single Confidence entity field; rewrites rules that target the special id attribute to use that field. - Emits one Confidence targeting rule per Eppo allocation in waterfall order, with trafficExposure -> rolloutPercentage and variation weights -> variant splits inside a single rule. - Constrains MATCHES to ^prefix.* / .*suffix$ and blocks SemVer comparisons, with execute refusing to proceed on unresolved blocks. - Flags disabled in the source environment are migrated at 0% rollout so they cannot accidentally activate during migration. Co-authored-by: Cursor <cursoragent@cursor.com>
Both platform migration skills (migrate-posthog, migrate-eppo) shared roughly 60% of their content: the Confidence targeting payload format, flag setup sequence, naming rules, execute flow, plan-file resume pattern, client-selection step, step-tracker conventions, and the multivariant split handling. Duplicating that content across N skills makes Confidence-side bug fixes like the targeting-payload-format correction in #15 a multi-place chore and gets worse with every new source platform. This commit extracts all platform-agnostic content into skills/_shared/migration-core.md. Each platform skill now starts with a "read the core file first" instruction and only contains: - Its migration overview ASCII art - Source-platform prerequisites (PostHog MCP install vs Eppo REST API key) - The platform-specific scan logic for Step 1 of plan flags - The platform-specific randomization mapping for Step 3 - The Operator Mapping table (source operator -> Confidence payload strategy) plus any blocked-operator guidance - Plan-flag template fields that differ across platforms - The platform-specific code-scan and transform-rule generation for plan code Steps 3 and 4 - Any platform-specific execute notes (e.g. Eppo's disabled-in-env handling) Net effect: -28% total lines, each platform skill ~500 lines instead of ~1100, and adding a third source platform (LaunchDarkly, Statsig, GrowthBook, ConfigCat, ...) is now mechanical - copy a platform skill template and fill in the four platform-specific sections above. Pure refactor; no user-facing behavior change. The slash commands, plan-file paths, MCP tool names, and execute flow are unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
Adds a
/migrate-epposlash command and skill that mirrors the existing PostHog migration, then refactors both skills to share their Confidence-side conventions.Two commits, intentionally separable:
feat(migrate-eppo)— adds the new command, skill, and updates README/CLAUDE.md.refactor(migrations)— extracts the ~60% of content that was duplicated across both skills intoskills/_shared/migration-core.md.What's new in
migrate-eppomigrate-posthog(plan flags → plan code → execute, one PR per flag).curlsince Eppo doesn't publish a Claude MCP server. The skill prompts forEPPO_API_KEY, stores it only in the session env, and never echoes it to the plan file.ONE_OF,NOT_ONE_OF,MATCHES,GTE, etc.).MATCHESis constrained to^prefix.*/.*suffix$; arbitrary regex and SemVer comparisons are blocked with explicit guidance for the user.Why the refactor
After adding the Eppo skill, ~60% of content was duplicated across the two skills — including the Confidence targeting payload format that #15 had to fix. Drift across copies makes Confidence-side bug fixes a multi-place chore, and gets worse with each new source platform.
The refactor extracts shared content into
skills/_shared/migration-core.md. Each platform skill now starts with a "read core first" instruction and only contains its platform-specific bits: prerequisites, scan logic, randomization mapping, operator table, plan template fields, code-scan patterns, transform rules.Net effect:
Pure refactor; no user-facing behavior change. Slash commands, plan-file paths, MCP tool names, and the execute flow are unchanged.
Test plan
End-to-end agent-driven skills don't have an automated test suite. Manual validation tiers:
/migrate-eppo execute <plan-file>against a throwaway Confidence client. Covers the riskiest path (createFlag → addTargetingRule → resolveFlag, including waterfall order verification) without needing any Eppo access.Draft because
Made with Cursor