ck_rollback
Revert an agent's changes with governed rollback, using git checkpoints and auditing to prevent downstream dependency issues.
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. | |
| reason | No | Reason for rollback. Recorded in audit finding. | |
| task_id | No | Task identifier. Required for checkpoint, execute, and status modes. | |
| session_id | Yes | Session identifier. | |
| project_root | No | Absolute path to the project root. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sha | No | ||
| mode | No | ||
| status | No | ||
| task_id | No | ||
| reverted | No | ||
| snapshots | No |