跳转到内容

Agent 支持

Agent Note 对所有 agent 使用相同的 git note 格式,但每个 agent 暴露的 hook 和 transcript 数据不同。本页帮助你在团队启用前了解预期效果。

Agent状态PromptResponseFilesAI RatioLine Estimate
Claude CodeFull support默认显示
Codex CLISupported当 Codex patch 记录与最终 Commit 匹配时
CursorSupported当 edit count 匹配,且 final file 仍匹配最后一次 AI edit 时
Gemini CLIPreview尚未支持
Terminal window
npx agent-note init --agent claude

只启用团队实际使用的 agent。一个 repository 可以同时启用多个 agent。

Terminal window
npx agent-note init --agent claude codex cursor gemini

每个 developer 在 clone 后都需要运行一次 init,因为 git hooks 位于 .git/ 内。

你需要…可以期待…
目前最完整的逐行归因Claude Code
保守归因的 Codex CLI 支持Codex CLI
Cursor 编辑器历史和 response 恢复Cursor
Gemini CLI 的 prompt / response 捕获Gemini CLI

Line-level 会在 Agent Note 能安全比较 AI edit、后续 human edit 和最终 commit diff 时统计 AI-added lines。证据不足时使用 file-level。

Agent Note 优先保守 fallback,而不是猜测。

Claude Code 通过 hook 提供 prompt、response 和 edit data。Agent Note 记录 AI edit 前后的 file state,并从最终 diff 中扣除后续 human edit。

Codex CLI 是 transcript-driven。Agent Note 读取 local transcript,并仅在 apply_patch 计数匹配最终 diff 时升级到 line-level。

Cursor 使用 afterFileEdit / afterTabFileEdit,以及 response hook 或 local transcript。只有 edit count 匹配,且 final file 仍匹配最后一次 AI edit 时,才可使用 line-level。

Gemini CLI 使用 BeforeTool / AfterTool 记录文件,使用 BeforeAgent / AfterAgent 记录 prompt / response。目前 attribution 为 file-level。

  • 没有 AI-authored file 的 commit 不会写入 note。
  • 属于旧 commit window 的 prompt 可能被省略。
  • agent 没有暴露 response 时,response 可能为空。
  • generated artifacts 和 repository root 的 .agentnoteignore 中列出的 path 仍会保留在 Notes、PR Report 和 Dashboard 中,只会从 AI Ratio denominator 中排除。

排查请从 Troubleshooting 开始。