agentic-engineering-framework: Command for Claude Code

.claude/commands/rollback.md

rollback is a command for Claude Code from DimitriGeelen/agentic-engineering-framework. It costs 0 tokens per session (818 once invoked), scanned A, original, Apache-2.0.

A recovery command for reverting a problematic deployment to an earlier version. A deployment is the act of putting a software version into a running environment; the command reads deployment records, asks for confirmation, performs the rollback, and checks service health.

In plain words
What is it for?
Use it after a failed or unhealthy deployment to inspect the last release, view the current service state, roll back, and verify the result. It uses Docker service information for the health check.
Why use it?
It gives a defined recovery path when a release causes problems. It also stops when there is no active task or no recorded deployment to revert.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is DimitriGeelen/agentic-engineering-framework's own configuration. It tells Claude Code how to work on agentic-engineering-framework itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agentic-engineering-framework configures →

Reuse

Borrowing it

Nothing to install: this file belongs to DimitriGeelen/agentic-engineering-framework. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/DimitriGeelen/agentic-engineering-framework/master/.claude/commands/rollback.md
Clone the repo
git clone --depth 1 https://github.com/DimitriGeelen/agentic-engineering-framework

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rollback

README.md
[![agentmods](https://agentmods.dev/badge/commands/dimitrigeelen/agentic-engineering-framework/rollback/github.svg)](https://agentmods.dev/commands/dimitrigeelen/agentic-engineering-framework/rollback)
Your own site
<a href="https://agentmods.dev/commands/dimitrigeelen/agentic-engineering-framework/rollback"><img src="https://agentmods.dev/badge/commands/dimitrigeelen/agentic-engineering-framework/rollback/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rollback

Your own site · 80×15
<a href="https://agentmods.dev/commands/dimitrigeelen/agentic-engineering-framework/rollback"><img src="https://agentmods.dev/badge/commands/dimitrigeelen/agentic-engineering-framework/rollback.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 818 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00818
Opus 5.5 $0.00000 $0.00327
Sonnet 5.5 $0.00000 $0.00164
Haiku 4.5 $0.00000 $0.00082

Measured 1mo ago against content hash 1f89bdbdf265, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rollback scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -sf http://192.168.10.201:5050/health
.claude/commands/rollback.md · 122 lines

How it starts

The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/rollback - Revert Production to Previous Version

Recovery skill for failed or problematic deployments. Reads deployment history, confirms with user, executes rollback, verifies health.

Step 1: Task Gate

Verify an active task exists:

  1. Read .context/working/focus.yaml — check current_task is set
  2. If no task is set, STOP and say: "No active task. Run /start-work first."

Step 2: Read Deployment History

ls -t .context/deployments/*.yaml 2>/dev/null | head -5

If no deployment records exist, STOP and say: "No deployment records found in .context/deployments/. Nothing to roll back."

Read the most recent deployment record:

cat .context/deployments/$(ls -t .context/deployments/*.yaml | head -1 | xargs basename)

Present the deployment info:

## Last Deployment

- Timestamp: {timestamp}
- App: {app}
- Task: {task}
- Commit: {commit}
- Result: {result}

Step 3: Check Current Service State

export DOCKER_HOST=tcp://192.168.10.201:2375
docker service ls --filter name=watchtower
docker service ps watchtower_app --format '{{.ID}} {{.Image}} {{.CurrentState}}' | head -5

Present the current state: running image version, replica count, health.

Step 4: Confirm with User

This is a Tier 0 action. Present options and WAIT for explicit user confirmation:

## Rollback Options

1. Rollback watchtower_app to previous version (docker service rollback)
2. Cancel — do not rollback

Do NOT proceed without the user selecting option 1. If user selects 2 or anything else, abort.

Step 5: Execute Rollback

Only after user confirms option 1:

export DOCKER_HOST=tcp://192.168.10.201:2375
docker service rollback watchtower_app

Wait for convergence (up to 60 seconds):

for i in $(seq 1 30); do
  RUNNING=$(docker service ps watchtower_app --filter desired-state=running --format '{{.CurrentState}}' | grep -c 'Running')
  if [ "$RUNNING" -ge 2 ]; then
    echo "Rollback converged: $RUNNING replicas running"
    break
  fi
  sleep 2
done

Read the full file on GitHub · 122 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 122 lines · 0 tokens per session scan A 1f89bdbdf265

Subscribe to this mod's changes

rollback is a command published in the GitHub repository DimitriGeelen/agentic-engineering-framework (18 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 818 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.