agentleFS
etretr/groundwork/skills/staged-rollout/SKILL.md

staged-rollout

Skill45 starsChanged 4 days agoMITView on GitHub

Roll out a change in stages behind a feature flag with a monitoring window and a written rollback plan - use before shipping anything user-facing, instead of flipping it on for everyone at once

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Core principle: Every outward-facing change ships behind a flag, advances in stages with a monitoring window between them, and has a …

    line 12
  2. Distinctive:

    Feature-flag gating: Put the new behavior behind a flag, default off.

    line 30
  3. Distinctive:

    No documented trigger condition or named rollback action before launch

    line 59

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Staged Rollout

Overview

A change reaches all users gradually, behind a switch you can flip back, while someone watches the signals. Big-bang releases convert a small bug into a full outage. A staged rollout converts the same bug into a contained blip caught at 1% traffic.

Core principle: Every outward-facing change ships behind a flag, advances in stages with a monitoring window between them, and has a rollback plan written before launch — not improvised during the incident.

This depends on the change being observable first: see [[instrument-observability]] for the signals the monitoring window watches.

When to Use

  • Any user-facing or externally-observable change (new endpoint, UI, behavior change, schema migration)
  • Risky internal changes where a bad deploy degrades many users at once

Skip only for trivially reversible, low-blast-radius changes (a copy fix, an internal doc). When unsure, stage it — the cost is one flag.

Process

  1. Pre-launch checklist. Confirm before any traffic shift:
    • Validation and review already passed (see [[validate]] / [[review-pr]])
    • Instrumentation is live and the dashboards read real data
    • The feature flag exists and defaults to off
    • The rollback plan is written (step 4)
  2. Feature-flag gating. Put the new behavior behind a flag, default off. The flag must be flippable at runtime without a redeploy — that is what makes rollback fast.
  3. Staged / canary rollout. Advance through stages, not in one jump. A typical ramp:

    StageAudienceHold for
    Canary1% (or internal/dogfood)a monitoring window
    Early10%a monitoring window
    Majority50%a monitoring window
    Full100%—

    Monitoring window: between each stage, watch the RED metrics and alerts long enough to span real traffic before promoting. Do not promote on a clean dashboard you've watched for thirty seconds. If a symptom breaches, stop and roll back — do not push forward hoping it settles.

  4. Written rollback plan. Before launch, document: the exact trigger conditions (which metric/alert at which threshold), the precise rollback action (flip flag X to off; revert migration Y), who can execute it, and the expected recovery time. A rollback that requires a redeploy is too slow — prefer the flag.
  5. Conventional artifact locations. Write the rollback plan to {{specs_dir}}/rollouts/<feature-slug>-rollback.md and the pre-launch checklist to {{specs_dir}}/rollouts/<feature-slug>-prelaunch.md (create the directory; the feature slug is the kebab-case change name). {{specs_dir}} is project-scoped, so same-named changes in two monorepo projects cannot overwrite each other. Never leave these "somewhere in the conversation" — the ship gate checks the file.

Rationalizations

ExcuseReality
"It's a small change, ship to everyone"Small changes cause large outages. The flag costs minutes; the outage costs hours.
"I'll write the rollback plan if something breaks"Mid-incident is the worst time to design recovery. Write it cold, before launch.
"Dashboard looked clean, I promoted right away"A clean dashboard watched for seconds proves nothing. Hold the window across real traffic.
"Rollback is just redeploy the old version"A redeploy is minutes of continued damage. A flag flip is seconds. Gate behind a flag.
"Canary at 1% will take forever"1% surfaces the catastrophic bugs cheaply. That's the point.

Red Flags

  • Going straight to 100% with no canary stage
  • A flag that needs a redeploy to toggle
  • Promoting between stages without watching the metrics in between
  • No documented trigger condition or named rollback action before launch
  • "We'll roll it back by reverting the commit" as the entire plan

Verification

  • Pre-launch checklist complete; flag exists and defaults to off
  • The change is gated behind a runtime-flippable feature flag
  • A staged/canary ramp is defined with a monitoring window between stages
  • A written rollback plan exists at {{specs_dir}}/rollouts/<feature-slug>-rollback.md naming trigger conditions, the exact rollback action, the owner, and expected recovery time
  • The plan was written before launch, not after the first stage

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.