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。