docs: feature-flag plugin design & phased build plan#1009
Open
lane711 wants to merge 1 commit into
Open
Conversation
Research-backed design doc for a SonicJS feature-flag plugin (LaunchDarkly / Unleash / Flagsmith / GrowthBook / Statsig parity), built on the document model. 7 phases (0-6): MVP at Phase 2, terminal "highly complex" A/B experimentation engine at Phase 6. Dual consumer (internal gating + external service), full multi-project/env, MurmurHash3-32 bucketing, OpenFeature provider, D1 + 3-tier cache edge delivery. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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.
What
Adds a research-backed design doc for a SonicJS feature-flag plugin — LaunchDarkly / Unleash / Flagsmith / GrowthBook / Statsig parity, built entirely on the document model (no new feature tables).
docs/ai/plans/feature-flag-plugin-plan.mdWhy
Proposal to make SonicJS usable as a feature-flag / progressive-delivery platform, serving both internal feature gating (
FlagService.isEnabled) and external apps (SDK keys,/flagsAPI, OpenFeature provider).Highlights
{value, variant, reason}mapped to OpenFeature vocabulary.bucketBy+ per-flag salt).CacheService(memory→KV→D1) + versioned polling. SSE streaming documented as optional stretch.Scope
Docs only — no code, no schema, no migrations. This is the design/roadmap for review before implementation.
🤖 Generated with Claude Code