rollback
Skill6 starsChanged 13 days agoApache-2.0View on GitHub
Safely undo changes by restoring to a checkpoint. Use when verify fails, errors occur, or explicit undo is requested. Essential for the CAVR pattern recovery.
10 other projects use a version of this.
Adopted by
Most recently taken up by
- harshanandak/forge-legacytheir own version, first seen Oct 17, 2026
- elfrost/ai-patchlabtheir own version, first seen Oct 13, 2026
- tejastn10/workbenchtheir own version, first seen Oct 13, 2026
- purpleeddy/claddingtheir own version, first seen Oct 11, 2026
- popup-studio-ai/bkit-claude-codetheir own version, first seen Oct 8, 2026
- kapadias/nonnatheir own version, first seen Oct 1, 2026
Used with
Projects with it also use status, ship and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AnthropicSkillstatus
Case status summary by audience — client-facing (plain language), internal (for the professor), or court-ready (formal caption format per local rules). Same facts, different framing and depth. Use when a student needs to update the client, brief the professor, or prepare a court status report.
Also in 3 projects that use this
AWSSkillship
Finalize dev work on an issue branch — update docs, push, and open a PR.
Also in 3 projects that use this
SentrySkillreview
Fixture review skill.
Also in 3 projects that use this
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- suboss87/FDEOps★ 940same name
- popup-studio-ai/bkit-claude-code★ 605same name
- ww-w-ai/bkit-claude-code★ 605same name
- ww-w-ai/bkit-gemini★ 66same name
- nahid-sparktales/agent-dispatcher★ 59same name
- purpleeddy/cladding★ 16same name
- harshanandak/forge-legacy★ 4same name
- elfrost/ai-patchlab★ 1same name
- tejastn10/workbench★ 1same name
- kapadias/nonna★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository42 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- attributeSkill
- auditSkill
- gap-analysis-workflowSkill
- checkpointSkill
- classifySkill
- compareSkill
- constrainSkill
- critiqueSkill
- debug-workflowSkill
- decomposeSkill
- delegateSkill
- detectSkill
- digital-twin-bootstrapSkill
- digital-twin-sync-workflowSkill
- discover-capabilitiesSkill
- discoverSkill
- executeSkill
- explainSkill
- generateSkill
- groundSkill
- inquireSkill
- integrateSkill
- invokeSkill
- measureSkill
- mutateSkill
- observeSkill
- persistSkill
- perspective-validationSkill
- planSkill
- predictSkill
- recallSkill
- receiveSkill
- retrieveSkill
- searchSkill
- sendSkill
- simulateSkill
- stateSkill
- synchronizeSkill
- transformSkill
- transitionSkill
- verifySkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 9 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 65
No orphaned artifacts remain from failed mutation
- Very specific: line 83
Look up checkpoint by ID in .checkpoints/ or git stash
- Distinctive: line 84
Verify checkpoint integrity (hash check)
- Distinctive: line 86
If checkpoint missing: FAIL immediately with clear error
- Distinctive: line 91
Document changes that will be undone
- Distinctive: line 102
Check for orphaned files created during failed mutation
- Distinctive: line 273
Do not rollback if checkpoint has expired
- Distinctive: line 275
If verification fails, STOP and alert - do not proceed
- Distinctive: line 292
Never skip verification after rollback
- Distinctive: line 293
Never delete checkpoint until rollback verification passes
“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Intent
Execute rollback to restore system state to a previously created checkpoint. This is the recovery mechanism in the CAVR (Checkpoint-Act-Verify-Rollback) pattern - used when mutations fail or produce undesired outcomes.
Success criteria:
- State fully restored to checkpoint state
- Post-rollback hash matches checkpoint hash
- No orphaned artifacts remain from failed mutation
- Audit trail of what was reverted
Compatible schemas:
schemas/output_schema.yaml
Inputs
| Parameter | Required | Type | Description |
checkpoint_id | Yes | string | ID of checkpoint to restore to |
scope | No | string | Specific files/keys to rollback (default: all in checkpoint) |
Inputs not listed here are outside the capability's contract: a workflow step that binds them gets W604 (STANDARD v1.1 §5.5).
Procedure
- Validate checkpoint: Confirm checkpoint exists and is valid
- Look up checkpoint by ID in
.checkpoints/or git stash - Verify checkpoint integrity (hash check)
- Confirm checkpoint has not expired
- If checkpoint missing: FAIL immediately with clear error
- Look up checkpoint by ID in
- Capture current state: Record what will be reverted
- List all files/state that differ from checkpoint
- Compute hash of current state for audit
- Document changes that will be undone
- Execute restoration: Apply the restore command
- For git_stash:
git stash poporgit stash apply - For file_backup: Copy from
.checkpoints/<id>/to original locations - For state_snapshot: Restore state variables
- Handle any conflicts or errors gracefully
- For git_stash:
- Verify restoration: Confirm state matches checkpoint
- Recompute hash of restored state
- Compare with checkpoint's pre_mutation_state.hash
- Check for orphaned files created during failed mutation
- Clean up orphaned artifacts if present
- Ground claims: Attach evidence of successful rollback
- Format:
tool:bash:<restore_command>, comparison output - Include before/after state hashes
- Format:
- Format output: Return rollback results per contract
Output Contract
Return a structured object:
restored: boolean # Whether state was restored to the checkpoint
previous_state: # State before rollback
hash: string
summary: string
restored_state: # State after rollback
hash: string
summary: string
restored_to:
checkpoint_id: string
checkpoint_type: string
timestamp: string # When checkpoint was created
changes_reverted:
- file: string
operation: string # What was undone (create, modify, delete)
summary: string # Brief description of change reverted
verification:
checkpoint_hash: string # Expected hash from checkpoint
match: boolean # restored_state.hash == checkpoint_hash
warnings: array[string] # Any issues encountered
next_actions: array[string] # Suggested follow-up
confidence: number # 0.0-1.0
evidence_anchors: ["tool:bash:...", "file:..."]
assumptions: []Field Definitions
| Field | Type | Description |
restored | boolean | Whether rollback was successful (workflows gate on ${<step>.restored}) |
previous_state | any | State before rollback (hash and summary) |
restored_state | any | State after rollback (hash and summary) |
restored_to | object | Checkpoint that was restored to |
changes_reverted | array | List of changes that were undone |
verification.match | boolean | Whether restored state matches checkpoint |
warnings | array | Issues like orphaned files or partial restore |
next_actions | array | What to do next (re-plan, investigate, etc.) |
confidence | number | 0.0-1.0 based on verification match |
evidence_anchors | array | Proof of restoration |
assumptions | array | Explicit assumptions made |
Examples
Example 1: Git Stash Rollback After Failed Tests
Input:
checkpoint_id: "chk_20240115_143022_a7b3c9"Reason for the rollback: tests failed after refactoring.
Output:
restored: true
previous_state:
hash: "sha256:deadbeef..."
summary: "2 handler files with refactored, failing code"
restored_state:
hash: "sha256:e3b0c442..."
summary: "Handlers as of checkpoint"
restored_to:
checkpoint_id: "chk_20240115_143022_a7b3c9"
checkpoint_type: git_stash
timestamp: "2024-01-15T14:30:22Z"
changes_reverted:
- file: "src/api/handlers/user.py"
operation: modify
summary: "Reverted refactored get_user() function"
- file: "src/api/handlers/auth.py"
operation: modify
summary: "Reverted auth token validation changes"
verification:
checkpoint_hash: "sha256:e3b0c442..."
match: true
warnings: []
next_actions:
- "critique: Analyze why refactoring broke tests"
- "plan: Create new plan with smaller incremental changes"
confidence: 1.0
evidence_anchors:
- "tool:bash:git stash pop stash@{0}"
- "tool:bash:git diff --stat HEAD"
- "tool:bash:sha256sum src/api/handlers/*.py"
assumptions:
- "No other changes made to stashed files since checkpoint"Evidence pattern: Git stash pop output, diff showing restored state, hash verification.
Example 2: File Backup Rollback with Orphaned Files
Input:
checkpoint_id: "chk_20240115_150000_config"Reason for the rollback: the config migration caused a service failure.
Output:
restored: true
previous_state:
hash: "sha256:newconfig..."
summary: "Migrated database connection string"
restored_state:
hash: "sha256:abc123..."
summary: "Original production config"
restored_to:
checkpoint_id: "chk_20240115_150000_config"
checkpoint_type: file_backup
timestamp: "2024-01-15T15:00:00Z"
changes_reverted:
- file: "config/production.yaml"
operation: modify
summary: "Reverted database connection string changes"
verification:
checkpoint_hash: "sha256:abc123..."
match: true
warnings:
- "Orphaned file detected: config/production.yaml.bak (removed)"
next_actions:
- "audit: Record failed migration attempt"
- "plan: Investigate migration script issue"
confidence: 0.95
evidence_anchors:
- "tool:bash:cp .checkpoints/chk_20240115_150000_config/production.yaml config/"
- "tool:bash:rm config/production.yaml.bak"
- "file:config/production.yaml:1"
assumptions:
- "Checkpoint backup file is not corrupted"Verification
Apply the following verification patterns:
- Rollback Verification: restored_state.hash == checkpoint_hash (CRITICAL)
- State Assertion: No unexpected files remain after rollback
- Evidence Grounding: Restore command execution is captured
- Clean Git State: git status shows no unexpected changes
Verification tools: Bash (for restore and hash), Git (for stash operations)
Safety Constraints
mutation: true (modifies files to restore state)requires_checkpoint: false (but acheckpointMUST precede it: the ontology'scheckpoint→rollbackrequiresedge, else V102)requires_approval: falserisk: medium
Capability-specific rules:
- CRITICAL: Never rollback without valid checkpoint_id
- CRITICAL: Always verify state hash matches after restore
- Clean up orphaned files created by failed mutation
- Do not rollback if checkpoint has expired
- Preserve audit trail of what was reverted
- If verification fails, STOP and alert - do not proceed
Composition Patterns
Commonly follows:
verify- When verify returnspassed: false, trigger rollback (CAVR pattern)mutate/execute- If the side effect fails or verify returnspassed: false, rollbackcheckpoint- Rollback requires prior checkpoint (dependency)
Commonly precedes:
critique- After rollback, analyze what went wrongplan- Create new plan after understanding failureaudit- Record the rollback event
Anti-patterns:
- CRITICAL: Never rollback without existing checkpoint
- CRITICAL: Never continue mutations after rollback without new checkpoint
- Never skip verification after rollback
- Never delete checkpoint until rollback verification passes
Workflow references:
- See
reference/composition_patterns.md#checkpoint-act-verify-rollbackfor CAVR pattern - See
reference/verification_patterns.md#pattern-4-rollback-verificationfor rollback verification - See
reference/composition_patterns.md#debug-code-changefor rollback-then-critique flow
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.

