deployment-verify
Skill22 starsChanged 32 days agoMITView on GitHub
Verifies a merged change on a real deployment and reverses it when it hurts: waits until the merged commit is serving, steps the change's feature flag through a rollout (1 → 10 → 50 → 100 %), compares the flag-on and flag-off cohorts in the same window from telemetry (a change with no flag is compared before and after the deploy), lets a deterministic rule decide PASS, HOLD, or ROLLBACK, flips the flag back on a failure, proves recovery, and notifies where the outcome needs a human. Resumable across short runs, so a scheduled automation can drive it unattended. Optional `hold_after` waits at a step for a human approve or override, beside an advisory AUTO/HUMAN recommendation learned per risk class. `setup` writes `.agents/aw/release.yml`. Triggers on "verify the deploy", "is it working in production", "roll out this flag", "/deployment-verify".
In this repository53 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- skills/workflow/autonomous-workflow/CLAUDE.mdCLAUDE.md
- ideateSkill
- interviewSkill
- playwright-trace-analyzerSkill
- profile-optimizerSkill
- rum-trackingSkill
- screencastSkill
- video-analyserSkill
- youtube-transcriptSkill
- create-skillSkill
- docsSkill
- handoffSkill
- optimize-claude-mdSkill
- persistent-memorySkill
- attach-mediaSkill
- ci-auto-fixSkill
- create-prSkill
- github-actions-authorSkill
- prepareSkill
- resolve-conflictsSkill
- ticketSkill
- animations-nativeSkill
- animationsSkill
- behavioral-designSkill
- chartingSkill
- storybookSkill
- uxSkill
- visual-designSkill
- ai-engineeringSkill
- confidenceSkill
- criticalSkill
- fitSkill
- impact-mapSkill
- jev-assertSkill
- measurableSkill
- polishSkill
- pr-reviewSkill
- review-loopSkill
- tddSkill
- verify-behaviorSkill
- aw-verifySkill
- e2e-testing-mobileSkill
- e2e-testingSkill
- telemetry-verifySkill
- ui-verifySkill
- atelierSkill
- autonomous-workflowSkill
- aw-create-planSkill
- aw-create-walkthroughSkill
- fix-bugSkill
- implement-suggestionSkill
- improveSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 55
Run node ${CLAUDE_SKILL_DIR}/scripts/decide.mjs --self-test.
- Very specific: line 58
After a PASS, the controller marks 🚀 on every criterion a contract root span watched, in the PR's intent region (through aw-verify's …
- Distinctive: line 71
Never re-implement a step the controller performs.
- Distinctive: line 89
Read the report comment and the state line on the PR.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.
Files
deployment-verify
The suite before the merge proves the change works; this skill proves it keeps working where users are, takes it back out when it does not, and tells someone.
A script runs the rollout; the agent sets it up and handles what the script cannot.
A clean rollout spends no model tokens: scripts/tick.mjs measures, scripts/decide.mjs decides, and an agent is woken only for an exception.
Why it is shaped this way: references/design.md.
Invocation
/deployment-verify <pr> # run: tick until the rollout ends, waiting between ticks
/deployment-verify tick --all --unattended # one tick for every in-progress PR, then exit (automations)
/deployment-verify <pr> --env local --deployed-at 2026-11-11T08:38:38Z
/deployment-verify approve <pr> # at a hold: continue the rollout (interactive only)
/deployment-verify override <pr> # at a hold: flag off, outcome OVERRIDDEN (interactive only)
/deployment-verify setup # write or validate .agents/aw/release.yml (interactive only)| Argument | Meaning |
<pr> | A merged PR carrying a contract; --all = every merged PR labelled deployment-verify |
run (default) | Tick repeatedly, waiting until the next unit is due, until the outcome is terminal |
tick | Do every unit that is due now, then exit (rules/state.md) |
approve, override | A human's decision at a hold_after hold: tick.mjs --pr <n> --approve or --override (rules/hold.md); refused unattended |
--env | A release.yml environment; default is the contract's env, else production |
--steps | Override release.yml → steps |
--rollback | Override the personal rollback policy for this run |
--deployed-at | Required when the environment's deploy detection is manual |
--unattended | No questions; the automation answers apply (rules/automation.md). Implied in a prepared Agent0 sandbox |
--no-comment | Post nothing to the PR; state then lives only in this session, so tick is refused |
Step 0 — Resolve and refuse early
- Resolve
.agents/aw/release.ymlandtelemetry.ymlplus the personal overlay (rules/config.md). Missingrelease.yml→STOPPED — run /deployment-verify setup first. - Run
node ${CLAUDE_SKILL_DIR}/scripts/decide.mjs --self-test; a failure stops every PR: the verdict rule is broken. - Per PR:
gh pr view <pr> --json body,mergeCommit,mergedAt,state,url,labels. Closed withoutmergedAt→ remove the label, stop: nothing deployed. - Per PR without state: extract and validate the contract (
rules/contract.md). No contract and not merged →tick.mjs --draft-contract --pr <n>(rules/contract.md § Draft from the criteria). - After a
PASS, the controller marks🚀on every criterion a contract root span watched, in the PR'sintentregion (throughaw-verify'sverify-comment.mjs --marks, which changes only that mark).aw-verifynot installed →criteria not marked 🚀, never a stop; a rollback marks nothing. - The controller reads the PR's acceptance criteria (the
intentregion/aw-verifywrote) into the report'scriteria:block; none on the PR →criteria: none on the PR, never a stop.
Step 1 — Run the controller
node ${CLAUDE_SKILL_DIR}/scripts/tick.mjs --pr <n> [--run] [--env <env>] # PR mode, state in the PR comment
node ${CLAUDE_SKILL_DIR}/scripts/tick.mjs --all # every in-progress PR, one tick each
node ${CLAUDE_SKILL_DIR}/scripts/tick.mjs --local <state.json> --contract <contract.json> --env local --deployed-at <ISO> --runtick = one pass, then exit; --run = keep ticking until the outcome is terminal.
A rollout that already ended is reported from its stored state and never ticked again, so a re-run is safe; the relabel to deployment-verify:done does not need the PR to carry the deployment-verify label (a --pr run never adds it).
Never re-implement a step the controller performs; read its stderr and the report it writes.
A tick that moves the rollout also exports one gauge point for the live pipeline board when an export endpoint is set (rules/rollout-state.md).
In PR mode it prints one status line per PR on stdout (deployment-verify #<n>: <status> — <detail>); the report itself lives in the PR comment.
It implements these rules, which stay its specification:
| Phase | Rule |
deploy | Wait for the merged commit to serve — rules/config.md § Deploy detection |
baseline, step | Measure, confirm live, decide.mjs, act — rules/loop.md, queries per rules/telemetry.md; a no-flag change with a probes.yml sends the same requests before and after, judged per route — rules/probes.md |
hold | Wait for a human at hold_after; print the recommendation — rules/hold.md, rules/autonomy.md |
rollback | Reverse, prove recovery, hand off the cause — rules/rollback.md |
Step 2 — Handle the exception (the only agent work in a rollout)
The controller exits 3 and runs release.yml → on_exception when a rollout ends ROLLED_BACK, ESCALATE, or INCONCLUSIVE, and once when it reaches a hold (AWAITING_APPROVAL).
Woken by AWAITING_APPROVAL: notify (rules/notify.md) with the hold: and recommend: lines, and stop; never approve or override.
Woken by any other event, or by exit 3:
- Read the report comment and the state line on the PR.
- Find the cause (
rules/rollback.md § Hand off the cause). ESCALATEwithrollback needs a humanand no platform rollback → open the revert PR (rules/rollback.md § Act); with apromotion:rule, record it only when the report has nosignal:line (the controller already recorded this rollback):node ${CLAUDE_SKILL_DIR}/scripts/signal.mjs --event revert --repo <owner/name> --risk-class <class>(rules/autonomy.md).- Notify (
rules/notify.md) and add the cause and thenotify:line to the report comment.
PASS, OVERRIDDEN, and STOPPED need no agent; the controller's PR comment is the whole report.
Report
The controller writes the PR's report comment (marker <!-- deployment-verify:v1:report -->) with this block and the state line; the agent only appends cause: and notify::
DEPLOYMENT <IN PROGRESS | PASS | ROLLED_BACK | INCONCLUSIVE | ESCALATE | OVERRIDDEN | STOPPED>
change: <PR title> (#<n>) · flag <key> via <provider> · <env>
criteria: <n> on the PR, <g> guardrails (aw-verify's `intent` region)
AC-2 api PUT /api/x — watched # root span in the contract; not watched = nothing here reads it
deploy: live at <time> (<attribute>=<sha7>)
baseline: <n> requests, <e> errors, <avg> ms
probe: before live at <time> · after <version> at <time> # only with probes.yml (rules/probes.md), one row per route below
step test n/err/ms control n/err/ms verdict
1 % 26/7/304 2593/0/3.6 ROLLBACK error rate +26.9pp vs control > 5pp
hold: 10 % since <time> — waiting: /deployment-verify approve|override <n> # only with hold_after
recommend: HUMAN — agree streak 2 < 5 (risk class ui); advisory only
signal: ui: streak 3 # after a decision or a rollback, with promotion:
action: flag → 0 at <time>; RECOVERED in <s> s
cause: <Agent0 answer and thread link, or "not investigated">
notify: slack #deploys ok · linear ENG-123 ok
next: /fix-bug <PR URL> — failing window <from>..<to>
not watched: <e.g. no soak window — run ended at <time>>Anti-patterns
| Never | Instead |
| Judge PASS or ROLLBACK yourself, or run the loop by hand | Run tick.mjs; it calls decide.mjs |
| Advance a step on HOLD | Extend the same step |
| Edit the contract after the first tick | Stop, fix the contract, start a new rollout |
Trust set exiting 0 | Confirm the step is live from the cohort share |
Detect a Vercel deploy by service.version | vercel.sha — service.version is the deployment ID |
| Roll back with a revert PR while a flag exists | Set the flag off |
| Report RECOVERED without a clean post-rollback window | Measure one more window |
| Sleep through a rollout inside one automation run | Tick and exit; the schedule brings the next tick |
| Ask a question in an unattended run | Apply the automation answer |
| Count a probe's 401 or 403 as errors | STOPPED — probe auth failed; refresh the identity, start again (rules/probes.md) |
Advance a hold because the recommendation says AUTO | Wait for a human approve; the recommendation is advisory |
| Drop a failed notification | Record it in the PR comment |
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
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.

