gpd-undo

Reverts the last GPD git commit with a safety checkpoint tag.

Updated Mar 18, 2026
One-click install
npx skills add https://github.com/MichaelsEngineering/sentinel-multiscale-field-dynamics --skill gpd-undo-michaelsengineering
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gpd-undo
Source: https://github.com/MichaelsEngineering/sentinel-multiscale-field-dynamics/tree/main/.agents/skills/gpd-undo
Command: npx skills add https://github.com/MichaelsEngineering/sentinel-multiscale-field-dynamics --skill gpd-undo-michaelsengineering

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a GPD plan, execution, or verification step produces incorrect results, manually rolling back the associated git commit risks losing work or corrupting state tracking. This Skill performs a controlled, reversible rollback of the last GPD-related commit. ## Core Features & Use Cases - Safe Commit Revert: Identifies the last GPD-scoped commit (docs(gpd):, fix(gpd):, feat(gpd):, chore(gpd):, phase-NN scopes) and reverts it via git revert instead of destructive resets. - Safety Checkpoint Tag: Creates a timestamped gpd-checkpoint tag before reverting so the undo operation itself can be reversed with git reset --hard. - State Synchronization: Detects when the reverted commit modified .gpd/STATE.md and rolls back state tracking via the GPD CLI so STATE.md and state.json stay aligned. - Use Case: After a phase execution commit introduced wrong research output, run the undo workflow to preview the impact, confirm, checkpoint, revert, and restore state tracking in one guided flow. ## Quick Start Ask the assistant to undo the last GPD operation, optionally with the --dry-run flag to preview the commit and affected files before confirming the revert.

Frequently Asked Questions about gpd-undo

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I undo the last GPD commit in git?▼

Run the gpd-undo workflow, which finds the last commit with a GPD prefix such as docs(gpd): or feat(phase-NN):, shows its impact, asks for confirmation, creates a checkpoint tag, and reverts it with git revert.

How to preview a git revert before committing it?▼

Use the --dry-run flag with the undo workflow. It displays the target commit hash, message, changed files, and diff summary without performing any revert or creating tags.

Can git revert undo a merge commit safely?▼

This workflow refuses to undo merge commits because they require manual parent selection with git revert -m 1. It detects multiple parents via git cat-file and exits with an explanation instead of attempting the revert.

What happens to STATE.md when a GPD commit is reverted?▼

If the reverted commit modified .gpd/STATE.md, the workflow rolls back the affected fields using gpd state update or state patch so STATE.md and state.json remain aligned, then records the rollback as a decision.

How do I reverse an undo operation in git?▼

Every undo creates a timestamped gpd-checkpoint tag before reverting. To restore the pre-undo state, run git reset --hard with that checkpoint tag name shown in the completion summary.