mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-04-22 05:26:37 +00:00
5.0 KiB
5.0 KiB
name, description, category, tags, disable-model-invocation
| name | description | category | tags | disable-model-invocation | ||||
|---|---|---|---|---|---|---|---|---|
| rollback | Revert implementation to a specific batch checkpoint using git revert, reset Jira ticket statuses, verify rollback integrity with tests, and produce a rollback report. Trigger phrases: - "rollback", "revert", "revert batch" - "undo implementation", "roll back to batch" | build |
|
true |
Implementation Rollback
Revert the codebase to a specific batch checkpoint, reset Jira statuses for reverted tasks, and verify integrity.
Core Principles
- Preserve history: always use
git revert, never force-push - Verify after revert: run the full test suite after every rollback
- Update tracking: reset Jira ticket statuses for all reverted tasks
- Atomic rollback: if rollback fails midway, stop and report — do not leave the codebase in a partial state
- Ask, don't assume: if the target batch is ambiguous, present options and ask
Context Resolution
- IMPL_DIR:
_docs/03_implementation/ - Batch reports:
IMPL_DIR/batch_*_report.md
Prerequisite Checks (BLOCKING)
- IMPL_DIR exists and contains at least one
batch_*_report.md— STOP if missing - Git working tree is clean (no uncommitted changes) — STOP if dirty, ask user to commit or stash
Input
- User specifies a target batch number or commit hash
- If not specified, present the list of available batch checkpoints and ask
Workflow
Step 1: Identify Checkpoints
- Read all
batch_*_report.mdfiles from IMPL_DIR - Extract: batch number, date, tasks included, commit hash, code review verdict
- Present batch list to user
BLOCKING: User must confirm which batch to roll back to.
Step 2: Revert Commits
- Determine which commits need to be reverted (all commits after the target batch)
- For each commit in reverse chronological order:
- Run
git revert <commit-hash> --no-edit - If merge conflicts occur: present conflicts and ask user for resolution
- Run
- If any revert fails and cannot be resolved, abort the rollback sequence with
git revert --abortand report
Step 3: Verify Integrity
- Run the full test suite
- If tests fail: report failures to user, ask how to proceed (fix or abort)
- If tests pass: continue
Step 4: Update Jira
- Identify all tasks from reverted batches
- Reset each task's Jira ticket status to "To Do" via Jira MCP
Step 5: Finalize
- Commit with message:
[ROLLBACK] Reverted to batch [N]: [task list] - Write rollback report to
IMPL_DIR/rollback_report.md
Output
Write _docs/03_implementation/rollback_report.md:
# Rollback Report
**Date**: [YYYY-MM-DD]
**Target**: Batch [N] (commit [hash])
**Reverted Batches**: [list]
## Reverted Tasks
| Task | Batch | Status Before | Status After |
|------|-------|--------------|-------------|
| [JIRA-ID] | [batch #] | In Testing | To Do |
## Test Results
- [pass/fail count]
## Jira Updates
- [list of ticket transitions]
## Notes
- [any conflicts, manual steps, or issues encountered]
Escalation Rules
| Situation | Action |
|---|---|
| No batch reports exist | STOP — nothing to roll back |
| Uncommitted changes in working tree | STOP — ask user to commit or stash |
| Merge conflicts during revert | ASK user for resolution |
| Tests fail after rollback | ASK user — fix or abort |
| Rollback fails midway | Abort with git revert --abort, report to user |
Methodology Quick Reference
┌────────────────────────────────────────────────────────────────┐
│ Rollback (5-Step Method) │
├────────────────────────────────────────────────────────────────┤
│ PREREQ: batch reports exist, clean working tree │
│ │
│ 1. Identify Checkpoints → present batch list │
│ [BLOCKING: user confirms target batch] │
│ 2. Revert Commits → git revert per commit │
│ 3. Verify Integrity → run full test suite │
│ 4. Update Jira → reset statuses to "To Do" │
│ 5. Finalize → commit + rollback_report.md │
├────────────────────────────────────────────────────────────────┤
│ Principles: Preserve history · Verify after revert │
│ Atomic rollback · Ask don't assume │
└────────────────────────────────────────────────────────────────┘