diff --git a/docs/blog/agent-note-launch-distribution.md b/docs/blog/agent-note-launch-distribution.md new file mode 100644 index 0000000..9249a4b --- /dev/null +++ b/docs/blog/agent-note-launch-distribution.md @@ -0,0 +1,139 @@ +# Agent Note 公開記事の投稿戦略 + +Agent Note 公開記事をどこに投稿するか、どの順番で広げるかをまとめます。 + +## 対象記事 + +- 日本語: `docs/blog/agent-note-launch.ja.md` +- 英語: `docs/blog/agent-note-launch.en.md` + +日本語版と英語版は、構成と主張を揃えます。ただし、各言語で自然に読めるように細かい言い回しは調整して構いません。 + +## 投稿の目的 + +- Agent Note の使い方よりも、なぜ必要なのかを伝える +- Agent Note の立ち位置を明確にする +- Git-native な Commit / Pull Request Review の文脈記録ツールとして見せる +- PR Report、Dashboard、AI Review Tool 向け Hidden Comment、`agent-note why` の価値が伝わるようにする +- 細かいセットアップ手順は README と Documentation に任せる + +## 日本語記事 + +### 第一候補: wasabeef.jp + +日本語記事の canonical は `wasabeef.jp` にするのがよいです。 + +理由: + +- 自分の資産として記事が残る +- 個人の問題意識や開発背景を書きやすい +- 使い方記事ではなく「なぜ作ったか」の記事なので、個人ブログとの相性が良い + +### 第二候補: Zenn + +Zenn には転載、または少し調整した版を投稿します。 + +理由: + +- 日本の開発者に届きやすい +- OSS、AI Coding Tool、開発ワークフローの話題と相性が良い +- Qiita よりも、思想や背景を含む記事を載せやすい + +追記するなら、以下のような一文を入れます。 + +```md +この記事は Agent Note 公開記事として、wasabeef.jp にも掲載しています。 +``` + +### 今回は主戦場にしない: Qiita + +今回の公開記事をそのまま Qiita に載せる優先度は低いです。 + +Qiita には、後日もっと実用寄りの記事を書く方が合います。 + +- `agent-note init` から PR Report まで +- GitHub Action で Dashboard を公開する +- `agent-note why` で行の背景を追う + +## 英語記事 + +### 第一候補: DEV Community + +英語記事は DEV Community に投稿するのがよいです。 + +理由: + +- OSS Developer Tool の読者がいる +- GitHub の外にも届きやすい +- README だけでは伝わりにくい背景や設計思想を書きやすい + +canonical URL を設定できる場合は、公開後の安定 URL を指定します。 + +### 任意: Hashnode + +Hashnode は任意です。 + +もう 1 つ英語圏の配信面を増やしたい場合だけ使います。使う場合は DEV Community と内容を揃え、可能なら canonical URL を設定します。 + +## 告知導線 + +記事全文を貼る場所と、短い告知で流す場所を分けます。 + +短い告知を出す候補: + +- GitHub README +- GitHub Release +- X +- Hacker News +- AI Coding Workflow の話題が合う Reddit community + +## 告知文案 + +### X / Short Post + +```text +I released Agent Note. + +It records the prompts, responses, changed files, AI Ratio, and review context behind AI-assisted commits using Git notes. + +The goal is simple: make AI-written code reviewable after the coding session is gone. + +https://github.com/wasabeef/AgentNote +``` + +### Hacker News + +タイトル案: + +```text +Show HN: Agent Note – Git notes for AI coding sessions +``` + +本文案: + +```text +Agent Note is a CLI and GitHub Action that records prompts, responses, changed files, and AI Ratio for AI-assisted commits using Git notes. + +It adds PR Reports, Dashboard views, hidden reviewer context for AI review tools, and a `why` command that connects `git blame` to the Agent Note attached to the blamed commit. +``` + +## メッセージの軸 + +どこに投稿しても、以下の軸はぶらさないようにします。 + +- Agent Note は Git-native +- Agent Note は Commit と Pull Request Review に集中している +- Agent Note は Hosted Service ではない +- Agent Note は authorship や code quality を証明するものではない +- AI Ratio は推定値であり、判定ではない +- Prompt / Response / Context はレビュー材料であり、人間のレビューを置き換えるものではない + +## 後続記事の候補 + +公開記事のあとに書けそうな記事: + +- 実用編: `agent-note init` から PR Report まで +- GitHub Pages で Dashboard を公開する +- Copilot / CodeRabbit / Devin / Greptile に Hidden Reviewer Context を読ませる +- `agent-note why`: 1 行のコードから AI との会話に戻る +- Agent Note と Entire の違い diff --git a/docs/blog/agent-note-launch.en.md b/docs/blog/agent-note-launch.en.md new file mode 100644 index 0000000..9c8d93d --- /dev/null +++ b/docs/blog/agent-note-launch.en.md @@ -0,0 +1,279 @@ +--- +title: "Introducing Agent Note: saving the why behind AI-assisted code in Git" +description: "Why AI-assisted code needs commit-level context, and how Agent Note uses Git notes and Pull Request reports to preserve it." +date: "2026-05-11" +tags: ["Agent Note", "AI", "Git", "Code Review", "Open Source"] +image: "https://raw.githubusercontent.com/wasabeef/AgentNote/main/docs/assets/hero.png" +--- + +Hi, I'm wasabeef. + +I have been using coding agents such as Claude Code, Codex CLI, Cursor, and Gemini CLI regularly in daily development. + +They no longer feel like experiments. They can already produce reviewable Pull Requests. But while reviewing AI-assisted changes, I kept running into the same problem. + +**A diff tells you what changed. It does not tell you why it changed.** + +That is already a problem with human-written commits when the commit message is weak. With AI-assisted commits, the missing context is even larger: the prompt, the response, the discussion that led to the implementation, the agent that touched each file, and the reason a particular path was chosen. + +That is why I built [Agent Note](https://github.com/wasabeef/AgentNote). + +![Agent Note — AI conversations saved to Git](https://raw.githubusercontent.com/wasabeef/AgentNote/main/docs/assets/hero.png) + +This article focuses less on the exact usage and more on why this kind of record is needed, and how Agent Note keeps that context in Git. + +## What is missing in AI-era code review + +AI coding agents have become common in everyday development. + +They write code quickly. They add tests. They update documentation. They can even open Pull Requests. + +But review exposes a different problem. + +The final diff does not show the background of the implementation. + +- What request started the change? +- What assumptions did the AI make? +- Did the direction change halfway through? +- Is this a generated bundle, or source code someone intentionally edited? +- Which commits were mostly AI-assisted, and which were mostly human follow-up? + +In human-to-human development, commit messages, Pull Request descriptions, and review comments have carried that context. + +In AI-assisted development, prompts and responses also belong in the review context. Without them, reviewers lose the trail before review even starts. + +Until now, the conversation with the AI often stayed inside the agent UI or a local transcript. Once the session ended, the team usually received only the commit and the Pull Request. + +The reason behind the change disappears. + +## AI review tools need context too + +I also use AI review tools such as Copilot, CodeRabbit, Devin, and Greptile. + +Their main inputs are usually the diff and the repository code. + +That means AI can review AI-written code without seeing the prompt or intent that produced it. + +When that happens, the review tends to stay near the surface of the diff. + +To judge whether an implementation matches the intended change, a reviewer needs more than the final code. The reviewer needs to know what the author asked for, what the agent understood, and which parts of the repository were supposed to change. + +Agent Note keeps that context in the Pull Request in a form AI review tools can read. + +It renders a human-readable summary in the Pull Request body, and also embeds an `agentnote-reviewer-context` hidden comment. It is invisible in the rendered PR body, but AI review tools that read the raw Pull Request description can use it to understand changed areas, review focus, and author intent. + +The reviewer gets more than the diff. + +### Today + +```text +git diff +Pull Request description + +Prompt? missing +Response? missing +Why this way? reviewers have to infer it +``` + +### With Agent Note + +```text +git diff +Pull Request description +refs/notes/agentnote +Dashboard + +Prompt / Response / Context / AI Ratio stay connected to the commit +``` + +## What gets recorded + +Agent Note saves the AI conversation and changed files for each commit. + +Think of it as `git log` with the AI conversation behind the change attached to it. + +It records four kinds of information. + +| Data | What it helps you see | +|---|---| +| Prompt / Response | What was requested and how the AI answered | +| Files | Which files the agent touched | +| AI Ratio | A practical estimate of how much of the commit involved AI | +| Context | Extra context when the prompt alone is too short | + +For example, a prompt like `yes, implement it` does not carry enough meaning when it appears alone in a Pull Request. + +Agent Note does not try to inflate that prompt. Instead, when the surrounding commit evidence helps, it can attach a short `Context` note. + +![Context shown in the Agent Note Dashboard](https://raw.githubusercontent.com/wasabeef/AgentNote/main/website/public/images/context-dashboard-example.png) + +The point is not to say "this code is correct because AI wrote it" or "this code is risky because AI wrote it." + +The point is to give reviewers better evidence. + +## How it works + +Agent Note is not a hosted service. + +It adds a thin recording layer next to the normal Git workflow. + +```text +You prompt your coding agent + │ + ▼ +Agent hooks save the conversation and session info + │ + ▼ +The agent edits files + │ + ▼ +Hooks or local transcripts record changed files + │ + ▼ +You run `git commit` + │ + ▼ +A Git hook links the session to the commit + │ + ▼ +Agent Note writes a Git note for that commit + │ + ▼ +`refs/notes/agentnote` is shared on `git push` +``` + +Temporary session data lives under `.git/agentnote/`. + +The permanent record lives in `refs/notes/agentnote`. + +Agent Note does not modify the commit diff or pollute the commit message. When you need the AI context behind a commit, you read the Git note. + +## Why Git notes + +The design constraint I cared about most was avoiding unnecessary workflow changes. + +I did not want to replace `git commit`, and I did not want the core record to depend on a hosted service. + +The context behind AI-assisted code should be a team asset, just like the commit itself. Keeping that context in Git felt natural. + +Git notes let Agent Note attach structured data to a commit without changing the regular commit history. + +That balance felt right. + +- Use normal `git log` and Pull Requests most of the time +- Read Agent Note data only when you need the deeper context +- Share it with the team through `refs/notes/agentnote` +- Avoid requiring a hosted service + +The design keeps AI development context close to Git instead of sending it somewhere else. + +## How it fits with Spec-Driven Development + +Spec-Driven Development makes the intent explicit before implementation. + +That works well with AI coding agents. If the input is vague, the agent may still produce code quickly, but reviewers later have to guess why the implementation took that shape. + +A spec alone does not preserve the implementation conversation. It does not show how the agent interpreted the task, what changed during the session, or which prompts ended up in each commit. + +If the spec is the intent before implementation, Agent Note is the execution record after implementation. + +Together, they let reviewers compare the implementation against the spec, and also inspect the AI conversation that produced the commit. + +## How it relates to Entire + +Agent Note is not the only project working on this problem. + +[Entire](https://docs.entire.io/overview) also connects the context behind AI-assisted code changes to Git. Entire records prompts, transcripts, tool calls, changed files, and other session data as Checkpoints linked to commits. It is a broader system for agent development history, including rewind, resume, search, and a web UI. + +Agent Note is intentionally narrower. + +It focuses on commits and Pull Request review. The persistent record lives in Git notes under `refs/notes/agentnote`, and the main surfaces are the PR Report, Dashboard, hidden reviewer context for AI review tools, and `agent-note why`. + +I do not see this as a matter of which approach is correct. The scope is different. + +If you want full session Checkpoints, rewind, resume, and repository-wide search, a system like Entire makes sense. If you mainly want lightweight commit-level review context in Pull Requests, Agent Note is designed for that narrower workflow. + +## PR Report and Dashboard + +In Pull Requests, Agent Note renders a human-readable summary. + +```md +## Agent Note + +Total AI Ratio: ████████ 73% +Model: `claude-sonnet-4-20250514` + +| Commit | AI Ratio | Prompts | Files | +|---|---|---|---| +| ce941f7 feat: add auth | ████░ 73% | 2 | auth.ts, token.ts | + +Open Dashboard ↗ +``` + +The PR Report is the entry point for review. + +The Dashboard is for deeper reading. + +In the Dashboard, you can inspect Prompt / Response, changed files, AI Ratio, and diffs by PR and by commit. + +![Agent Note Dashboard preview](https://raw.githubusercontent.com/wasabeef/AgentNote/main/docs/assets/dashboard-preview.png) + +The report answers "what should I look at first?" The Dashboard answers "what happened in this commit?" + +## The idea behind `agent-note why` + +Agent Note also includes `agent-note why`. + +It starts from a target line, uses `git blame` to find the commit, then reads the Agent Note attached to that commit. + +```bash +npx agent-note why README.md:111 +``` + +It does not claim exact line-to-prompt attribution yet. + +But even without a new schema, connecting an individual line to the commit conversation is useful. It shortens the path from "why is this line here?" to "what did we ask the agent to do in that commit?" + +Eventually, I want to get closer to line-level explanations. The MVP is intentionally smaller: connect existing Git blame data with existing Git note data and make the available context easy to reach. + +## Different agents expose different context + +Agent Note supports multiple coding agents, but each agent exposes a different level of detail. + +That is because every agent exposes hooks and transcripts differently. + +Claude Code provides the richest signal today. Codex CLI, Cursor, and Gemini CLI are also supported, but Agent Note records only the prompt, response, changed files, and AI Ratio evidence that each agent can expose reliably. + +I also do not want to overstate the evidence. + +If Agent Note cannot know something reliably, it does not pretend to know it. AI Ratio is an estimate, not proof. + +The latest support matrix is available in [Agent Support](https://wasabeef.github.io/AgentNote/agent-support/). + +## Things to keep in mind + +Agent Note records conversations with AI for the team. + +That record should be handled carefully. + +- Do not put secrets in prompts or responses +- When Git notes are pushed, the team can read the saved conversation +- AI Ratio is an estimate, not an automatic judgment of quality or responsibility +- Different agents expose different levels of detail +- Gemini CLI support is still Preview + +Agent Note is closer to review context than to an audit verdict. + +## Closing + +The more we use AI coding agents, the less a diff alone is enough for code review. + +Human commits have commit messages and Pull Request discussions. AI-assisted commits should also preserve prompts, responses, context, and AI Ratio. + +Agent Note is an open source, Git-native way to do that. + +- GitHub: +- Documentation: +- npm: + +If you want AI-assisted code to remain understandable after the session is over, please give Agent Note a try. diff --git a/docs/blog/agent-note-launch.ja.md b/docs/blog/agent-note-launch.ja.md new file mode 100644 index 0000000..dfb8d4c --- /dev/null +++ b/docs/blog/agent-note-launch.ja.md @@ -0,0 +1,281 @@ +--- +title: "Agent Note を公開しました: AI と一緒に書いたコードの「なぜ」を Git に残す" +description: "AI Coding Agent が書いたコードの文脈が Pull Request から抜け落ちる問題と、Agent Note が Git Notes と PR Report でどう補うかを紹介します。" +date: "2026-05-11" +tags: ["Agent Note", "AI", "Git", "コードレビュー", "OSS"] +image: "https://raw.githubusercontent.com/wasabeef/AgentNote/main/docs/assets/hero.png" +--- + +こんにちは、わさびーふです。 + +最近は Claude Code、Codex CLI、Cursor、Gemini CLI のような Coding Agent に実装を頼むことが増えました。 + +ただ、AI に書いてもらったコードを Pull Request でレビューしていると、ずっと違和感がありました。 + +**Diff には「何が変わったか」は出ますが、「なぜそう変わったか」は残りません。** + +人間が書いた Commit でも Commit Message が弱いとレビューは難しくなります。AI が書いたコードではさらに、Prompt、Response、途中の相談、どの Agent がどのファイルを触ったか、という文脈がレビューから抜け落ちます。 + +その問題を解決するために、[Agent Note](https://github.com/wasabeef/AgentNote) を作りました。 + +![Agent Note — AI との会話を Git に保存](https://raw.githubusercontent.com/wasabeef/AgentNote/main/docs/assets/hero.png) + +この記事では細かい使い方よりも、なぜこういう記録が必要になったのか、Agent Note がどう Git に文脈を残すのかを中心に書きます。 + +## AI 時代のレビューで足りないもの + +AI Coding Agent は一般的になりました。 + +実装を頼むこと自体が、もう特別ではなくなりつつあります。コードを書く速度は上がります。テストも追加してくれます。ドキュメントも更新してくれます。Pull Request まで用意してくれるようになりました。 + +でも、レビューする側に回ると別の問題が出ます。 + +最終的な Diff だけを見ると、実装の背景が見えません。 + +- 何を頼んだ結果なのか +- AI はどんな前提で実装したのか +- 途中で方針が変わったのか +- 生成 Bundle なのか、意図して書いた Source なのか +- どの Commit は AI の影響が大きく、どの Commit は人間の修正が中心なのか + +人間同士の開発では、Commit Message、Pull Request の説明、レビューコメントがこの文脈を補ってきました。 + +AI が関わる開発では、Prompt と Response もレビュー材料になります。AI がどういう指示を受けて、どう返して、どのファイルを触ったかが分からないと、レビューの入口で肝心な情報が失われます。 + +今までは、AI との会話は各 Agent の UI やローカルの履歴に残るだけでした。セッションが終わると、チームに共有されるのは Commit と Pull Request だけになります。 + +そこで肝心な「なぜその変更になったのか」が抜け落ちます。 + +## AI Review Tool にも文脈が必要 + +Copilot、CodeRabbit、Devin、Greptile のような AI Review Tool もよく使うようになりました。 + +ただし、それらが見ているのは、だいたい Diff と Repository のコードです。 + +AI が書いたコードを AI がレビューしているのに、生成時の Prompt や意図は見えていません。 + +これだと、レビューはどうしても表面的になりがちです。 + +「この変更は何を直すためのものか」「この実装で意図に合っているか」「ユーザーが本当に求めていたことは何か」を判断するには、Diff だけでは足りません。 + +Agent Note は、その文脈を AI Review Tool も読める形で Pull Request に残します。 + +Pull Request の本文には人間向けの要約を表示し、同時に `agentnote-reviewer-context` という Hidden Comment を埋め込みます。画面上の PR 本文には表示されませんが、Raw PR Description を読む AI Review Tool は、どこが変わったか、どこを見てほしいか、作者の意図は何かを拾えます。 + +レビューする AI に対しても「Diff だけ見て」ではなく、「この Prompt と意図も踏まえて見て」と渡すための仕組みです。 + +### 現状 + +```text +git diff +Pull Request description + +Prompt? ない +Response? ない +なぜその実装? 推測するしかない +``` + +### Agent Note 導入後 + +```text +git diff +Pull Request description +refs/notes/agentnote +Dashboard + +Prompt / Response / Context / AI Ratio を Commit と一緒に追える +``` + +## 何を残すのか + +Agent Note は、AI Coding Agent との会話と変更されたファイルを Commit ごとに残します。 + +`git log` に、その変更の裏側にある AI との会話を足すようなイメージです。 + +保存するものは大きく 4 つです。 + +| 保存するもの | 見えるようになること | +|---|---| +| Prompt / Response | 何を頼み、AI がどう返したか | +| Files | どのファイルを Agent が触ったか | +| AI Ratio | Commit 全体のうち AI が関わった割合の目安 | +| Context | 短い Prompt だけでは分かりにくいときの補足 | + +たとえば `はい、では実装して` のような Prompt だけが Pull Request に残っても、あとから読む人には意味が分かりません。 + +Agent Note は、その Prompt を無理に膨らませるのではなく、Commit に関係する周辺情報から役に立つときだけ `Context` を添えます。 + +![Dashboard に表示される Context の例](https://raw.githubusercontent.com/wasabeef/AgentNote/main/website/public/images/context-dashboard-example.png) + +ここで気をつけたいのは、Agent Note が「AI が書いたから正しい」「AI が書いたから危険」と判定するわけではないことです。 + +レビューのための材料を増やすツールです。 + +## 仕組み + +Agent Note 自体は Hosted Service ではありません。 + +通常の Git Workflow の横に、薄い記録レイヤーを足します。 + +```text +Coding Agent に Prompt を送る + │ + ▼ +Agent Hooks が Prompt / Response / Session 情報を記録する + │ + ▼ +Agent がファイルを編集する + │ + ▼ +Hooks または Local Transcripts が変更ファイルを記録する + │ + ▼ +`git commit` を実行する + │ + ▼ +Git Hook が Session と Commit を結びつける + │ + ▼ +Agent Note が Commit に Git Note を書く + │ + ▼ +`git push` で refs/notes/agentnote も共有される +``` + +一時的な Session Data は `.git/agentnote/` に置かれます。 + +永続的な Record は `refs/notes/agentnote` に保存されます。 + +通常の Commit Message や Diff は汚しません。必要なときだけ Git Notes を読めば、Commit の裏側にあった AI との会話を追えます。 + +## なぜ Git Notes なのか + +Agent Note で一番意識したのは、開発フローを変えすぎないことです。 + +`git commit` をやめたくありませんでした。AI の会話履歴を Hosted Service に預ける前提にもしたくありませんでした。 + +AI と一緒に書いたコードの文脈は、Commit と同じくらいチームの資産になります。だから、その文脈も Git の中に残る形が自然だと思っています。 + +Git Notes を使うと、通常の Commit 履歴を汚さずに、Commit に追加情報を紐づけられます。 + +このくらい Git に近い場所に置くのが、ちょうど良いと思っています。 + +- 普段はいつもの `git log` と Pull Request を見る +- 必要なときだけ Agent Note の情報を読む +- チームには `refs/notes/agentnote` として共有する +- 外部の Hosted Service は不要 + +AI 開発の記録を、Git の外に逃がさず、Git の近くに置くための設計です。 + +## SDD と Agent Note の関係 + +Spec-Driven Development では、実装前に「何を作るか」「なぜ作るか」を明文化します。 + +これは AI Coding Agent と相性が良いです。Agent に渡す前提が曖昧だと、速く実装できても、レビュー時に「なぜこの形になったのか」が分かりにくくなるからです。 + +ただ、Spec だけでは実装中の会話は残りません。Agent がどこをどう解釈したのか、途中で何を相談したのか、最終的にどの Commit にどう反映されたのかは、別の記録として残す必要があります。 + +Spec が実装前の意図だとすると、Agent Note は実装後の実行記録です。 + +この 2 つが揃うと、レビューでは「Spec に対して実装が合っているか」と「Agent がどういう文脈でその実装に到達したか」の両方を確認できます。 + +## Entire との関係 + +この問題意識は Agent Note だけのものではありません。 + +[Entire](https://docs.entire.io/overview) も、AI Agent が書いたコードの背景を Git と結びつけるためのツールです。Entire は Checkpoint という単位で Prompt、Transcript、Tool Call、変更ファイルなどを保存し、Commit に紐づけます。Rewind、Resume、検索、Web UI まで含む、より広い Agent 開発の記録基盤に近いプロダクトです。 + +Agent Note は、意図的にスコープを絞っています。 + +中心に置いているのは、Commit と Pull Request Review です。記録先は Git Notes の `refs/notes/agentnote` で、PR Report、Dashboard、AI Review Tool 向けの Hidden Comment、`agent-note why` から「この Commit はなぜこうなったのか」をすぐ読めるようにすることを優先しています。 + +どちらが正しいというより、見ているスコープが違います。 + +Session 全体を Checkpoint として扱い、戻る・再開する・検索するところまで欲しいなら Entire のような設計が向いています。Pull Request のレビューで、Commit ごとの Prompt、Response、AI Ratio、Context を必要な範囲で共有したいなら Agent Note の方が近いと思っています。 + +## PR Report と Dashboard + +Pull Request では、Agent Note が人間向けの要約を出します。 + +```md +## Agent Note + +Total AI Ratio: ████████ 73% +Model: `claude-sonnet-4-20250514` + +| Commit | AI Ratio | Prompts | Files | +|---|---|---|---| +| ce941f7 feat: add auth | ████░ 73% | 2 | auth.ts, token.ts | + +Open Dashboard ↗ +``` + +PR Report は、レビューの最初にざっと状況を掴むためのものです。 + +一方で、長い会話や Commit ごとの流れを読むには Dashboard の方が向いています。 + +Dashboard では、PR 単位、Commit 単位で Prompt / Response、変更ファイル、AI Ratio、Diff を確認できます。 + +![Agent Note Dashboard preview](https://raw.githubusercontent.com/wasabeef/AgentNote/main/docs/assets/dashboard-preview.png) + +PR Report は入口、Dashboard は深掘り用、という役割です。 + +## `agent-note why` の考え方 + +もう 1 つ、`agent-note why` というコマンドも入れています。 + +これは、対象行から `git blame` で Commit を探し、その Commit に紐づく Agent Note を読むためのものです。 + +```bash +npx agent-note why README.md:111 +``` + +まだ「この Prompt がこの 1 行を書いた」と断定する機能ではありません。 + +ただ、対象行から「この Commit のときに何を頼んでいたか」まで 1 コマンドで戻れるだけでも、コードを読むときの体験は変わります。 + +将来的には、もっと細かい line-level の説明にも近づけたいですが、まずは既存の Git Blame と Git Notes をつないで、今ある情報にすぐ届くようにしています。 + +## Agent ごとに取れる文脈は違う + +Agent Note は複数の Coding Agent に対応しています。 + +ただし、Agent ごとに Hook や Transcript の仕組みが違うため、取れる情報の粒度も違います。 + +Claude Code は最も細かく記録できます。Codex CLI、Cursor、Gemini CLI も、それぞれが公開している Hook や Transcript から取れる範囲で Prompt、Response、変更ファイル、AI Ratio を残します。 + +ここで精度を大きく見せすぎないことも意識しています。 + +分からないものは分からないまま扱います。AI Ratio は証明ではなく目安です。 + +最新の対応状況は [エージェント対応](https://wasabeef.github.io/AgentNote/ja/agent-support/) にまとめています。 + +## 注意点 + +Agent Note は、AI との会話をチームに残します。 + +だから、記録される情報の扱いには少し注意が必要です。 + +- Prompt や Response には機密情報を書かない方が安全です +- Git Notes を Push すると、チーム内でその会話履歴も共有されます +- AI Ratio は推定値です。品質や責任を自動判定するものではありません +- Agent によって取れる情報の粒度が違います +- Gemini CLI はまだ Preview 扱いです + +Agent Note は監査ツールというより、レビューの文脈を増やすための道具です。 + +## まとめ + +AI Coding Agent を使うほど、コードレビューでは「何が変わったか」だけでは足りなくなります。 + +人間の Commit には Commit Message や Pull Request の会話があります。AI が関わった Commit にも、Prompt、Response、Context、AI Ratio が残っている方がレビューしやすくなります。 + +Agent Note は、そのための Git-native な OSS です。 + +- GitHub: +- Documentation: +- npm: + +AI と一緒に書いたコードを、あとからちゃんと読めるようにしたい人は、ぜひ試してみてください。 + +おしまい