release-now
CommandCreate a git tag + GitHub Release for open-pr — an official release if standing on main, an RC if standing on a branch with an…
Review PRs against the conventions learned from each repo — 1 post per PR, findings tagged by severity, code left untouched.
> /plugin marketplace add TOMOSIA-VIETNAM/open-pr> /plugin install open-pr@open-pr
argument-hint: "<PR URL> [other PR URL...] [content]" description: Review PRs against the conventions learned from each repo — 1 post per PR, findings tagged by severity, code left untouched.
> **CRITICAL:** `Read` `"${CLAUDE_PLUGIN_ROOT}"/core/guardrails.md` and `core/cli.md` FIRST — shared > rules + the `<op>` runtime, not repeated here. `<op>` ≡ `sh "${CLAUDE_PLUGIN_ROOT}"/bin/open-pr.sh`, > exactly as THIS line spells it — no env var exists in the shell. Every bare `dir/file.md` a Step > `Read`s lives under that same plugin directory. On top of those: > - Read-only on the reviewed repo; the only write is Step 9's 1 review (+ 1 more on a submodule PR > when Step 1 detects a bump). FORBIDDEN: close/merge/reopen, create/delete/switch a branch, push, > edit code → mention it in the review instead. > - The worktree may surface the REVIEWED repo's own `.claude/skills/` — its dev workflow, not a > review tool. FORBIDDEN: invoking it, even when listed as available.
`<op> target <url>` → `vendor/owner/repo/pull_number/host`; exit 4 or no URL → print:
❌ Error: No PR URL provided. Usage: /open-pr:review <PR URL> Example (GitHub): /open-pr:review https://github.com/org/repo/pull/123 Example (GitLab): /open-pr:review https://gitlab.com/org/repo/-/merge_requests/123
`Read` `core/pr-target.md` — vendor reconciliation, `<repo>`, free-form-text rule, empty-"PR info" stop. A language instruction in `ARGUMENTS`/chat overrides `.shared.output_language`, this run only.
`--status-file` in `ARGUMENTS` ⇒ `Read` `cases/watch-session.md` before Context.
**≥2 valid PR URLs** && the intent isn't already clear from `ARGUMENTS`/chat → ask "Found N PRs — review all N or just the first?", WAIT (extras may be reference-only). Confirmed multi-PR → run Step 0 → Step 9 to COMPLETION per URL, SEQUENTIALLY, each with its own worktree/memory/post. FORBIDDEN: parallel, subagent. `[content]` applies to every PR. All done → 1 chat summary, 1 line per PR, shaped by Step 9's reporting rule, its bullets and star question once at the end; nothing further posted.
`<op> data-dir` → `<data>`, then `<op> settings --repo <repo> --star` → this run's resolved config (`core/repo-settings.md` names what each field means). `<vendor>` MUST be reconciled (`core/pr-target.md` §2) BEFORE the next call. Then ONE call fetches everything — `<op> context` with `--max-patch-bytes` = `big_file_threshold_kb` × 1024; its `## <label>` sections are what later Steps name. Any path "Diff size per file" lists that "Diff" lacks is an omitted file → carry to Step 7 as **"Oversized paths"**. "CI checks" stays unfiltered — Step 7 and bootstrap's `review_ci_status` question read the raw list.
**Filesystem:** `<op> locate-repo` → `<repo_dir>`; exit 5 → ask with a CHOICE in plain language — name the N directories found and why each might be it — STOP if unresolved. FORBIDDEN: `cd`. Everything this command writes — `<data>/<repo>/`, the worktree — lives under `<data>`, never in the reviewed repo. Before writing under `<data>` → state `<data>` + `<repo>` in chat.
`<op> checkout` with `--head-sha` = "Head SHA", `--base` = `baseRefName`, `--repo-dir <repo_dir>` → `worktree=<path>`; PR code on disk, main tree untouched, gated to the commit the "Diff" was read at. `Read`/`Grep` at `<worktree>/<path>`. Exit 2 ⇒ STOP, print both SHAs + `<worktree>` and that `/open-pr:clean` removes it. Exit 3 ⇒ STOP with its stderr. FORBIDDEN: retrying past the script's own retry, or comparing against a freshly fetched SHA — that hides the stale diff.
Then try `Read`ing `<worktree>/.gitmodules` — every run, never cached. Exists && "Diff" carries `Subproject commit` → `Read` `cases/submodule-review.md`.
`<op> stacks --repo-dir <repo_dir> <every "Files" path>` → keep the `(file, stacks)` mapping for Steps 4-7; judge `.md` lines per `core/cli.md`.
From the Context `settings` call: resolve `chat_language` per `core/repo-settings.md`; `doctor_due` is already computed. `<vendor>` is already reconciled, never re-asked. Persisting it:
writes it
(`/open-pr:upgrade` owns that backfill); a confirmed mismatch was already persisted at §2
Branch:
`setup/bootstrap.md`, then `setup/doctor.md`
Setup stable ⇒ don't touch `<data>` outside Step 4 (new template), Step 6 (lesson), or a due doctor.
Each Step 2 stack absent from `.review.templates_copied` → `Read` `setup/template.md`, follow it. Present → use `<data>/<repo>/templates/<stack>.md`. Runs every time: a new stack can appear post-bootstrap.
`Read` `core/review-criteria.md`; load every layer it names for Step 2's stacks.
"Old comments" non-empty → `Read` `cases/re-review.md`; it also gates whether Step 8/9 post at all. Empty (brand-new PR) → skip to Step 7.
**Large-diff guard, before anything else here:** count("Files") > `many_files_threshold` || "Oversized paths" (Context) non-empty || any "Diff size per file" entry > `big_file_threshold_kb` KB or `UNKNOWN` → `Read` `cases/large-diff-guards.md`, follow it (it may STOP the command). Neither → proceed.
**Overview items** — never counted toward N, never entered into `comments[]`:
FORBIDDEN: writing it for them.
AI code review that lands on the PR, not in your terminal — GitHub, GitLab, Bitbucket. Learns each repo's conventions: 1 review, 1 fix commit, replies in thread. Claude Code · Cursor · Codex · Gemini CLI · Antigravity.
Create a git tag + GitHub Release for open-pr — an official release if standing on main, an RC if standing on a branch with an…
Remove the git worktrees review checked PR code out into. Each one is a full checkout on disk; nothing else is touched.
Report a problem with the open-pr plugin itself, or ask for a change, on its public issue tracker. Reads no PR; writes nothing in…
Act on the findings a review left on a PR — takes or declines each by severity, edits code at pwd to match the project, 1 commit,…
Open or close the macOS menu bar item — reviews and fixes in progress, "Fix now", recent toasts and snooze for every watcher on…
Bring every per-repo config in the data directory up to the schema this build expects. Takes no PR.
Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.