コンテンツにスキップ

エージェント対応

Agent Note はどの agent でも同じ git note 形式で保存します。ただし、各 agent が提供する hook や transcript の情報量は異なります。このページでは、チームで有効化する前に期待できる範囲を確認できます。

Agent状態PromptResponseFilesAI RatioLine Estimate
Claude CodeFull support対応対応対応対応既定で表示
Codex CLISupported対応対応対応対応Codex の patch 履歴が最終 Commit と一致したとき
CursorSupported対応対応対応対応edit 数が一致し、committed file が最後の AI edit と一致したとき
Gemini CLIPreview対応対応対応対応未対応
Terminal window
npx agent-note init --agent claude

チームで実際に使う agent だけを指定します。複数 agent も同じ repository で有効化できます。

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

git hook は .git/ の中にあるため、各 developer は clone 後に 1 回 init を実行する必要があります。

必要なこと期待できるもの
いま最も詳しい行単位の attributionClaude Code
Codex CLI を安全側の判定で使うCodex CLI
Cursor の editor history と response 復元Cursor
Gemini CLI の prompt / response 取得Gemini CLI

Line-level

AI edit、あとから入った人間の edit、最終 commit diff を安全に比較できるとき、AI が追加した行数を数えます。

File-level

line-level の証拠が足りないときは、committed file が agent に触られたかどうかで ratio を計算します。

line-level は保守的です。証拠が揃わない場合、Agent Note は推測せずに file-level へ fallback するか、不確かな note を保存しません。

Claude Code は prompt、response、edit data を hook から取得できます。Agent Note は AI edit 前後の file 状態を記録し、あとから入った人間の edit を最終 diff から差し引きます。

Codex CLI は transcript ベースです。Agent Note は local transcript を読み、apply_patch を committed file に接続し、patch 行数が最終 diff と一致したときだけ line-level に昇格します。

shell-only edit では、command 文字列だけから prompt ごとの files_touched は作りません。現在の Codex transcript を信頼できる場合は、commit-level で commit files を AI-assisted として扱います。

Cursor は afterFileEdit / afterTabFileEdit hook と response hook または local transcript を使います。line-level は、edit 数が一致し、committed file が最後の AI edit と一致したときだけ可能です。

Gemini CLI は file edit の BeforeTool / AfterTool と、prompt / response の BeforeAgent / AfterAgent を使います。attribution は現在 file-level です。

データがない場合、多くは Agent Note が安全側に倒した結果です。

  • agent が触った committed file を見つけられない commit には note を書きません。
  • 古い commit window に属する prompt は省略されることがあります。
  • agent が hook や transcript で response を公開しない場合、response は空になることがあります。
  • generated artifact と repository root の .agentnoteignore に書いた path は Notes、PR Report、Dashboard には残り、AI Ratio の分母からだけ除外できます。

具体的な確認は Troubleshooting から始めてください。