Line-level
AI edit、あとから入った人間の edit、最終 commit diff を安全に比較できるとき、AI が追加した行数を数えます。
Agent Note はどの agent でも同じ git note 形式で保存します。ただし、各 agent が提供する hook や transcript の情報量は異なります。このページでは、チームで有効化する前に期待できる範囲を確認できます。
| Agent | 状態 | Prompt | Response | Files | AI Ratio | Line Estimate |
|---|---|---|---|---|---|---|
| Claude Code | Full support | 対応 | 対応 | 対応 | 対応 | 既定で表示 |
| Codex CLI | Supported | 対応 | 対応 | 対応 | 対応 | Codex の patch 履歴が最終 Commit と一致したとき |
| Cursor | Supported | 対応 | 対応 | 対応 | 対応 | edit 数が一致し、committed file が最後の AI edit と一致したとき |
| Gemini CLI | Preview | 対応 | 対応 | 対応 | 対応 | 未対応 |
npx agent-note init --agent claudeチームで実際に使う agent だけを指定します。複数 agent も同じ repository で有効化できます。
npx agent-note init --agent claude codex cursor geminigit hook は .git/ の中にあるため、各 developer は clone 後に 1 回 init を実行する必要があります。
| 必要なこと | 期待できるもの |
|---|---|
| いま最も詳しい行単位の attribution | Claude 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 が安全側に倒した結果です。
.agentnoteignore に書いた path は Notes、PR Report、Dashboard には残り、AI Ratio の分母からだけ除外できます。具体的な確認は Troubleshooting から始めてください。