Skip to content

feat(cli): --repo, and teach the review skill to find the repository and the PR - #20

Merged
fiddur merged 1 commit into
developfrom
repo-flag
Aug 21, 2026
Merged

feat(cli): --repo, and teach the review skill to find the repository and the PR#20
fiddur merged 1 commit into
developfrom
repo-flag

Conversation

@fiddur

@fiddur fiddur commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Two things stopped review my current draft PR working from where people actually stand.

The repository is often a subdirectory. A project directory holding several worktrees is not itself a repository, so the command failed with Error: Not a git repository — verified from ~/nc/SendgridIdempotency. --repo <path> selects one; everything downstream already resolves against the working directory, so a preAction hook that moves it covers the root command and every subcommand. Passing a non-directory is rejected rather than producing a confusing git error.

The skills now look one level down for repositories, use it when there is exactly one, and ask when there are several — listing them with their branches. Guessing reviews the wrong branch, and some project directories here hold thirteen worktrees.

A bare review reviewed the wrong thing. With no ref the skill defaulted to working-tree changes, which on a branch whose work is committed is an empty diff — precisely the case when reviewing your own draft before marking it Ready. Step 0 now asks gh pr view whether the branch has a pull request and reviews that instead, which pins the diff to the base commit via #6. A draft counts. The skill states which it chose, so a wrong guess is cheap to correct.

Same discovery step added to diffity-resolve, the other half of that loop.

Stacked on #19.

🤖 Generated with Claude Code

https://claude.ai/code/session_018PkYQzbsnMihHesafWvXKs

…and the PR

Two things stopped "review my current draft PR" from working from where people actually
stand.

A project directory often holds several worktrees as subdirectories rather than being a
repository itself, so the command was run outside any repository and failed with "Not a git
repository". --repo <path> selects one; everything downstream already resolves against the
working directory, so the option only has to move it. The skills now look one level down for
repositories and ask which one when there is more than one, rather than guessing.

A bare review also defaulted to working-tree changes, which on a branch whose work is
committed is an empty diff - exactly the case when reviewing your own draft before marking
it Ready. With no ref the skill now asks GitHub whether the branch has a pull request and
reviews that, which pins the diff to the pull request's base commit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018PkYQzbsnMihHesafWvXKs
@fiddur
fiddur changed the base branch from review-standards to develop August 21, 2026 13:36
@fiddur
fiddur marked this pull request as ready for review August 21, 2026 13:36
@fiddur
fiddur merged commit 82c4497 into develop Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant