Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 4 additions & 3 deletions docs/agents/IMPLEMENTATION_START.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ Implementation work (creating branches/PRs, pushing commits, merging) must be pe

**Before starting:**
```bash
## Preferred: isolated auth store for the implementer role
## Canonical: separate auth store + separate window for /implement
# - Prefer running implementation in a dedicated terminal/VS Code window where GH_CONFIG_DIR is already set.
# PowerShell example:
# $env:GH_CONFIG_DIR="$env:USERPROFILE\.config\gh-implement"
# Bash example:
# export GH_CONFIG_DIR="$HOME/.config/gh-implement"

# Optional project hook (recommended if present):
# powershell -ExecutionPolicy Bypass -File tools/gh/as-implementer.ps1
gh api user --jq .login

# If the active login is not the implementer login:
gh auth switch -u <implementer_login>
gh api user --jq .login
```
Expand Down
29 changes: 15 additions & 14 deletions docs/agents/PR_REVIEW_START.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ PR reviews must be performed using a dedicated **reviewer** GitHub identity (not

**Before starting:**
```bash
## Preferred: isolated auth store for the reviewer role
# (pick a location that matches your OS conventions)
## Canonical: separate auth store + separate window for /pr-review
# - Prefer running reviews in a dedicated terminal/VS Code window where GH_CONFIG_DIR is already set.
# PowerShell example:
# $env:GH_CONFIG_DIR="$env:USERPROFILE\.config\gh-review"
# Bash example:
# export GH_CONFIG_DIR="$HOME/.config/gh-review"

# Optional project hook (recommended if present):
# powershell -ExecutionPolicy Bypass -File tools/gh/as-reviewer.ps1
gh api user --jq .login

# If the active login is not the reviewer login:
gh auth switch -u <reviewer_login>
gh api user --jq .login
```
Expand Down Expand Up @@ -201,18 +201,19 @@ gh api repos/:owner/:repo/pulls/<number>/comments

### Recommended: Separate reviewer identity (to enable approvals)

If you want the `/pr-review` role to submit real approvals, use a separate GitHub identity for reviews.
If you want `/pr-review` to submit real approvals, use a separate GitHub identity for reviews and keep it isolated from implementation work.

**Minimal setup:**
**Canonical setup (recommended):**
- Create a reviewer account (human or bot) and grant it **Write** access to the repo.
- Authenticate both accounts with GitHub CLI:
- `gh auth login` (implementer)
- `gh auth login` (reviewer)
- Switch active identity by role:
- Implement: `gh auth switch -u <implementer_login>`
- Review: `gh auth switch -u <reviewer_login>`

**Note:** You still cannot “independently approve” with the same identity that authored the PR. Separation here means “different GitHub identity”, not “different agent session”.
- Use separate `gh` auth stores:
- Implementer store: set `GH_CONFIG_DIR` to a path like `.../gh-implement`, then run `gh auth login`.
- Reviewer store: set `GH_CONFIG_DIR` to a path like `.../gh-review`, then run `gh auth login`.
- Run `/implement` and `/pr-review` in separate windows (each with its own `GH_CONFIG_DIR`).

**Fallback (works but easier to misuse):**
- Use a single store and manually switch identities via `gh auth switch`.

**Note:** You still cannot approve your own PR. Separation here means “different GitHub identity”, not “different agent session”.
## Review Output Format

**Summary review structure:**
Expand Down
1 change: 0 additions & 1 deletion skills/implement/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ If there is no spec yet, switch to `/design` (exploration) before implementing.

- Use the implementer GitHub identity for all implementation actions (branch/PR/push/merge).
- Prefer an isolated `gh` auth store for the implementer role via `GH_CONFIG_DIR` (see `.aide/docs/agents/IMPLEMENTATION_START.md`).
- Preferred: `powershell -ExecutionPolicy Bypass -File tools/gh/as-implementer.ps1` (if present).
- If the active GitHub identity is the reviewer identity, stop and request switching identities before proceeding.

## Workflow
Expand Down
7 changes: 4 additions & 3 deletions skills/pr-review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ Review a PR against the linked issue spec and project constraints. Do not push f
- Findings grouped by severity (Critical/Major/Minor) with `path:line` references.
- Clear decision: approve / request changes / non-blocking.
- Prefer submitting as a formal GitHub Review via `gh pr review` (not only as a PR comment).
- Switch to the reviewer identity before reviewing:
- Preferred: `powershell -ExecutionPolicy Bypass -File tools/gh/as-reviewer.ps1` (if present)
- Fallback: `gh auth switch -u <reviewer_login>` (see `.aide/docs/agents/PR_REVIEW_START.md`)
- Run reviews from a dedicated reviewer context:
- Prefer a separate window/terminal with `GH_CONFIG_DIR` set to the reviewer auth store.
- Verify identity with `gh api user --jq .login` before submitting a review.
- If needed, use `gh auth switch -u <reviewer_login>` (see `.aide/docs/agents/PR_REVIEW_START.md`).
- If the reviewer identity == PR author, stop and request switching identities (do not review as the author).

## Reference
Expand Down