wrap-up
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSession Wrap-Up
会话收尾
Run these checks in parallel, then deliver a single consolidated report.
并行执行以下检查,然后生成一份整合后的报告。
Preflight — is this a git repo?
预检:当前目录是否为git仓库?
Run . If it fails (the current folder is not a git repository), skip the git, harness, and commit-and-push sections entirely. Run only checks 2 and 3 below, deliver a short report, and end with the line:
git rev-parse --git-dir 2>/dev/nullℹ️ Not a git repo — git, harness, and commit checks skipped.执行。若命令执行失败(当前目录并非git仓库),则完全跳过git、测试套件及提交推送相关环节。仅执行下方第2、3项检查,生成简短报告,并在结尾添加以下内容:
git rev-parse --git-dir 2>/dev/nullℹ️ 非git仓库 — git、测试套件及提交检查已跳过。Checks to run
需要执行的检查
1. Git status
Run and .
Report: uncommitted files (count + list), unpushed commits (count + list).
If both are clean, state that clearly.
git status --shortgit log --oneline "@{u}.." 2>/dev/null1b. Test harness (project-aware)
If exists in the repo root AND there is at least one uncommitted text file (any file the harness might care about: markdown, code, config), run and include the result. If the harness passes, report . If it fails, list each failure as and recommend for full detail. If does not exist, skip this check silently — most repos have no MEL harness.
tests/run_tests.pypython tests/run_tests.py✅ Harness N/N⚠️ HARNESS:/testtests/run_tests.py2. Recent errors
Scan this conversation for any error messages, failed commands, or unresolved issues that were identified but not fixed. Look for: stack traces, "error:", "failed", "TODO", explicit "I'll fix this later" statements.
3. Pending actions
Identify anything Ane said she would do or that was left open:
- Files to review or send
- Follow-up tasks mentioned
- Decisions deferred
- Any explicit "next steps" not yet taken
4. Uncommitted changes risk
If there are uncommitted files, run to assess what is at risk of being lost.
git diff --stat1. Git状态检查
执行和。
报告内容:未提交文件(数量+列表)、未推送提交(数量+列表)。
若两者均无异常,需明确说明状态干净。
git status --shortgit log --oneline "@{u}.." 2>/dev/null1b. 项目测试套件(项目感知型)
若仓库根目录存在,且至少有一个未提交的文本文件(测试套件可能关注的文件:markdown、代码、配置文件),则执行并包含结果。若测试通过,报告;若测试失败,将每个失败项列为并建议使用查看详细信息。若不存在,则静默跳过此检查——大多数仓库没有MEL测试套件。
tests/run_tests.pypython tests/run_tests.py✅ Harness N/N⚠️ HARNESS:/testtests/run_tests.py2. 近期错误检查
扫描本次对话,查找所有已识别但未修复的错误信息、失败命令或未解决问题。重点关注:堆栈跟踪、"error:"、"failed"、"TODO"、明确的"稍后修复"表述。
3. 待处理操作检查
识别Ane提及的所有待完成事项或未收尾工作:
- 需要审核或发送的文件
- 提及的后续任务
- 推迟的决策
- 任何尚未执行的明确"下一步"动作
4. 未提交变更风险评估
若存在未提交文件,执行评估可能丢失的内容。
git diff --statReport format
报告格式
Deliver as a tight checklist. One line per item. No preamble.
SESSION WRAP-UP — [date]
GIT
✅ Nothing uncommitted OR ⚠️ N file(s) uncommitted: [list]
✅ All pushed OR ⚠️ N commit(s) not pushed: [list]
HARNESS (only when relevant files were touched)
✅ N/M checks passed OR ⚠️ N harness check(s) failing — /test for detail
ERRORS
✅ No unresolved errors OR ⚠️ [description of unresolved issue]
PENDING ACTIONS
✅ Nothing open OR ⚠️ [action]: [what Ane committed to]
RECOMMENDATION
[One sentence: either "Safe to close" or specific action to take first]以紧凑的清单形式呈现。每项占一行,无需开场白。
SESSION WRAP-UP — [日期]
GIT
✅ 无未提交内容 OR ⚠️ N个未提交文件:[列表]
✅ 所有提交已推送 OR ⚠️ N个未推送提交:[列表]
HARNESS(仅当相关文件被修改时显示)
✅ N/M项检查通过 OR ⚠️ N项测试套件检查失败 — 输入/test查看详情
ERRORS
✅ 无未解决错误 OR ⚠️ [未解决问题描述]
PENDING ACTIONS
✅ 无待处理事项 OR ⚠️ [动作]:[Ane承诺完成的内容]
RECOMMENDATION
[一句话建议:要么"可安全关闭会话",要么明确需先执行的操作]Commit and push
提交与推送
After delivering the report, if there are uncommitted files or unpushed commits, finish the work block by committing and pushing. Ane has a standing instruction to always commit and push at the end of a work block. Do not ask for permission — execute.
Gate 1 — Harness must pass (if it ran).
If check 1b ran and reported any line, STOP. Do not commit. Tell Ane the harness is red and recommend for detail. The wrap-up ends here.
⚠️ HARNESS:/testGate 2 — Sensitive-file scan.
Before staging, scan the uncommitted file list against these patterns: , , , , , , , , . If any uncommitted file matches, list the matches and ask Ane explicitly which (if any) to include before proceeding. Otherwise continue silently.
.env.env.**credentials**secret**token**.key*.pem*.pfx*api_key*Gate 3 — WIP exclusion.
If any uncommitted file is unrelated to the current session's work and looks mid-edit (a single file the user was clearly developing in another window, e.g. a marker or placeholder added inline), exclude it from the commit. List excluded files in the report so Ane sees what was left behind.
TODONoneStage explicitly.
Add files by name (). Never use or — these sweep gitignored runtime state, OS metadata, and unrelated WIP into commits.
git add path/to/file path/to/othergit add -Agit add .Draft the message.
Match recent style: run and use the same conventional-commit prefix scheme (, , , , , with optional scope like ). One-line title under 72 chars; one or two body sentences only when the why is non-obvious. Do not include a generated-by footer unless the project's CLAUDE.md asks for one.
git log --oneline -10feat:fix:docs:chore:refactor:docs(overlay):Commit.
Pass the message via a single-quoted HEREDOC so PowerShell/bash do not expand or backticks:
$git commit -m "$(cat <<'EOF'
<title>
<optional body>
EOF
)"Push.
Run . If the branch has no upstream, set it: . If push is rejected because the remote is ahead, run then — never from this skill.
git pushgit push -u origin <branch>git pull --rebasegit push--forceConfirm in the report.
Append a final line to the wrap-up report:
COMMIT & PUSH
✅ Committed <short-SHA> "<title>"
✅ Pushed to <remote>/<branch>Or, if a gate stopped the commit:
COMMIT & PUSH
⚠️ Skipped — <reason>: [files]If the working tree was already clean and there were no unpushed commits, omit this section entirely.
生成报告后,若存在未提交文件或未推送提交,则完成提交推送操作。Ane已明确指示,工作阶段结束时需始终提交并推送内容。无需询问许可,直接执行。
关卡1 — 测试套件必须通过(若已执行)
若第1b项检查执行后报告中出现相关内容,立即停止操作,不进行提交。告知Ane测试套件未通过,并建议使用查看详细信息。本次收尾流程到此结束。
⚠️ HARNESS:/test关卡2 — 敏感文件扫描
在暂存文件前,将未提交文件列表与以下模式匹配:, , , , , , , , 。若有未提交文件匹配上述模式,列出匹配文件并明确询问Ane是否包含这些文件,再继续操作。若未匹配到,则静默继续。
.env.env.**credentials**secret**token**.key*.pem*.pfx*api_key*关卡3 — 排除WIP内容
若任何未提交文件与当前会话工作无关,且看起来处于编辑中(例如用户在其他窗口开发的单个文件,包含标记或占位符),则将其排除在提交之外。在报告中列出排除的文件,以便Ane了解未提交的内容。
TODONone明确暂存文件
通过文件名添加文件()。禁止使用或——这些命令会将git忽略的运行时状态、系统元数据及无关的WIP内容纳入提交。
git add path/to/file path/to/othergit add -Agit add .撰写提交信息
匹配近期风格:执行并使用相同的约定式提交前缀规范(, , , , , 可添加可选作用域如)。标题为单行,不超过72字符;仅当原因不明显时添加1-2行正文。除非项目的CLAUDE.md要求,否则无需添加生成来源页脚。
git log --oneline -10feat:fix:docs:chore:refactor:docs(overlay):提交操作
通过单引号HEREDOC传递提交信息,避免PowerShell/bash解析或反引号:
$git commit -m "$(cat <<'EOF'
<title>
<可选正文>
EOF
)"推送操作
执行。若分支无上游分支,设置上游分支:。若推送因远程分支超前被拒绝,执行后再推送——本工具禁止使用参数。
git pushgit push -u origin <branch>git pull --rebase--force在报告中确认结果
在收尾报告末尾添加以下内容:
COMMIT & PUSH
✅ 已提交 <short-SHA> "<title>"
✅ 已推送到 <remote>/<branch>若因某关卡阻止了提交,则添加:
COMMIT & PUSH
⚠️ 已跳过 — <原因>:[文件]若工作区已干净且无未推送提交,则完全省略此部分。