feat(feature-flags): add wizard feature-flags install program - #1192
feat(feature-flags): add wizard feature-flags install program#1192fristovic wants to merge 5 commits into
Conversation
| 'or run `npx @posthog/wizard` for a general PostHog install.', | ||
| }, | ||
| { | ||
| match: /^could not locate a UI surface to gate$/i, |
There was a problem hiding this comment.
I'd consider maybe degrading rather than stopping the run
There was a problem hiding this comment.
Good call! I'll see what I can do.
| 'mcp-remove': DEFAULT_BINDING, | ||
| 'mcp-tutorial': DEFAULT_BINDING, | ||
| 'mcp-analytics': DEFAULT_BINDING, | ||
| 'feature-flags': { |
There was a problem hiding this comment.
I'd love to see evals if you have any for why this model! it's okay if it's just personal preference too :)
There was a problem hiding this comment.
I actually Tried Vincent’s Slack hint out of curiosity. I don't have any real evals I just wanted to see another model appear in the logs 🤣 I’ll revert to default Sonnet unless you’d rather keep the experiment.
There was a problem hiding this comment.
no need! was just curious :)
|
Official docs page (draft): PostHog/posthog.com#19911. |
There was a problem hiding this comment.
your personality really comes through the Deck (big fan of putting personality in it!!), and I'm glad you played with the Primitives and added some visuals. visually, it's nice.
on the content itself:
- I came away from watching the full deck not fully understanding what a feature flag is (I wore my junior engineering hat for this one). I think it's worth naming it upfront, even if it's a simple definition to build concretely on top of. everything as is, feels abstract.
- the learn deck jumps between example apps that don't have a relationship to one another (or if they do, I was struggling to find a relationship) so it felt like I couldn't anchor to anything
TL;DR I think there's just some assumption here that the user is familiar with flags and has them running at scale
I'd maybe cut it to orient a user as if they weren't 100% familiar with flags, with the intention that if they watch the Learn cards, they'll leave feeling like they at least grasp the concept
Summary
Adds
wizard feature-flags, a top-level install program (same shape asmcp-analytics) that runs the mill skillfeature-flags-setup.The gap: default
wizardis product analytics,wizard audit feature-flagsis read-only,wizard migrateis vendor porting. This is install + instrument on Next.js App Router only (one stack, one pattern). Sarah endorsed the top-level command.What this PR wires:
bin.ts, abort cases, CLI/shape testsfeature_flag:read+feature_flag:write(not agent-skill’sproperty_definition:read)GPT5_6_TERRA_MODEL/ medium — stillcreateSkillProgram, no orchestratorWhat the paired mill skill does (PostHog/context-mill#378):
evaluateFlags()once per request → bootstrap intoPostHogProvider→ CI/flagspolling offwizard_ask: skip first (install only, no new flag) or confirm an additive UI pathDepends on mill #378.
Test plan
Unit (this PR)
pnpm test(at leastfeature-flags.test.ts,program-scopes.test.ts,programs-cli.test.ts,switchboard.test.ts,flags.test.ts)pnpm try feature-flags --helpshows the new command and does not collide withwizard audit feature-flagsfeature-flagsresolves to linear + pi + terra medium (notDEFAULT_BINDING)E2E (needs mill #378 served locally)
property_definition:read.evaluateFlags+ provider + env; no new flag in PostHog; layout does notisEnabledan invented key.useFeatureFlagEnabled(..., false))pnpm dev— UI matches today (flag off)./posthog-feature-flags-report.mddocuments 0% and the kill-switch stepsnpx @posthog/wizard audit feature-flags(audit still read-only)Cross-repo CI once mill is up:
/wizard-ci all wizard:feat/feature-flags-programon mill #378.Made with Cursor
Docs: PostHog/posthog.com#19911 (
/docs/feature-flags/installation/ai-wizard). LocaldocsUrlinsrc/lib/programs/feature-flags/index.tsnow points at that page. Include the one-liner when you commit Learn cards. Do not un-draft this PR from the docs track.