feat: feature flags module + GUIDED_STUDY_AMICUS_SYNTHESIS flag (#1738)#1764
Merged
Conversation
Phase 3.1 of epic #1725. Tiny compile-time feature-flag table so the Amicus-drafted synthesis path can ship behind a switch and be enabled later by a single-line PR + EAS Update. - config/featureFlags.ts: FEATURE_FLAGS const + FeatureFlag type + isFlagEnabled(flag) helper. Per-flag JSDoc lists what to verify before flipping (Epic #1446 status, prompts review, prompt-cache hit rate). GUIDED_STUDY_AMICUS_SYNTHESIS defaults false. - config/__tests__/featureFlags.test.ts: default-off assertion, exhaustive-shape check (every flag is a boolean), helper round-trip. - components/guidedStudy/SynthesisFreeRecap.tsx: replace the inline Phase 2.7 placeholder constant with isFlagEnabled('GUIDED_STUDY_ AMICUS_SYNTHESIS') — resolves the deferred item I noted in #1736. tsc / lint / 3851 full-suite tests green.
Test Results✅ All tests passed
Coverage
⏱️ Duration: 91.7s |
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.
Closes #1738. Phase 3.1 of epic #1725 — opens Phase 3.
Why
The Amicus-drafted synthesis path needs to ship behind a flag so the structured premium path can land first while #1446 catches up. This card creates the tiny compile-time feature-flag table + helper, and resolves the inline-constant placeholder I left in #1736.
What
app/src/config/featureFlags.ts—FEATURE_FLAGSconst,FeatureFlagtype,isFlagEnabled(flag)helper.GUIDED_STUDY_AMICUS_SYNTHESISdefaultsfalse. Per-flag JSDoc lists what to verify before flipping (Epic Epic: Amicus — AI Study Partner (v1) #1446 status, prompts review, prompt-cache hit rate).app/src/config/__tests__/featureFlags.test.ts— default-off assertion, exhaustive-shape check (every flag is a boolean), helper round-trip.app/src/components/guidedStudy/SynthesisFreeRecap.tsx— replace the inline Phase 2.7 placeholderconst GUIDED_STUDY_AMICUS_SYNTHESIS = falsewithisFlagEnabled('GUIDED_STUDY_AMICUS_SYNTHESIS'). Resolves the deferred item I flagged in the Phase 2.7 — Free synthesis recap (SynthesisFreeRecap component) + free NextChapterNudge #1736 PR description.Acceptance criteria
GUIDED_STUDY_AMICUS_SYNTHESISisfalseisFlagEnabled('GUIDED_STUDY_AMICUS_SYNTHESIS')returnsfalseisFlagEnabled('garbage')is a compile error (FeatureFlagkeyof typed)Rollback
Revert the PR. The
SynthesisFreeRecapconsumer falls back to importing… nothing — clean revert.Notes for Craig
Generated by Claude Code