Published
Set up Feature Flag Coverage
In brief: Detect your flag SDK, instrument the app, and confirm the first flag evaluations reach TestChimp. The agent shows a plan first, never asks for provider credentials, and keeps TESTCHIMP_FLAG_ECHO out of production config.
When to use
First-time feature flag coverage setup, or when a new app or service in the repo starts evaluating flags. It runs on its own; it is not a subflow of Run QA or Upkeep.
Prompt
/testchimp setup feature flag coverage
Slash commands need the TestChimp skill installed. The full prompt, which also works in agents that do not route slash commands:
Set up feature flag coverage with TestChimp for this repo.
Use the TestChimp skill: /testchimp setup feature flag coverage.
Detect which flag SDK the app uses (LaunchDarkly, PostHog, OpenFeature), instrument the frontend and, if the backend evaluates flags, the Node backend. Show me your plan before you change anything.
Do not put any provider credentials in chat. Tell me when I need to connect the provider in TestChimp settings.
Some hosts use /testchimp:setup-feature-flag-coverage.
Scope
Optional. By default, the whole repo. Name an app or service to limit it, for example /testchimp setup feature flag coverage for apps/web.
What it does
- Detect. Reads your manifests for OpenFeature, LaunchDarkly, PostHog and Statsig SDKs, separates frontend from backend, and finds where the app creates its flag client.
- Check readiness. Calls
get-feature-flag-setup-statusand checks the project's@testchimp/playwrightversion, offering to update it if needed. - Plan. Shows the exact edits and waits for your approval. Non-Node backends are out of scope for this version; the agent says so and still does the frontend.
- Instrument. Installs
@testchimp/flagsand adds the frontend hook where the flag client is created. If the backend evaluates flags, it adds the collection middleware and the provider hook, and setsTESTCHIMP_FLAG_ECHO=1in test environment config only. It never adds that variable to production env files or manifests, and checks for it before finishing. - Connect the provider (your step). The agent gives you the settings link from
get-feature-flag-setup-statusand waits. It never asks for, receives or stores provider credentials. Capture works without a connection; the connection adds the untested arms. See Feature flag integrations. - Verify. Runs one existing test that renders a flagged screen, then checks that
anyEvaluationsIngestedistrueandsourcesSeenhas the expected sources. If a backend flag is missing, it checks the echo variable and middleware order first. - Hand back with a link to the coverage page and the next step,
/testchimp fix coverage gaps.
The manual steps are in Setup.
See also
FAQ
Will the agent ask for my LaunchDarkly or PostHog keys?
No. It gives you the settings link and waits while you connect the provider yourself.
Does the agent touch production config?
No. It sets TESTCHIMP_FLAG_ECHO=1 in test environment config only and checks that it is not in production files before finishing.
Which backends can it instrument?
Node backends (Express, Connect, Fastify, Next.js route handlers). For other languages it still instruments the frontend.