PR作成完了時に振り返りを促すPostToolUseフックを追加 #155
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Document Review | |
| on: | |
| pull_request: | |
| types: [opened, synchronize] | |
| jobs: | |
| document-review: | |
| # Renovateによる依存関係更新PRとBot起因のイベントを除外 | |
| if: ${{ !startsWith(github.head_ref, 'deps/') && github.actor != 'claude[bot]' }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: anthropics/claude-code-action@edd85d61533cbba7b57ed0ca4af1750b1fdfd3c4 # v1 | |
| with: | |
| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | |
| allowed_bots: "next-lift-merge-master" | |
| prompt: | | |
| このPRの変更内容を分析し、ドキュメント更新漏れがないかチェックしてください。 | |
| ## チェック対象ドキュメント | |
| 以下のドキュメントが変更内容と整合しているか確認してください: | |
| 1. **CLAUDE.md** - 開発プロセス、ルール、プロジェクト構造の変更時 | |
| 2. **.claude/rules/*.md** - コーディング規約、テストルール、エラー処理ルールの変更時 | |
| 3. **docs/architecture-decision-record/*.md** - アーキテクチャ、技術スタック、設計パターンの変更時 | |
| 4. **docs/project/overview.md** - 機能追加、開発計画の変更時 | |
| 5. **docs/model-based-ui-design/** - UI設計、ユースケースの変更時 | |
| 6. **各パッケージのREADME.md/CLAUDE.md** - パッケージ固有の変更時 | |
| ## レビュー方針 | |
| - 変更されたコードに対応するドキュメント更新が含まれているか確認 | |
| - 更新が必要だが含まれていない場合は、具体的に何を更新すべきか提案 | |
| - 軽微な変更(typo修正、リファクタリング)でドキュメント更新不要な場合は「更新不要」と明示 | |
| - 新しいADRが必要な場合は、その旨を提案 | |
| ## 出力形式 | |
| 以下の形式でレビュー結果をまとめてください: | |
| - ✅ 更新済み: ドキュメントが適切に更新されている項目 | |
| - ⚠️ 要確認: 更新が必要かもしれない項目(理由と提案を含む) | |
| - ❌ 更新漏れ: 明らかに更新が必要な項目(具体的な更新内容を提案) | |
| ## 重要: 結果の投稿方法 | |
| 分析完了後、必ず `gh pr comment` コマンドを使用してPRにコメントを投稿してください。 | |
| ```bash | |
| gh pr comment ${{ github.event.pull_request.number }} --body "レビュー結果" | |
| ``` | |
| claude_args: | | |
| --max-turns 10 | |
| --allowedTools Bash |