Part of epic #1725. Phase 3 — Premium synthesis + review.
Objective
Establish a tiny feature-flag module so the Amicus-drafted synthesis path can ship behind a flag and be enabled later via a single-line PR.
Files
Create
app/src/config/featureFlags.ts
app/src/config/__tests__/featureFlags.test.ts
Implementation
// app/src/config/featureFlags.ts
/**
* Feature flags for in-flight work that needs to ship behind a switch.
*
* These are compile-time constants on purpose — no remote config in this
* codebase yet. Flipping a flag is a single-line PR + EAS Update.
*
* Add a comment per flag explaining what to verify before flipping.
*/
export const FEATURE_FLAGS = {
/**
* Enables Amicus-drafted synthesis at the end of guided study sessions.
* Before flipping true, verify:
* - Epic #1446 (Amicus AI Study Partner) is past Phase 3 (chat working
* against the production worker).
* - The mode-specific system prompts in app/src/services/amicus/prompts/
* guidedStudy.ts have been reviewed.
* - Anthropic prompt caching is hitting on the system prompt (>80% cache
* rate observed in dev for at least 100 calls).
* When false, premium users get the structured-form synthesis path.
*/
GUIDED_STUDY_AMICUS_SYNTHESIS: false,
} as const;
export type FeatureFlag = keyof typeof FEATURE_FLAGS;
export function isFlagEnabled(flag: FeatureFlag): boolean {
return FEATURE_FLAGS[flag];
}
Tests
isFlagEnabled('GUIDED_STUDY_AMICUS_SYNTHESIS') returns false by default.
- TypeScript:
isFlagEnabled('garbage') is a compile error.
Acceptance
- Module exists and exports flags + helper.
- Default for
GUIDED_STUDY_AMICUS_SYNTHESIS is false.
tsc, lint, test clean.
Out of scope
- Using the flag (Phase 3.2 starts using it; Phase 4 fully exercises it).
Part of epic #1725. Phase 3 — Premium synthesis + review.
Objective
Establish a tiny feature-flag module so the Amicus-drafted synthesis path can ship behind a flag and be enabled later via a single-line PR.
Files
Create
app/src/config/featureFlags.tsapp/src/config/__tests__/featureFlags.test.tsImplementation
Tests
isFlagEnabled('GUIDED_STUDY_AMICUS_SYNTHESIS')returns false by default.isFlagEnabled('garbage')is a compile error.Acceptance
GUIDED_STUDY_AMICUS_SYNTHESISis false.tsc,lint,testclean.Out of scope