Loading...
Loading...
Refactor code with safety nets — tests green before and after, no behavior change
npx skill4agent add zhengxuyu/zforge refactorgit checkout main && git pull/fix-buggit worktree add .claude/worktrees/refactor-<name> -b refactor/<description>
cd .claude/worktrees/refactor-<name>git diff main...HEADgh pr creategh pr checks <number> --watchgh pr merge <number> --mergecd <project-root> && git worktree remove .claude/worktrees/refactor-<name>git checkout main && git pull && git branch -d refactor/<description>| # | Check | Answer |
|---|---|---|
| 1 | What changed — what was refactored and why | [brief] |
| 2 | Behavior preserved — does the code behave identically? | [yes/no + evidence] |
| 3 | Single source of truth — no duplicate data paths or redundant caches introduced? | [yes/no + evidence] |
| 4 | Test regression — do all existing tests pass? Same count as baseline? | [pass count / fail count] |
| 5 | Reuse — did you reuse existing patterns/functions, or reinvent something? | [yes/no + evidence] |