跳到內容

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 開始。