コンテンツにスキップ

GitHub Action

このページは、GitHub の Pull Request に表示される PR Report の設定です。まず local の CLI setup だけ済ませたい場合は インストール を先に読み、reviewer に Agent Note の summary を見せたい段階で戻ってきてください。

まずはリポジトリで次を 1 回実行します。

Terminal window
npx agent-note init --agent claude

これで PR レポート用の workflow が作られます。

.github/workflows/agentnote-pr-report.yml
name: Agent Note PR Report
on:
pull_request:
types: [opened, reopened, synchronize]
permissions:
contents: read
pull-requests: write
jobs:
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 セッションレポートが追加されます。

入力デフォルト説明
basePR のベースブランチ比較対象のブランチ
pr_outputdescriptionPR レポートの出力先: description / comment / none
prompt_detailcompactPR レポートに出す prompt 履歴の細かさ: compact は説明に必要な prompt を中心に表示、full は保存された prompt すべて
dashboardfalsePR Report Mode の代わりに Dashboard Mode を実行します。通常は agent-note init --dashboard が生成します
Terminal window
npx agent-note init --agent claude --dashboard
出力説明
overall_ai_rationumberPR 全体の AI Ratio (0-100)
overall_methodstringline, file, mixed, none
tracked_commitsnumberagent-note データ付きのコミット数
total_commitsnumberPR 内の全コミット数
total_promptsnumber全プロンプト数
jsonstring構造化レポート全体
markdownstringレンダリング済みのマークダウンレポート
should_deployboolean stringDashboard Mode で Pages を公開するかどうかを caller workflow に伝えます

PR レポートには次が入ります。

  • HeaderTotal AI Ratio と bar、その下に Model
  • Reviewer Context — AI Review tool 向けの hidden Markdown comment。汎用的な changed area、review focus、直近の関連 intent signals から作ります
  • Table — commit ごとの AI Ratio、prompt 数、attribution 付き files
  • Prompts — commit ごとの 📝 Context🧑 Prompt🤖 Response を折りたたんで表示

Reviewer Context は PR body の hidden Markdown comment として保存されます。人間の reviewer には通常の report だけが見え、raw PR description を読む AI Review tool は追加の context を使えます。

この context は Agent Note data から決定的に作られます。changed area、review focus、直近の関連 intent signals をまとめるため、Copilot、CodeRabbit、Devin、Greptile などが diff を読む前に「なぜ変更されたか」を理解しやすくなります。

ただし proof ではありません。review tool は必ず実際の diff、test、code と照らし合わせるべきです。

Open / Merged の PR 履歴を 1 つの Pages URL で見たいなら、続けて Dashboard を読んでください。

レポートが空、または prompt が想定より少ない場合は Troubleshooting を確認してください。