一键导入
paw-rewind
Workflow rewind utility skill for PAW workflow. Rolls back workflow state to a previous stage or phase with safeguards and user confirmation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Workflow rewind utility skill for PAW workflow. Rolls back workflow state to a previous stage or phase with safeguards and user confirmation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Orchestrates the PAW Review workflow, coordinating activity skills to analyze PRs and generate comprehensive review feedback.
Shared git mechanics for PAW activity skills including branch naming conventions, strategy-based branching logic, and selective staging discipline.
Bootstrap skill for PAW workflow initialization. Creates WorkflowContext.md, directory structure, and git branch. Runs before workflow skill is loaded.
Workflow status activity skill for PAW workflow. Diagnoses workflow state, recommends next steps, explains PAW process, and optionally posts updates to Issues/PRs.
Pre-PR review activity skill for PAW workflow. Reviews implementation against spec before Final PR creation with configurable single-model, multi-model, or society-of-thought execution.
Implementation review activity skill for PAW workflow. Reviews implementation for quality, adds documentation, and returns structured verdict.
| name | paw-rewind |
| description | Workflow rewind utility skill for PAW workflow. Rolls back workflow state to a previous stage or phase with safeguards and user confirmation. |
Execution Context: This skill runs directly in the PAW session (not a subagent)—requires user interaction for confirmation prompts.
Roll back workflow state to a previous stage or phase. Handles safeguard checks, action preview, and git reset upon user confirmation.
Reference: Follow Core Implementation Principles from
paw-workflowskill.
paw-status patterns| Target | Description | Resets to |
|---|---|---|
start | Reset to initialization | After WorkflowContext.md created |
spec | Reset to post-specification | After Spec.md created (full mode only) |
planning | Reset to post-research | After CodeResearch.md created |
phase N | Reset to post-phase N | After Phase N completed |
Target aliases: "go back to spec", "rewind to planning", "reset to phase 2", "roll back to start"
Map user request to target:
specplanningphase 1startIf target unclear, ask user to clarify with available options.
Check target is reachable from current state:
spec requires full mode (minimal mode has no spec stage)phase N requires ImplementationPlan.md with at least N phasesIf invalid, report error with available rewind targets.
Use paw-status patterns to determine:
Find the commit representing the rewind point:
# Find commit where artifact was added
git log --oneline --diff-filter=A -- .paw/work/<work-id>/<artifact> | head -1
| Target | Artifact to search |
|---|---|
start | WorkflowContext.md |
spec | Spec.md |
planning | CodeResearch.md |
phase N | Search for phase completion commit message pattern |
For phase targets, search commit messages:
git log --oneline --grep="Phase N" --grep="phase N" | head -1
If target commit not found, report error with available recovery options.
Before any destructive action, check and warn about:
Uncommitted changes:
git status --porcelain
If non-empty, list files and require confirmation.
Unpushed commits:
git rev-list @{u}..HEAD --count
If upstream not set, treat as 0 unpushed. If > 0, report count and require confirmation.
Orphaned PRs (PRs strategy only):
Query PRs with head branches matching <target>_phase* patterns that would be orphaned by rewind. List PR numbers/URLs.
Present itemized preview grouped by category:
Rewind to: planning (after CodeResearch.md)
Target commit: abc1234
Actions to be performed:
📁 Git Reset:
- Reset to commit abc1234
- Removes: ImplementationPlan.md, all phase changes
🔗 PRs to Close (PRs strategy):
- #42: [Feature] Phase 1 implementation
- #43: [Feature] Phase 2 implementation
⚠️ Warnings:
- 3 uncommitted files will be discarded
- 5 unpushed commits will be removed
Continue with rewind? [yes/no]
On user confirmation:
Close orphaned PRs (PRs strategy):
Git reset:
git reset --hard <target-commit>
Report completion:
If user declines confirmation:
Already at target: Report "Already at {target} stage. No rewind needed." and exit.
Minimal mode + spec target: Report error: "Spec stage not available in minimal workflow mode. Available targets: planning, start"
No commit found: Report error with manual recovery guidance: "Could not identify target commit. You may need to manually reset using git log to find the appropriate commit."
PR close fails: Prompt user: "Could not close PR #42 automatically. Please close manually: {url}"
Report: