GitHub Action
這一頁介紹 GitHub Pull Request 中顯示的 PR Report。如果你只想先完成本機 CLI setup,請從 安裝 開始;當需要讓 reviewer 看到 Agent Note summary 時再回到這裡。
先在你的儲存庫裡執行一次:
npx agent-note init --agent claude這樣就會替你建立 PR 報告 workflow:
name: Agent Note PR Reporton: pull_request: types: [opened, reopened, synchronize]permissions: contents: read pull-requests: writejobs: report: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 with: fetch-depth: 0 - uses: wasabeef/AgentNote@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}這樣就完成了。每個 PR 都會得到一份 AI 會話報告。
Inputs
Section titled “Inputs”| Input | Default | 說明 |
|---|---|---|
base | PR 的 base branch | 用來比較的分支 |
pr_output | description | PR 報告的輸出位置:description、comment 或 none |
prompt_detail | compact | PR 報告中 prompt 歷史的詳細程度:compact 保持報告聚焦,full 顯示所有已保存 prompt |
dashboard | false | 執行 Dashboard Mode,而不是 PR Report Mode。通常由 agent-note init --dashboard 產生 |
Dashboard
Section titled “Dashboard”npx agent-note init --agent claude --dashboardOutputs
Section titled “Outputs”| Output | 類型 | 說明 |
|---|---|---|
overall_ai_ratio | number | 整個 PR 的 AI Ratio (0-100) |
overall_method | string | line、file、mixed 或 none |
tracked_commits | number | 帶有 agent-note 資料的 commit 數 |
total_commits | number | PR 內的 commit 總數 |
total_prompts | number | 所有 commit 的 prompt 總數 |
json | string | 完整的結構化報告 |
markdown | string | 已渲染的 Markdown 報告 |
should_deploy | boolean string | Dashboard Mode 輸出,用來告訴呼叫方 workflow 是否需要發布 Pages |
PR 報告包含:
- Header —
Total AI Ratio與進度條,以及下一行的Model - Reviewer Context — 面向 AI Review tool 的 hidden Markdown comment,由通用 changed area 分組、review focus 和最新相關 intent signals 生成
- 表格 — 每個 commit 的 AI Ratio、prompt 數與檔案列表
- Prompts — 可折疊的
📝 Context、🧑 Prompt、🤖 Response區塊
AI Review tool
Section titled “AI Review tool”Reviewer Context 會作為 hidden Markdown comment 保存在 PR body 中。人類 reviewer 只會看到一般報告,而讀取 raw PR description 的工具可以使用這段額外 context。
這段 context 是確定性產生的。它會從 Agent Note data 中整理 changed area、review focus 和最近相關的 intent signals。Copilot、CodeRabbit、Devin、Greptile 等工具可以在閱讀 diff 前先理解 PR 為什麼發生變更。
它仍然只是指引,不是證明。review tool 應該把它和實際 diff、test、code 對照使用。
如果你還想要一個共享的 Pages 視圖來查看 open 與 merged 的 PR 歷史,請繼續閱讀 Dashboard。