checkpoint
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/checkpoint
/checkpoint
What
功能
A quick mid-session save that banks the known-good state in two moves:
- Descriptive git commit — stage relevant changes and commit with a message that summarizes the work.
- Brief handoff note — write so a resumed session (or you, after a botched refactor) knows exactly where things stand.
.claude/handoff.md
Checkpoint is the mid-session save; is the end-of-session ritual.
Checkpoint commits and jots a note, then keeps working. Wrap-up does the full
handoff plus learning extraction into .
/wrap-upMEMORY.md这是一个快速的会话中途保存操作,通过两步来记录已知的良好状态:
- 描述性git commit —— 暂存相关更改,并使用总结工作内容的消息提交。
- 简短交接笔记 —— 编写文件,以便恢复会话时(或在重构失败后)能准确了解当前状态。
.claude/handoff.md
Checkpoint是会话中途保存功能;/wrap-up是会话结束流程。Checkpoint会提交更改并记录笔记,然后继续工作。Wrap-up会完成完整的交接,并将学习内容提取到中。
MEMORY.mdWhen
使用场景
- Before a risky refactor or destructive change — checkpoint the known-good state
- When switching to a different task or feature mid-session
- After completing a logical unit of work — bank it
- User says "checkpoint", "save progress", "save state", "pause here"
- If the session is actually ending, use for the full ritual
/wrap-up
- 在进行有风险的重构或破坏性更改之前——保存已知的良好状态
- 会话中途切换到不同任务或功能时
- 完成一个逻辑工作单元后——保存进度
- 用户说出"checkpoint"、"save progress"、"save state"、"pause here"时
- 如果会话实际要结束,请使用/wrap-up完成完整流程
How
操作步骤
- Assess state — and
git statusto see staged and unstaged changes.git diff - Stage changes — Stage specific files; never . Exclude generated files, build artifacts, and secrets (
git add -A, credentials)..env - Commit — Descriptive message following the repo's commit style
(conventional prefixes: ,
feat:,fix:). New commit, never amend. If there is nothing to commit, skip to the handoff.refactor: - Write handoff note — , same format as
.claude/handoff.mdbut abbreviated: Completed, Pending (with specific next steps), Learned (only if something non-obvious surfaced), and Context (branch + commit hash). One file, always overwritten./wrap-up - Confirm — Report the commit hash and the handoff summary, then resume work.
- 评估状态 —— 使用和
git status查看已暂存和未暂存的更改。git diff - 暂存更改 —— 暂存特定文件;切勿使用。排除生成文件、构建产物和敏感信息(
git add -A、凭证)。.env - 提交 —— 遵循仓库提交风格的描述性消息(常规前缀:、
feat:、fix:)。创建新提交,切勿修改现有提交。如果没有可提交的内容,直接跳至交接步骤。refactor: - 编写交接笔记 —— 写入,格式与/wrap-up相同但更为简洁:已完成项、待处理项(含具体下一步)、学到的内容(仅记录非显而易见的信息),以及上下文(分支 + 提交哈希)。始终覆盖该文件。
.claude/handoff.md - 确认 —— 报告提交哈希和交接摘要,然后继续工作。
Safety Rules
安全规则
- Never push, force-push, or touch remote branches
- Never commit secrets
- Never amend — a checkpoint is a new commit you can return to
- No changes to commit? Update the handoff only
- 切勿推送、强制推送或操作远程分支
- 切勿提交敏感信息
- 切勿修改现有提交——Checkpoint是一个可回溯的新提交
- 无更改可提交?仅更新交接笔记即可
Example
示例
User: /checkpoint — about to try the EF Core split-query refactor
Claude: 3 files modified, 1 new.
Commit a1b2c3d: "feat: add CreateOrder validation with FluentValidation"
- src/Orders/Features/CreateOrder.cs
- src/Orders/Features/CreateOrderValidator.cs (new)
- tests/Orders.Tests/Features/CreateOrderTests.cs
Handoff updated (.claude/handoff.md):
## Completed
- [x] CreateOrder validation + 3 test scenarios
## Pending
- [ ] Split-query refactor in GetOrderDetails (about to attempt)
## Context
- Branch: feature/order-validation | Checkpoint: a1b2c3d
Checkpoint saved — safe to proceed with the risky refactor.User: /checkpoint — about to try the EF Core split-query refactor
Claude: 3 files modified, 1 new.
Commit a1b2c3d: "feat: add CreateOrder validation with FluentValidation"
- src/Orders/Features/CreateOrder.cs
- src/Orders/Features/CreateOrderValidator.cs (new)
- tests/Orders.Tests/Features/CreateOrderTests.cs
Handoff updated (.claude/handoff.md):
## Completed
- [x] CreateOrder validation + 3 test scenarios
## Pending
- [ ] Split-query refactor in GetOrderDetails (about to attempt)
## Context
- Branch: feature/order-validation | Checkpoint: a1b2c3d
Checkpoint saved — safe to proceed with the risky refactor.Related
相关功能
- — End-of-session ritual: full handoff format definition plus learning extraction into MEMORY.md
/wrap-up - — Get the build green before checkpointing
/build-fix
- —— 会话结束流程:完整交接格式定义,以及将学习内容提取到MEMORY.md中
/wrap-up - —— 在创建Checkpoint前修复构建问题
/build-fix