Copilot Collab
You are in a Copilot-collaborative development environment. GitHub Copilot CLI provides automated code reviews during development and interactive consultations for second opinions.
Automated Review Phases
Designing Phase
Implementing Phase
- Work through implementation tasks one at a time
- After each task, the hook triggers a Copilot code review of your changes
- Auto-fix CRITICAL/WARNING issues: When the review contains CRITICAL or WARNING severity items, fix them immediately and show a brief summary of what you changed
- Flag design conflicts: If a review suggestion conflicts with the approved design, note the conflict rather than blindly applying the suggestion
- Continue to the next task after addressing review feedback
Interactive Consultations (/consult)
Use /consult for on-demand second opinions from GPT-5.3-Codex or Gemini 3 Pro.
Consultation Types
| Type |
When |
Max Turns |
Context to Share |
| code-review |
After implementation, before commit |
3 |
All modified files + diff |
| second-opinion |
Architectural decisions |
5 |
Relevant files only |
| bug-analysis |
Test failures, complex debugging |
3 |
Full context + error logs |
Auto-Suggest Triggers
Proactively suggest a consultation when:
- Files changed >= 3 (check:
git diff --name-only | wc -l)
- Lines changed >= 100 (check:
git diff --stat)
- User says "done", "finished", "ready to commit"
- Test failures detected
When auto-suggesting, phrase it as: "Would you like a Copilot consultation before proceeding? [files/lines changed summary]"
Consultation Flow
- Gather context: Collect relevant files, diffs, error logs
- Secret scrubbing: Before sharing, scan for and redact:
- API keys (patterns:
sk-, ghp_, github_pat_, AKIA, Bearer)
- Passwords and tokens in config files
- Email addresses and PII
- Note redactions in the permission prompt
- Ask permission: Use AskUserQuestion showing:
- Files to be shared with line counts
- Model choice (GPT-5.3-Codex or Gemini 3 Pro)
- Any redacted secrets
- Run consultation: Write prompt to temp file, invoke consult.sh
- Present objectively: Show both your perspective and the consulted model's perspective side by side. Never advocate for one over the other.
- User decides: Use AskUserQuestion to let user pick approach
- Multi-turn follow-up: For follow-ups, include previous Q&A in the prompt:
Previous exchange:
Q: [question]
A: [response]
Follow-up: [new question]
- Log: Save consultation to
.claude/copilot-collab/consultations/YYYY-MM-DD-HHMMSS-type.md
Presentation Format
## Consultation: [type]
**Model:** [model used]
### [Model Name]'s Analysis
[Their response]
### Claude's Analysis
[Your perspective]
### Key Differences
- [Point of agreement or disagreement]
### Recommendation
Both perspectives are presented above. Which approach would you prefer?
Escape Hatches
| Command |
Effect |
/copilot-pause |
Pause auto-reviews (keep session) |
/copilot-resume |
Resume auto-reviews |
/copilot-skip |
Skip next review only |
/copilot-cancel |
End session entirely |
Remind users of these if reviews feel disruptive.
Important Rules
- Never advocate in consultations -- present both perspectives equally
- Auto-fix CRITICAL and WARNING review items without asking
- Always ask permission before sharing code with external models
- Scrub secrets before every consultation
- Log everything -- reviews to
.claude/copilot-collab/reviews/, consultations to .claude/copilot-collab/consultations/
1---2name: copilot-collab3description: Guides Claude's behavior during Copilot-collaborative development sessions: automated reviews (designing/implementing phases) and interactive consultations (/consult)4---56# Copilot Collab78You are in a Copilot-collaborative development environment. GitHub Copilot CLI provides automated code reviews during development and interactive consultations for second opinions.910## Automated Review Phases1112### Designing Phase13- Work on the design/plan normally (brainstorming, writing plans)14- When writing a plan file, update the state file's `plan_file` field:15 ```bash16 sed -i '' "s|^plan_file: .*|plan_file: \"docs/plans/YOUR-FILE.md\"|" .claude/copilot-collab/sessions/${CLAUDE_SESSION_ID}.md17 ```18- When you stop, the hook automatically sends the plan to Copilot for design review19- After review, the session transitions to implementing phase2021### Implementing Phase22- Work through implementation tasks one at a time23- After each task, the hook triggers a Copilot code review of your changes24- **Auto-fix CRITICAL/WARNING issues**: When the review contains CRITICAL or WARNING severity items, fix them immediately and show a brief summary of what you changed25- **Flag design conflicts**: If a review suggestion conflicts with the approved design, note the conflict rather than blindly applying the suggestion26- Continue to the next task after addressing review feedback2728## Interactive Consultations (/consult)2930Use `/consult` for on-demand second opinions from GPT-5.3-Codex or Gemini 3 Pro.3132### Consultation Types3334| Type | When | Max Turns | Context to Share |35|------|------|-----------|-----------------|36| code-review | After implementation, before commit | 3 | All modified files + diff |37| second-opinion | Architectural decisions | 5 | Relevant files only |38| bug-analysis | Test failures, complex debugging | 3 | Full context + error logs |3940### Auto-Suggest Triggers4142Proactively suggest a consultation when:43- Files changed >= 3 (check: `git diff --name-only | wc -l`)44- Lines changed >= 100 (check: `git diff --stat`)45- User says "done", "finished", "ready to commit"46- Test failures detected4748When auto-suggesting, phrase it as: "Would you like a Copilot consultation before proceeding? [files/lines changed summary]"4950### Consultation Flow51521. **Gather context**: Collect relevant files, diffs, error logs532. **Secret scrubbing**: Before sharing, scan for and redact:54 - API keys (patterns: `sk-`, `ghp_`, `github_pat_`, `AKIA`, `Bearer`)55 - Passwords and tokens in config files56 - Email addresses and PII57 - Note redactions in the permission prompt583. **Ask permission**: Use AskUserQuestion showing:59 - Files to be shared with line counts60 - Model choice (GPT-5.3-Codex or Gemini 3 Pro)61 - Any redacted secrets624. **Run consultation**: Write prompt to temp file, invoke consult.sh635. **Present objectively**: Show both your perspective and the consulted model's perspective side by side. Never advocate for one over the other.646. **User decides**: Use AskUserQuestion to let user pick approach657. **Multi-turn follow-up**: For follow-ups, include previous Q&A in the prompt:66 ```67 Previous exchange:68 Q: [question]69 A: [response]7071 Follow-up: [new question]72 ```738. **Log**: Save consultation to `.claude/copilot-collab/consultations/YYYY-MM-DD-HHMMSS-type.md`7475### Presentation Format7677```markdown78## Consultation: [type]79**Model:** [model used]8081### [Model Name]'s Analysis82[Their response]8384### Claude's Analysis85[Your perspective]8687### Key Differences88- [Point of agreement or disagreement]8990### Recommendation91Both perspectives are presented above. Which approach would you prefer?92```9394## Escape Hatches9596| Command | Effect |97|---------|--------|98| `/copilot-pause` | Pause auto-reviews (keep session) |99| `/copilot-resume` | Resume auto-reviews |100| `/copilot-skip` | Skip next review only |101| `/copilot-cancel` | End session entirely |102103Remind users of these if reviews feel disruptive.104105## Important Rules1061071. **Never advocate** in consultations -- present both perspectives equally1082. **Auto-fix** CRITICAL and WARNING review items without asking1093. **Always ask permission** before sharing code with external models1104. **Scrub secrets** before every consultation1115. **Log everything** -- reviews to `.claude/copilot-collab/reviews/`, consultations to `.claude/copilot-collab/consultations/`