用途:在项目根目录,或每个有改动的 monorepo 包(app/、processing/ 等)中运行,用于收尾工作。
主要能力与流程: 验证:读取 package.json 中的 scripts.check,运行 bun run check,修复根因并重复运行直至通过。lint/format 可能重写文件。 合并修复:将 lint/format 改动与功能改动一起暂存,绝不单独做 lint 或 format 提交。 提交信息:按指定格式撰写。 默认提交:除非用户明确不想提交,否则执行提交路径。 仅在明确不提交意图时只做草稿:展示提交信息并停止,不运行 git commit。
不提交意图包括:明确推迟(don't commit、draft only、message only、what would the commit be)、仅检查或修复(无收尾的 run check、fix lint、fix CI)、仅审查或提问的回合,或用户表示自己会提交。
意图模糊时优先提交,尤其是在完成改动后或用户调用 finish-work 收尾时。
提交路径:并行运行 git status、git diff、git log -5;只暂存相关文件;通过 HEREDOC 执行 git commit;再用 git status 验证。
安全:未经要求不 push。不使用 --no-verify。不 amend 已推送的提交。不暂存密钥或无关的脏文件。 若已提交且验证只修复了 lint/format:HEAD 未推送时用 git commit --amend --no-edit;否则先暂存并询问再 amend。
E2E 不包含在 check 中。UI/路由/鉴权改动还需运行 bun run e2e(或已定义的 check-full)。参见 playwright-skill。脚本名称参见 package-json-scripts.md。
提交信息格式: <Topic>: <Desc>
- <面向用户的成果要点> Ping https://github.com/org/repo/pull/123
Topic 为范围(Map、Auth、Processing、Dev 等)。FMC 仅内部改动(依赖、CI、工具)使用 Dev。Desc 用祈使句写成果,而非文件名。正文用要点写落地后用户/运营者所见、所做或所得,对话中已确立原因时可写原因;停留在成果层面,不列文件、符号、重构或 diff 步骤。正文供 user-changelog 使用,须脱离补丁也可读懂。Ping:若用户引用了 PR/issue,每项加一行 Ping <完整 URL>。
示例: Region map: clamp initial viewport to bounds
- Users: map fits selected region on load instead of generic Germany view (confusing deep links)
- Preserve explicit zoom in URL so shared links do not jump Ping https://github.com/FixMyBerlin/tilda-geo/issues/5678
仅内部改动(无用户可见变化):可写维护者要点;无适用项时省略用户要点。
相关:close-worktree(land worktree → develop;脏时调用本技能)| unslop-code(post-LLM cleanup;每阶段提交时调用本技能)| playwright-skill | tech-stack | review-dependabot / babysit | user-changelog。