ck_rollback
Safely revert agent work using git checkpoints recorded before each task, with automatic audit findings and prevention of rollback when downstream tasks depend on changes.
Instructions
Execute a governed rollback of an agent's work. Records a git checkpoint before each task and provides a single action to revert. Safety-checked: refuses if downstream tasks depend on the changes. Creates an audit finding on every rollback. Modes: checkpoint (capture git HEAD before task), execute (revert agent's changes), status (check snapshot state), list (all snapshots for session).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Operation mode. Defaults to status. | |
| project_root | No | Absolute path to the project root. | |
| reason | No | Reason for rollback. Recorded in audit finding. | |
| session_id | Yes | Session identifier. | |
| task_id | No | Task identifier. Required for checkpoint, execute, and status modes. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| reverted | No | ||
| sha | No | ||
| snapshots | No | ||
| status | No | ||
| task_id | No |