name: Claude Docs Review on: pull_request: types: [ opened, synchronize ] # Run on docs changes (content, components, styles) paths: - "docs/content/**/*.mdx" - "docs/components/**/*.tsx" - "docs/app/**/*.tsx" - "docs/app/**/*.css" permissions: contents: read jobs: claude-review: # Optional: Filter by PR author # if: | # github.event.pull_request.user.login == 'external-contributor' || # github.event.pull_request.user.login == 'new-developer' || # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' runs-on: ubuntu-latest permissions: contents: read pull-requests: read issues: read id-token: write steps: - name: Checkout repository uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: fetch-depth: 1 - name: Run Claude Code Review id: claude-review uses: anthropics/claude-code-action@536f2c32a39763739000b0e1ac69ca2647d97ce9 # v1.0.170 with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} track_progress: true # Forces tag mode with tracking comments allowed_bots: "devin-ai-integration[bot],decimal-pr-bot[bot],github-actions[bot],dependabot[bot],zen-agent,sdkrelease,sdkrelease[bot]" # Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4) # model: "claude-opus-4-20250514" # Review instructions in docs/agent-guidance/agents/docs-reviewer.md prompt: | Review this PR using the guidelines in docs/agent-guidance/agents/docs-reviewer.md 1. Read docs/agent-guidance/agents/docs-reviewer.md for full review criteria 2. Run `git diff origin/${{ github.event.pull_request.base.ref }}...HEAD` to see changes 3. Apply the review checklist to changed files 4. If issues: Comment with specific fixes. If none: Approve with "Looks good" # Optional: Customize review based on file types # direct_prompt: | # Review this PR focusing on: # - For TypeScript files: Type safety and proper interface usage # - For API endpoints: Security, input validation, and error handling # - For React components: Performance, accessibility, and best practices # - For tests: Coverage, edge cases, and test quality # Optional: Different prompts for different authors # direct_prompt: | # ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' && # 'Welcome! Please review this PR from a first-time contributor. Be encouraging and provide detailed explanations for any suggestions.' || # 'Please provide a thorough code review focusing on our coding standards and best practices.' }} # https://code.claude.com/docs/en/cli-reference#cli-flags # -- model: "claude-opus-4-20250514" claude_args: | --allowedTools "Bash(*)" # Optional: Skip review for certain conditions # if: | # !contains(github.event.pull_request.title, '[skip-review]') && # !contains(github.event.pull_request.title, '[WIP]')