backnotprop / backnotprop/plannotator
Allow /plannotator-review <path> to review a specific worktree
- Dominant language
- TypeScript
- Stars
- 8.7k
- Forks
- 649
- Avg merge
- 11h 12m
- Merged PRs (30d)
- 109
Description
## Summary
Allow `/plannotator-review` to accept a local path and use it as the review workspace/cwd.
Example:
```text
/plannotator-review .worktrees/my-feature
/plannotator-review /absolute/path/to/repo/.worktrees/my-feature
```
## Motivation
When working with agent-created git worktrees, the active chat/session cwd may be the main checkout while the implementation lives in a separate worktree. Today `/plannotator-review` opens review for the current session cwd, and passing a worktree path as a positional argument is ignored unless it is a URL.
This makes it awkward to review the correct worktree without starting a new agent/session from that worktree directory.
## Current behavior
The slash command supports PR URLs and flags such as `--git`, `--local`, and `--no-local`, but local non-URL positional args are not treated as a cwd/workspace target.
## Requested behavior
If the first positional argument is a local path, resolve it relative to the current cwd and pass it as the code review cwd.
Suggested behavior:
- `/plannotator-review ` reviews that local path/worktree.
- Existing `/plannotator-review ` behavior remains unchanged.
- Existing flags continue to work, e.g. `/plannotator-review .worktrees/my-feature --git`.
- Show a clear error if the path does not exist or is not a git/JJ workspace.
## Notes
The shared event API already supports `code-review` with a `cwd` payload, so this request is specifically about exposing that capability through the user-facing slash command.
Related issues:
- #196 covered worktree support generally.
- #295 asks for review triggering beyond the single manual slash command.
- #449 covers cwd/subdirectory behavior in code review.
Contributor guide
Assessment
This issue has not been assessed yet.