SuperAPI AI 工具集

handoff

编程与开发

查看项目

更新于 10-16 00:20

技能介绍

用途:维护项目内的 .docs/handoff.md,作为下一个编码智能体或人类开发者的冷启动入门文件。它只记录临时会话状态:改了什么、做了什么决定、卡在哪里、如何继续。

主要能力:捕获 git 状态(分支、HEAD、工作区改动),统计已修改、未跟踪、已暂存路径,并在 Status 段列出前 3-5 个变更路径;记录会话内的逻辑改动、决策及理由、阻塞与待办、失败尝试;记录验证状态与下一条命令。文件采用全量重写而非追加,硬性上限 200 行,超出时从最旧的 What changed 条目开始截断并插入警告注释。

使用方式:直接命令 /handoff、/handoff init;刷新短语如 update handoff、session handoff、refresh handoff、save handoff;恢复短语如 cold-start primer、resume checklist、handoff to next session;Stop hook 在 .docs/handoff.md 已存在时静默刷新。脚本基线命令:uv run skills/handoff/scripts/handoff.py --project-root "$PWD",初始化加 --init,试运行加 --dry-run。

前置条件:项目根目录可用 git,对 .docs/handoff.md 有写权限。可选标记文件 .docs/handoff.last-validation 与 .docs/handoff.session。

限制:验证状态不可用时写“not recorded this session”,不臆造通过或失败;不在 git 仓库中刷新会明确失败;不自动迁移旧大小写或旧路径的 handoff;必须保留 schema 标题与顺序、权威边界行、全量重写语义和 200 行上限。

验证命令:uv run python scripts/validate_evals.py;uv run scripts/evaluate_package.py skills/handoff;uv run skills/handoff/scripts/handoff.py --project-root <repo> --dry-run;uv run skills/handoff/scripts/handoff.py --project-root <repo> --init --output <tmp-file>。