Loading...
Loading...
Compare original and translation side by side
/reflect.last-reflect-ts/reflect.last-reflect-tsgit worktree list.worktrees/BRANCH=$(git -C <worktree-path> rev-parse --abbrev-ref HEAD)
git branch --merged main | grep -q "$BRANCH" && MERGED=true || MERGED=falsegit worktree remove <path>git branch -d $BRANCH.branch-context.mdSession cleanup:
Removed: .worktrees/feat-foo (branch feat/foo, merged)
Kept: .worktrees/feat-baz (branch feat/baz, NOT merged)
Cleaned: .branch-context.md (learnings consolidated)git worktree list.worktrees/BRANCH=$(git -C <worktree-path> rev-parse --abbrev-ref HEAD)
git branch --merged main | grep -q "$BRANCH" && MERGED=true || MERGED=falsegit worktree remove <路径>git branch -d $BRANCH.branch-context.md.branch-context.md 可能包含未被复盘的经验总结。Session cleanup:
Removed: .worktrees/feat-foo (branch feat/foo, merged)
Kept: .worktrees/feat-baz (branch feat/baz, NOT merged)
Cleaned: .branch-context.md (learnings consolidated)Session wrapped. Typewhen ready./clear
会话已收尾。准备就绪后请输入。/clear
| Mistake | Fix |
|---|---|
| Inlining reflect logic | Invoke |
| Removing unmerged worktrees | Warn only — never delete unmerged work |
| Invoking /clear directly | Tell user to type it — /clear is a built-in |
| Cleaning main worktree | Only clean |
| Skipping cleanup report | Always report what was cleaned/kept |
| 错误 | 修复方案 |
|---|---|
| 内嵌复盘逻辑 | 通过Skill工具调用 |
| 删除未合并的工作树 | 仅提示即可 —— 永远不要删除未合并的工作内容 |
| 直接调用/clear | 告知用户手动输入 —— /clear是内置命令 |
| 清理主工作树 | 仅清理 |
| 跳过清理报告 | 始终上报已清理/保留的内容 |