feat: add Copilot engine support via REVIEW_ENGINE toggle
Merged
DO
6mo ago+316+316+012345678901234567890123456789-191-191-012345678901234567890123456789
Summary
Add a second LLM engine option (GitHub Copilot) alongside the existing Claude engine, toggled via the REVIEW_ENGINE repo variable.
Key changes
scripts/engine.sh— New LLM abstraction layer withrun_triage()andrun_agentic()functions that dispatch toclaudeorcopilotCLI based on$REVIEW_ENGINEscripts/review-one-pr.sh— Refactored to source engine.sh; engine-agnostic variable names (DELEGATION_ORGS,AI_DELEGATION_ENABLED, deep/audit tiers)- All prompts — Engine-agnostic tier names,
$ENGINE_LABELfooters, removed hardcoded model names - Workflow — Conditional CLI install,
REVIEW_ENGINE/COPILOT_GITHUB_TOKENvars,DELEGATION_ORGSwithCLAUDE_ORGSbackward compat fallback - Docs — Updated AGENT.md and README.md with both engine options
Model mapping
| Tier | Claude | Copilot |
|---|---|---|
| Triage | Haiku 4.5 | GPT-5-mini |
| Deep review | Sonnet 4.6 | GPT-5.2 |
| Security audit | Opus 4.6 | GPT-5.4 |
| Action/single | Sonnet/Opus | GPT-5.2/5.4 |
Usage
# Switch to Copilot engine:
gh variable set REVIEW_ENGINE --body copilot --repo don-petry/self
gh secret set COPILOT_GITHUB_TOKEN --repo don-petry/self
# Switch back to Claude (or leave unset — it's the default):
gh variable set REVIEW_ENGINE --body claude --repo don-petry/self
Backward compatibility
- Existing Claude setups work without changes (
REVIEW_ENGINEdefaults toclaude) CLAUDE_ORGSis still respected as a fallback forDELEGATION_ORGS- JSON field names in prompt output schemas (
escalate_to_opus,sonnet_findings_*) kept as-is to avoid breaking the parsing logic