跳到內容

Agent Note

git commit 記錄了什麼改變了。 Agent Note 記錄了為何改變。

為何做這個

半年前我重新閱讀了 AI 幫我寫的程式碼,卻無法回答「為什麼要這樣做?」。git log 裡只有 diff。提示詞、回應——全都消失了。


於是我開始把 AI 對話附加到每一個 commit 上。

Agent Note dashboard preview

記錄 AI 參與的變更

查看哪些提交和檔案得到了 AI 協助。證據足夠時,Agent Note 也會估算 AI 編寫的行數。

提示詞和回應一併儲存

模型名稱和工具使用情況也一起——全部與變更捆綁存入 git notes。

自動產生 PR 報告

AI Ratio、提示詞數量、commit 雜湊值,以及供 AI Review 工具讀取的隱藏補充內容。

僅寫入 git notes

分支保持乾淨。push / fetch 與團隊共享,也可以在 GitHub Pages 上發佈可選的靜態 Dashboard。

如果你想…閱讀
安裝前先了解 Agent Note 會加入什麼快速開始
在倉庫中安裝 Agent Note安裝
加入 PR 中顯示的報告GitHub Action
發布團隊共享的歷史頁面Dashboard
查看每個 agent 能記錄什麼Agent 支援
了解會保存什麼、誰能看到Data & Privacy
修復缺失的 notes、prompt 或 Dashboard 資料Troubleshooting
  1. 在儲存庫中執行 init

    Terminal window
    npx agent-note init --agent claude
    • 如果你使用 Codex CLI:npx agent-note init --agent codex
    • 如果你使用 Cursor:npx agent-note init --agent cursor
    • Gemini CLI 請執行:npx agent-note init --agent gemini
    • 同時使用多個 agent:npx agent-note init --agent claude cursor
  2. 提交產生的檔案

    Terminal window
    git add .claude/settings.json .github/workflows/agentnote-pr-report.yml
    git commit -m "chore: enable agent-note"
    git push
    • Codex CLI: 提交 .codex/config.toml.codex/hooks.json
    • Cursor: 提交 .cursor/hooks.json
    • Gemini CLI: 提交 .gemini/settings.json
  3. 用 AI 編寫程式碼。 安裝產生的 git hook 後,直接繼續使用普通 git commit 即可。

Terminal window
npx agent-note status
agent-note v1.x.x
agent: active (cursor)
capture: cursor(prompt, response, edits, shell)
git: active (prepare-commit-msg, post-commit, pre-push)
commit: tracked via git hooks
session: a1b2c3d4…
agent: cursor
linked: 3/20 recent commits

agent: 顯示已啟用的 adapter,capture: 彙總目前 hook 收集的內容,git: 顯示受管理的 git hook 是否已安裝,commit: 顯示普通 git commit 是否為主路徑。

commit: ce941f7 feat: add JWT auth middleware
session: a1b2c3d4-5678-4abc-8def-111122223333
ai: 60% (45/75 lines) [█████░░░]
model: claude-sonnet-4-20250514
agent: claude
files: 3 changed, 2 by AI
src/middleware/auth.ts 🤖
src/types/token.ts 🤖
CHANGELOG.md 👤
功能
Claude Code
Codex CLI
Cursor
Gemini CLI
狀態
完整支援
支援
支援
預覽
提示詞
回應
檔案
AI Ratio
行數估算
預設顯示
Codex patch 記錄與最終 commit 相符時
edit 數相符,且最終檔案仍符合最後一次 AI edit 時
尚未支援

詳情請查看 Agent 支援