Skip to content

feat(feature-flags): add the feature-flags orchestrator agents - #428

Merged
johncwaters merged 2 commits into
mainfrom
johnw/feature-flags-agents
Oct 14, 2026
Merged

johncwaters merged 2 commits into
mainfrom
johnw/feature-flags-agents

Conversation

@johncwaters

Copy link
Copy Markdown
Contributor

Problem

Feedback wanted: ready to merge. Approve or request changes. PostHog/wizard#1322 ships after this is published.

The wizard feature-flags command runs an orchestrator flow named feature-flags, and the wizard fetches every flow's agents from context-mill. This flow has no agents here yet.

Companion PRs: wizard (PostHog/wizard#1322) and wizard-workbench (PostHog/wizard-workbench#4483).

Changes

  • Adds context/agents/feature-flags/ with six agents: the setup-feature-flags seed, install, init, create-flag, evaluate, and report. The seed decides which sides the app has (backend, frontend) and passes them to every task as a sides input.
  • create-flag makes one example flag per side, wizard-example-backend-flag and wizard-example-frontend-flag, inactive at 0% rollout, and reuses an existing flag unchanged, including one another run created after its lookup. It may Read, so it can open skill references.
  • evaluate loads integration-v2-feature-flags-step for the framework's flag docs and adds one evaluation per flag on its own side, with the keys in a constants module.
  • report publishes the setup report through publish_handoff, which mirrors it into a PostHog notebook, and writes no report file. It states each flag's active state from the create-flag handoff and how to confirm an evaluation reaches PostHog; the run itself does not check.

Test plan

  • pnpm test: 219 tests pass. pnpm build emits the six agents-feature-flags-*.md files and adds the flow to agent-menu.json.
  • Served from the local dev server to the wizard#1322 branch and run through wizard-workbench pnpm wizard-ci feature-flags/<app> --e2e:
    • next-js/15-app-router-saas passed every check: both flags inactive at 0%, both keys in lib/posthog-feature-flags.ts, and the outro links the report notebook.
    • django/django3-saas passed every check with only the backend flag (its templates hold no scripts), the key in dashboard/feature_flags.py, and the report notebook linked in the outro. It needs a Python with pip; a machine without one fails the install task.
  • The create-flag retry on an existing key landed after these runs. It came from the parallel Next.js run hitting "There is already a feature flag with this key".

LLM context

Written with Claude Code.

The wizard feature-flags command runs an orchestrator flow named
feature-flags. Its six agents (seed, install, init, create-flag, evaluate,
report) live here so the wizard fetches them like every other flow instead of
bundling its own prompts. create-flag may Read, so it can open skill
references. report publishes the setup report to a PostHog notebook through
publish_handoff and writes no report file; the run does not check that an
evaluation reached PostHog, so the report says how to confirm it and states
each flag's active state from the create-flag handoff.

Constraint: wizard#1322 ships only after this is published
Confidence: high
Scope-risk: narrow
wizard-workbench runs its feature-flags legs in parallel against one project
with the same example keys, so a flag can appear between create-flag's keyed
lookup and its create call. An e2e run hit "There is already a feature flag
with this key" there. create-flag now looks the key up once more and reuses
the flag unchanged.

Confidence: high
Scope-risk: narrow
@johncwaters
johncwaters requested a review from a team as a code owner October 14, 2026 15:14
@github-actions

Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci ai-observability
  • /wizard-ci basic-integration
  • /wizard-ci feature-flags
  • /wizard-ci mcp-analytics
  • /wizard-ci replay-vision
  • /wizard-ci revenue
  • /wizard-ci self-driving
  • /wizard-ci warehouse
  • /wizard-ci warehouse-seeded

Test an individual app:

  • /wizard-ci ai-observability/anthropic
  • /wizard-ci ai-observability/google-adk
  • /wizard-ci ai-observability/groq
Show more apps
  • /wizard-ci ai-observability/manual-capture
  • /wizard-ci ai-observability/openai
  • /wizard-ci ai-observability/openai-agents
  • /wizard-ci ai-observability/opentelemetry
  • /wizard-ci ai-observability/vercel-ai
  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/flutter
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci feature-flags/django
  • /wizard-ci feature-flags/next-js
  • /wizard-ci mcp-analytics/custom-dispatcher
  • /wizard-ci mcp-analytics/typescript-sdk
  • /wizard-ci replay-vision/javascript-node
  • /wizard-ci replay-vision/next-js
  • /wizard-ci replay-vision/react-vite
  • /wizard-ci revenue/stripe
  • /wizard-ci self-driving/astro
  • /wizard-ci self-driving/fastapi
  • /wizard-ci self-driving/nuxt
  • /wizard-ci self-driving/react-router
  • /wizard-ci self-driving/sveltekit
  • /wizard-ci warehouse/monorepo-env
  • /wizard-ci warehouse/multi-source-next
  • /wizard-ci warehouse/stripe-node
  • /wizard-ci warehouse/zero-source
  • /wizard-ci warehouse-seeded/next-stripe
  • /wizard-ci warehouse-seeded/next-stripe-declined

Test against a wizard branch:

  • /wizard-ci all wizard:my-branch

Add wizard:<branch> to any command above to pin the wizard branch. It defaults to main.

Results will be posted here when complete.

@johncwaters
johncwaters merged commit 705c0c5 into main Oct 14, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants