Skip to Content

/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-GA auto-PR that flips the flag default from false to true. You merge in the morning to activate the feature for real users.
  • Validation fails → dispatches rollback-production.yml automatically; 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-worker is active, the named flag exists with default false, production baseline is healthy
  • Phase 1 — Deploy: waits for the most recent main deploy to be live on 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-GA auto-PR; fail → dispatch rollback-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 only

Critical 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.

  • /drain — companion; merges code to main behind feature flags; /goal picks up from there
  • /work-ticket — used to ship the original safety:flagged ticket that introduced the flag
  • /review-pr — used to review the auto-PR that /goal deploy opens
  • /release-decision — the broader whole-release gate; /goal handles per-feature flag flips

Canonical spec: .claude/commands/goal.md

Last updated on