Guru完成任务
castbox2026-10-25查看 1756复制 1150
将 Completion 和 Closure 持久化到一个经过审查的任务归档和终端记账结果中。
📘如何使用这个技能
- 1复制技能内容·点击上方「Copy SKILL.md」复制全部内容,或 Download 下载到本地
- 2打开你的 AI 客户端·支持 Claude Code、Trae、Cursor、ChatGPT、DeepSeek、Kimi 等任意 AI 助手
- 3粘贴为系统提示/知识文件·Claude Code:放入 .claude/skills/ 目录;普通对话:作为首条消息发送并说「请严格按这份技能文档执行」
- 4直接提出你的需求·AI 会按技能定义的工作流、格式和约束来处理,无需再解释背景
💡 提示:技能生效后,每次对话只需一句需求,AI 会按 SKILL.md 的流程执行。
SKILL.md2919 chars
--- name: guru-finish-task description: Persist Completion and Closure into one reviewed task archive and terminal bookkeeping result. --- # Guru Finish Task Finish accepts only the current Closure ResultRefDTO, resolves TaskRef from the stable TaskId, and reads the exact terminal action set through the shared read-only Closure result API. Before terminal mutation it compares the Closure-frozen source with the current task source and rereads every required-closed Issue; drift returns `closure_refresh_required` for Closure's semantic re-entry. A bookkeeping merge is not a business Delivery and never closes an Issue. For a noncanonical legacy task still lacking `task.json.source`, the exact Closure-frozen non-exact source is used until the already-required archive metadata write materializes it; a short Issue scope never grants close authority. The normal transaction has three independently confirmed mutations: local archive projection, bookkeeping commit/push/PR publication, and expected-head merge. The executor recovers only that exact transaction and returns `success` only after the remote target baseline contains the final archive and no active copy. Before moving the task out of the active tree, the archive projection uses the Fixed Fork session API to retire only pointers for this exact TaskId and generation. A projected but unsealed archive resumes the original Finish transaction by explicit identity; it is not a Reactivate candidate. The archive locator belongs in finish-summary, not in the retired `task.json.archive_dir` metadata field. The reviewed payload forbids Issue-closing keywords and both legacy `Guru-Delivery-Task` / `Guru-Delivery-Cycle` and current `Guru-Task-Identity` / `Guru-Delivery-Schema` / `Guru-Delivery-Head` trailers. Validate the current semantic payload before local archive projection and on every successful re-entry, including an already open bookkeeping PR before its merge. Only after remote target verification does Finish seal the current generation and exact result in the common-dir resource ledger against the bookkeeping PR head (the cleanup refs' actual HEAD), then retire its branch binding. The target merge commit separately proves that the archive is persisted. `success` hands its ResourceSealRefDTO to Cleanup; missing terminal ownership returns `manual_cleanup_required`. Finish never deletes a resource. This canonical manual route records the minimal terminal identity in Git common-dir so it survives removal of the original checkout; Reactivate requires its matching completed manual Cleanup receipt before using the archived generation. The Finish bookkeeping commit and target merge commit remain distinct identities. The active graph invokes this package only after Completion and Closure. If the shared Closure result reader is unavailable, Finish stops before terminal mutation instead of accepting an unbound caller action list.