Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 9 additions & 18 deletions .github/workflows/CLAUDE_REVIEW_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,32 +122,23 @@ docker-compose up -d

## Setup Instructions

### Step 1: Choose Your Phase
### Step 1: Verify Workflow File

Copy the desired workflow file:

```bash
# Phase 1: Comment-only review
cp .github/workflows/claude-review-phase1.yml .github/workflows/claude-review.yml

# Phase 2: Selective consensus
cp .github/workflows/claude-review-phase2.yml .github/workflows/claude-review.yml

# Phase 3: Draft PR creation
cp .github/workflows/claude-review-phase3.yml .github/workflows/claude-review.yml
```
The consolidated workflow is already at `.github/workflows/ai-code-review.yml`.
No copying needed — all features (review, consensus, autofix) are in one file.

### Step 2: Add Secrets

```bash
# Add Claude OAuth token
gh secret set CLAUDE_CODE_OAUTH_TOKEN
# At least one Claude API provider (required)
gh secret set ANTHROPIC_API_KEY
# or for AWS Bedrock:
gh secret set AWS_BEARER_TOKEN_BEDROCK
gh secret set AWS_REGION

# Phase 2/3: Add PAL MCP credentials
# PAL MCP credentials (optional — for multi-model consensus)
gh secret set PAL_MCP_API_KEY
gh secret set PAL_MCP_ENDPOINT --body "https://your-endpoint.com/api/tools/consensus"

# Phase 3: PAT_TOKEN no longer required (GITHUB_TOKEN is used)
```

### Step 3: Create CLAUDE.md (Optional but Recommended)
Expand Down
90 changes: 24 additions & 66 deletions .github/workflows/DEPLOYMENT_STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,94 +4,52 @@

All components have been successfully implemented and are ready for deployment.

### Files Created (7 total, ~70KB)

#### Workflow Files (4)
| File | Size | Purpose | Cost/PR | Latency |
|------|------|---------|---------|---------|
| `claude-review-phase1.yml` | 3.6K | Comment-only review | ~$1.50 | 2-5 min |
| `claude-review-phase2.yml` | 9.8K | Selective consensus | $1.50-$5 | 5-13 min |
| `claude-review-phase3.yml` | 14K | Draft PR creation | $3-$8 | 8-20 min |
| `ai-review-cost-monitor.yml` | 9.4K | Cost tracking & alerts | N/A | N/A |

#### Setup & Documentation (3)
| File | Size | Purpose |
|------|------|---------|
| `setup-claude-review.sh` | 13K | Automated setup script (executable) |
| `CLAUDE_REVIEW_SETUP.md` | 12K | Comprehensive setup guide |
| `README_CLAUDE_REVIEW.md` | 9.2K | Quick start guide |
### Files

---

## 🚀 Quick Start (< 5 minutes)
#### Workflow Files
| File | Purpose | Cost/PR | Latency |
|------|---------|---------|---------|
| `ai-code-review.yml` | Consolidated review + consensus + autofix | $1.50-$8 | 2-20 min |
| `ai-review-cost-monitor.yml` | Cost tracking & alerts | N/A | N/A |

```bash
# Run automated setup
cd .github/workflows
bash setup-claude-review.sh
```

The script will guide you through:
1. ✅ Installing Claude GitHub App
2. ✅ Configuring secrets (Claude OAuth, PAL MCP API keys)
3. ✅ Selecting which phase to install
4. ✅ Creating test PR
#### Setup & Documentation
| File | Purpose |
|------|---------|
| `setup-claude-review.sh` | Automated setup script (executable) |
| `CLAUDE_REVIEW_SETUP.md` | Comprehensive setup guide |
| `README_CLAUDE_REVIEW.md` | Quick start guide |

---

## 📋 Manual Setup (if preferred)

### Step 1: Choose Your Phase

**Recommendation**: Start with Phase 1 for 2-4 weeks, then graduate to Phase 2/3.
## Quick Start

```bash
# Phase 1: Safest starting point
cp claude-review-phase1.yml claude-review.yml

# Phase 2: Add selective consensus (requires PAL MCP)
cp claude-review-phase2.yml claude-review.yml

# Phase 3: Automated draft PRs (requires PAL MCP + PAT)
cp claude-review-phase3.yml claude-review.yml
bash .github/workflows/setup-claude-review.sh
```

### Step 2: Configure GitHub Secrets
Or manually configure:

```bash
# Required for all phases
gh secret set CLAUDE_CODE_OAUTH_TOKEN
# Get from: https://claude.com/console
# Required — at least one Claude API provider
gh secret set ANTHROPIC_API_KEY
# or
gh secret set AWS_BEARER_TOKEN_BEDROCK
gh secret set AWS_REGION

# Required for Phase 2 & 3 (PAL MCP)
# Optional — for multi-model consensus
gh secret set PAL_MCP_API_KEY
gh secret set PAL_MCP_ENDPOINT

# Phase 3: PAT_TOKEN no longer required (GITHUB_TOKEN is used for PR creation)
```

### Step 3: Install Claude GitHub App

1. Visit: https://github.com/apps/claude/installations/new
2. Select this repository
3. Grant permissions:
- Read: Contents, Issues, Pull Requests
- Write: Contents (Phase 3 only), Issues, Pull Requests

### Step 4: Test It
### Test It

```bash
# Create test PR
git checkout -b test/ai-review
echo "# AI Review Test" >> test-file.md
git add test-file.md
git commit -m "test: trigger AI review"
git push origin test/ai-review
gh pr create --title "Test: AI Review" --body "Testing integration"

# Phase 1: Check for review comment
# Phase 2: Add 'ai-consensus' label to trigger multi-model
# Phase 3: Wait for draft PR to be created
```

---
Expand Down Expand Up @@ -327,8 +285,8 @@ gh secret set PAL_MCP_API_KEY
- [ ] Run `setup-claude-review.sh` OR manually configure secrets
- [ ] Install Claude GitHub App with proper permissions
- [ ] Choose starting phase (recommend Phase 1)
- [ ] Copy workflow file: `cp claude-review-phase1.yml claude-review.yml`
- [ ] Commit and push: `git add .github/workflows/ && git commit -m "feat: add AI code review workflows"`
- [ ] Verify `ai-code-review.yml` exists in `.github/workflows/`
- [ ] Commit and push: `git add .github/workflows/ && git commit -m "feat: add AI code review workflow"`
- [ ] Create test PR to verify integration
- [ ] Monitor cost with `ai-review-cost-monitor.yml` workflow
- [ ] Update CLAUDE.md with project-specific review guidelines (optional)
Expand Down
Loading
Loading