Repository navigation
feat: 新增 agent-run-forensics 技能(从录像回答「它刚才为什么那么做」) - #24
Open
xizhuomengcontin wants to merge 2 commits into
Open
xizhuomengcontin wants to merge 2 commits into
xizhuomengcontin wants to merge 2 commits into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
新增技能
skills/agent-run-forensics/,并在 README 技能列表里补一节(按现有<details>折叠块的格式)。它解决什么
现在排查一次 agent 跑坏的会话,最常见的做法是问 agent 自己。但它的回答来自自己上下文窗口的摘要,而摘要里已经没有工具返回值、没有 shell 退出码、也没有那些没人提起却确实被改掉的文件。答案通顺、自信,偶尔是错的——「听起来很确定的错答案」比「不知道」更糟,而且它会被当成结论写进代码库的历史里。transcript 也不行,它是对话对那次运行的投影,不是那次运行。
这个技能只强制一条规则:问的是已经发生的事,就必须先读证据再回答。 录像存在时靠回忆作答是错的流程,哪怕这次蒙对了。
配套强制的第二件事,是把两种断言分开:
与仓库里已有技能的关系
和
handoff是一对:handoff把当前会话压缩成交接文档给下一个 agent;这个是把已经结束的会话当证据来读。两者不重叠,一个向前一个向后。和
github-fix-issue也能配:别人报的失败如果有录像,可以不要对方的 key、不花 token 直接在本地复现,再进入修复流程。边界写在技能正文里,不藏在文档中
curl、装过的包、写过的数据库,重放会再干一遍。它不是沙箱。 技能要求首次重放前先读录像里的 shell 命令,并在隔离副本里跑(否则录像的文件树会覆盖工作区,未提交的改动在重放期间不可见)。reused=3/5通常不是部分失败:harness 会为自己发请求(额度探测、会话命名),重放不重复这些。这条不写明的话,很多人要在这里浪费二十分钟。依赖与披露
技能驱动的是
orcareplay(Apache-2.0,npm,Node 20+)暴露的 MCP server:npm i -g orcareplay,然后注册{"command": "orca", "args": ["mcp"]}。这个工具是我维护的,请按「厂商自写」来衡量。技能里有明确的「没有录像怎么办」分支——直接说出来并给补录方式,而不是悄悄改用回忆补齐,那正是它要替代的失败模式。本机没有跑
CLAUDE_CONFIG_DIR的冒烟测试(贡献指南里那条),因为这台机器上的 Claude Code 配置正在用于别的工作,我不想动它——如实说明这一步没做。技能本身的工作流我按其内容实跑过:orca list/orca show/orca graph/orca replay四条路径都验证过,重放结论行是reused=1/1 exact=1 divergences=0。如果你希望我补跑那条冒烟测试再合,我可以在一台干净环境上做完再回来。只动了
skills/agent-run-forensics/SKILL.md和 README 一节,没碰settings.json、plugins/或其他配置。