/goal
Orchestrate a feature flag’s promotion to production — deploy, warm,
validate, decide (auto-PR to flip the flag default OR auto-rollback),
and audit. Closes the post-validation flag-flip gap that /drain
intentionally leaves to a human decision.
When to use it
Use /goal after /drain has shipped a safety:flagged ticket to
main behind a feature flag (flag default false). /goal deploy
takes over from there: it waits for the deploy to land, warms the
routes, runs the full validation suite (Playwright smoke + Lighthouse
- Sentry baseline), and then branches:
- Validation passes → opens a
ready-for-GAauto-PR that flips the flag default fromfalsetotrue. You merge in the morning to activate the feature for real users. - Validation fails → dispatches
rollback-production.ymlautomatically; files an issue with the failure summary.
/goal is specifically the flag-flip promoter. For draining the
Ready column (merging code to main behind flags), reach for
/drain.
How it fits
What it does (quick)
- Pre-flights: verifies
va-workeris active, the named flag exists with defaultfalse, production baseline is healthy - Phase 1 — Deploy: waits for the most recent
maindeploy to beliveon Render - Phase 2 — Warm: hits at least 3 routes with 5-second sleeps (avoids measuring cold-start spikes in validation)
- Phase 3 — Validate: runs Playwright
@smoke-production+ Lighthouse + Sentry baseline delta - Phase 4 — Decide: pass →
ready-for-GAauto-PR; fail → dispatchrollback-production.yml+ file issue - Phase 5 — Audit: posts a structured comment on the originating ticket with per-phase results and the decision outcome
Invocation shapes
/goal deploy --feature <flag> # the main path
/goal deploy --feature <flag> --dry-run # run all phases, print the decision, take no action
/goal deploy --feature <flag> --recover # skip deploy + warm; re-run validation onlyCritical rule
/goal never auto-merges the flag-flip PR. The human merge click is
intentional friction — it keeps a human in the loop for every GA
activation. Auto-merge is a Phase 3 hardening concern.
Related commands
/drain— companion; merges code tomainbehind feature flags;/goalpicks up from there/work-ticket— used to ship the originalsafety:flaggedticket that introduced the flag/review-pr— used to review the auto-PR that/goal deployopens/release-decision— the broader whole-release gate;/goalhandles per-feature flag flips
Canonical spec: .claude/commands/goal.md