From 9ac013a096d859114d012f73e9a2bb6953b07291 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 25 Sep 2026 23:07:38 +0000 Subject: [PATCH 1/5] feat: ship Code Jury as a Claude Code plugin (#115) Add a plugin marketplace at the repository root (.claude-plugin/marketplace.json) listing one plugin in plugin/, so users can run: claude plugin marketplace add agentsdance/codejury claude plugin install codejury@codejury The plugin carries two skills: - /codejury:review runs `jury review` (or npx @agentsdance/codejury) with --web=false and, unless the user passes --push, --push=false, then summarizes findings and verdicts. It is user-invoked only. - multi-agent-code-review, moved from skill/SKILL.md, with its repository links made absolute since installed plugins are copied without the repo. The plugin lives in its own directory because a plugin's bin/ is put on PATH and blocks claude.ai installs; the repository's bin/ stays outside. No version is pinned, so installs follow the repository. Verified with `claude plugin validate` and an install from the local marketplace; test/plugin.test.js checks the manifests and that every flag the review skill names exists in `jury help review`. Closes #115 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01YWwuLax3VBtTJuujgK748c --- .claude-plugin/marketplace.json | 15 ++++++ CHANGELOG.md | 4 ++ README.md | 16 +++++++ plugin/.claude-plugin/plugin.json | 13 +++++ .../skills/multi-agent-code-review}/SKILL.md | 8 ++-- plugin/skills/review/SKILL.md | 48 +++++++++++++++++++ test/plugin.test.js | 46 ++++++++++++++++++ 7 files changed, 146 insertions(+), 4 deletions(-) create mode 100644 .claude-plugin/marketplace.json create mode 100644 plugin/.claude-plugin/plugin.json rename {skill => plugin/skills/multi-agent-code-review}/SKILL.md (91%) create mode 100644 plugin/skills/review/SKILL.md create mode 100644 test/plugin.test.js diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json new file mode 100644 index 0000000..aa829b7 --- /dev/null +++ b/.claude-plugin/marketplace.json @@ -0,0 +1,15 @@ +{ + "name": "codejury", + "description": "Code Jury: independent AI code reviewers and one judge, from inside Claude Code.", + "owner": { + "name": "agentsdance", + "url": "https://github.com/agentsdance" + }, + "plugins": [ + { + "name": "codejury", + "source": "./plugin", + "description": "Run a Code Jury review of a pull request, and the multi-agent review loop skill." + } + ] +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c7356d..af23c1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +- Code Jury is now a Claude Code plugin: `claude plugin marketplace add agentsdance/codejury`, then + `claude plugin install codejury@codejury`. `/codejury:review ` runs a review from a Claude + Code session without pushing unless asked, and the review-loop skill moved from `skill/SKILL.md` + to `plugin/skills/multi-agent-code-review/SKILL.md` (#115). - The `agy` install hint now points at the official `https://antigravity.google/cli/install.sh`; the npm package it named does not exist. - Configure the model each agent runs with: `jury agents model ` saves a default in diff --git a/README.md b/README.md index 04542ea..aee417e 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,22 @@ jury help review # complete review options `jury ` is shorthand for `jury review `. You can also run without installing: `npx @agentsdance/codejury review --reviewer claude --push=false`. +### Claude Code plugin + +Code Jury is also a [Claude Code plugin](https://code.claude.com/docs/en/plugins). Add this +repository as a plugin marketplace and install it: + +```sh +claude plugin marketplace add agentsdance/codejury +claude plugin install codejury@codejury +``` + +In a session, `/codejury:review ` runs `jury review` (or `npx @agentsdance/codejury` +when `jury` is not installed) with `--web=false` and, unless you pass `--push`, `--push=false`, then +summarizes the findings and verdicts. With no URL it reviews the current branch. The plugin also +ships the `multi-agent-code-review` skill for running the review loop by hand. Agent CLIs are +still installed and authenticated separately. + ## Screenshots A review of Code Jury PR #67, with Droid judging and Claude, Codex, and Grok reviewing. diff --git a/plugin/.claude-plugin/plugin.json b/plugin/.claude-plugin/plugin.json new file mode 100644 index 0000000..1438e67 --- /dev/null +++ b/plugin/.claude-plugin/plugin.json @@ -0,0 +1,13 @@ +{ + "name": "codejury", + "displayName": "Code Jury", + "description": "Review a pull request with independent AI reviewers and one judge, using the Code Jury CLI.", + "author": { + "name": "agentsdance", + "url": "https://github.com/agentsdance" + }, + "homepage": "https://github.com/agentsdance/codejury#readme", + "repository": "https://github.com/agentsdance/codejury", + "license": "MIT", + "keywords": ["code-review", "pull-request", "agents", "codex", "claude"] +} diff --git a/skill/SKILL.md b/plugin/skills/multi-agent-code-review/SKILL.md similarity index 91% rename from skill/SKILL.md rename to plugin/skills/multi-agent-code-review/SKILL.md index a91db99..7dd18f9 100644 --- a/skill/SKILL.md +++ b/plugin/skills/multi-agent-code-review/SKILL.md @@ -8,7 +8,7 @@ description: Review a pull request with several independent AI reviewers (codex, You are the **main agent**. You write code, answer findings, and own the commit. Reviewers only read and report — never let one edit files. -The CLI owns the mechanics; you own the judgement. See `DESIGN.md` for the split. +The CLI owns the mechanics; you own the judgement. See [DESIGN.md](https://github.com/agentsdance/codejury/blob/master/DESIGN.md) for the split. ## The loop @@ -32,7 +32,7 @@ git worktree add "$WT" origin/ --detach ``` Launch concurrently and in the background — the slowest sets the round's wall clock. Agent -invocations are configuration (`config.example.yaml`); only three things vary: +invocations are configuration ([config.example.yaml](https://github.com/agentsdance/codejury/blob/master/config.example.yaml)); only three things vary: - **prompt delivery** — argv (`codex`) vs a file flag (`droid -f`) - **cwd** — process cwd (`codex`) vs an explicit `--cwd` flag (`droid`) @@ -41,7 +41,7 @@ invocations are configuration (`config.example.yaml`); only three things vary: ## The prompt -Four sections, in order. Template in `prompts/review-round.md`. +Four sections, in order. Template in [prompts/review-round.md](https://github.com/agentsdance/codejury/blob/master/prompts/review-round.md). 1. **What the change does** — a few bullets, so the reviewer does not infer intent. 2. **ALREADY SETTLED — do NOT re-report** — grows every round. Without it, each fresh reviewer @@ -90,7 +90,7 @@ without reproducing anything, which is the whole point of the loop. Reply to every finding — silence is not a resolution. Per finding: **ACCEPTED** / **AGREE-BUT-DEFERRED** / **REJECTED**, each with reasoning, each ending in a direct -question. Template in `prompts/feedback.md`. +question. Template in [prompts/feedback.md](https://github.com/agentsdance/codejury/blob/master/prompts/feedback.md). ```bash jury reply --dir "$WT" # one conversation per reviewer, concurrently diff --git a/plugin/skills/review/SKILL.md b/plugin/skills/review/SKILL.md new file mode 100644 index 0000000..4d9bc26 --- /dev/null +++ b/plugin/skills/review/SKILL.md @@ -0,0 +1,48 @@ +--- +name: review +description: Run a Code Jury review of a pull request — independent AI reviewers report findings, one judge triages and fixes them, and the loop repeats until the reviewers agree there is nothing new. +argument-hint: "[pr-url ...] [jury flags]" +disable-model-invocation: true +--- + +# Code Jury review + +Run the Code Jury CLI on: `$ARGUMENTS` + +## 1. Find the CLI + +Use `jury` when `command -v jury` finds it. Otherwise run it without installing, as +`npx -y @agentsdance/codejury`. It needs Node.js 20 or newer; if neither works, tell the user to run +`npm install -g @agentsdance/codejury` and stop. + +## 2. Build the command + +Start from `jury review`, then add the arguments above unchanged: + +- One or more PR URLs review those PRs. With none, Jury reviews the current Git checkout's branch + against its trunk; if the working directory is not a Git repository, ask the user for a PR URL. +- Add `--web=false` unless the arguments already set `--web`. The browser console otherwise keeps + the command running after the review finishes. +- Add `--push=false` unless the arguments already set `--push`. Jury pushes fixes by default; pushing + from inside this session should be the user's explicit choice. Say that you added it. + +Do not choose reviewers, a judge or models for the user; Jury already applies the flags, the +repository's `jury.config.json` and the saved defaults (`jury agents`). + +## 3. Run it + +Print the command, then run it with the Bash tool in the background: a review runs several agent +CLIs for several rounds and can take many minutes. Before agents start, Jury prints the selected +judge and reviewers; report them. If it stops early (a missing or unauthenticated agent CLI, a +missing `gh` login for a GitHub URL), show the error and the fix it names; `jury agents` lists +which agent CLIs are installed. + +## 4. Report + +When it finishes, summarize from the output: the rounds run, each reviewer's findings with the +judge's verdict (accepted, deferred or rejected), the commits the judge made, and whether they were +pushed. Every run is saved locally: `jury runs` lists them, and `jury --web-only` reopens the console +to read the full prompts, reports and verdicts. + +Do not fix the findings yourself, and do not edit the files Jury is working on while it runs: +the judge owns the fixes for this review. diff --git a/test/plugin.test.js b/test/plugin.test.js new file mode 100644 index 0000000..580cbac --- /dev/null +++ b/test/plugin.test.js @@ -0,0 +1,46 @@ +import { test } from "node:test"; +import assert from "node:assert/strict"; +import { existsSync, readdirSync, readFileSync } from "node:fs"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import { execFileSync } from "node:child_process"; + +const root = fileURLToPath(new URL("..", import.meta.url)); +const json = file => JSON.parse(readFileSync(path.join(root, file), "utf8")); + +test("the marketplace lists the plugin under the same name as its manifest", () => { + const market = json(".claude-plugin/marketplace.json"); + assert.equal(market.name, "codejury"); + assert.ok(market.owner?.name); + const [entry] = market.plugins; + assert.equal(market.plugins.length, 1); + assert.match(entry.source, /^\.\/[^.]/); + const manifest = json(path.join(entry.source, ".claude-plugin/plugin.json")); + assert.equal(entry.name, manifest.name); + assert.equal(manifest.license, json("package.json").license); + // Unpinned on purpose: installs follow the repository instead of a version to keep in sync. + assert.equal(manifest.version, undefined); + // A plugin bin/ goes on PATH and blocks claude.ai installs; the repository's bin/ must stay outside. + assert.ok(!existsSync(path.join(root, entry.source, "bin"))); +}); + +test("every plugin skill has a name and description, and the review skill uses real flags", () => { + const skills = path.join(root, "plugin/skills"); + const names = readdirSync(skills).sort(); + assert.deepEqual(names, ["multi-agent-code-review", "review"]); + for (const name of names) { + const text = readFileSync(path.join(skills, name, "SKILL.md"), "utf8"); + const front = text.match(/^---\n([\s\S]*?)\n---\n/)?.[1]; + assert.ok(front, `${name}: frontmatter`); + assert.match(front, new RegExp(`^name: ${name}$`, "m")); + assert.match(front, /^description: \S/m); + // Installed plugins are copied without the rest of the repository. + assert.doesNotMatch(text, /`(DESIGN\.md|config\.example\.yaml|prompts\/[\w-]+\.md)`/, `${name}: repository-relative path`); + } + const review = readFileSync(path.join(skills, "review/SKILL.md"), "utf8"); + assert.match(review, /^disable-model-invocation: true$/m); + const help = execFileSync(process.execPath, [path.join(root, "bin/jury.js"), "help", "review"], { encoding: "utf8" }); + for (const flag of review.match(/--[a-z][\w-]*/g)) assert.ok(help.includes(`${flag} `), `jury review has no ${flag}`); + assert.equal(json("package.json").name, "@agentsdance/codejury"); + assert.match(review, /npx -y @agentsdance\/codejury/); +}); From 58a2a3e0464b73911b53dfd4e628d684d643279d Mon Sep 17 00:00:00 2001 From: Will Date: Wed, 21 Oct 2026 17:11:59 +0800 Subject: [PATCH 2/5] docs: finish Claude Code plugin usage and review guidance --- CHANGELOG.md | 3 +- README.md | 4 +- plugin/README.md | 70 +++++++++++++++++++ .../skills/multi-agent-code-review/SKILL.md | 34 ++++++--- plugin/skills/review/SKILL.md | 25 +++++-- 5 files changed, 117 insertions(+), 19 deletions(-) create mode 100644 plugin/README.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 9163583..9465146 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,8 @@ - Code Jury is now a Claude Code plugin: `claude plugin marketplace add agentsdance/codejury`, then `claude plugin install codejury@codejury`. `/codejury:review ` runs a review from a Claude Code session without pushing unless asked, and the review-loop skill moved from `skill/SKILL.md` - to `plugin/skills/multi-agent-code-review/SKILL.md` (#115). + to `plugin/skills/multi-agent-code-review/SKILL.md`. The manual guidance now uses the current + agent configuration and exact review session IDs (#115). ## 0.8.2-rc.1 — 2026-10-20 diff --git a/README.md b/README.md index aee417e..34bd1c1 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,9 @@ In a session, `/codejury:review ` runs `jury review` (or `npx @agentsdan when `jury` is not installed) with `--web=false` and, unless you pass `--push`, `--push=false`, then summarizes the findings and verdicts. With no URL it reviews the current branch. The plugin also ships the `multi-agent-code-review` skill for running the review loop by hand. Agent CLIs are -still installed and authenticated separately. +still installed and authenticated separately. `--push=false` keeps fixes and commits local; it +does not make the review read-only. See the [plugin guide](plugin/README.md) for prerequisites, +updates, and local installation checks. ## Screenshots diff --git a/plugin/README.md b/plugin/README.md new file mode 100644 index 0000000..8abd620 --- /dev/null +++ b/plugin/README.md @@ -0,0 +1,70 @@ +# Code Jury for Claude Code + +Run independent AI code reviewers and a judge from a Claude Code session. The judge triages +findings and fixes accepted issues; Jury repeats the loop until the reviewers agree or the run +reaches its limit. + +## Install + +```sh +claude plugin marketplace add agentsdance/codejury +claude plugin install codejury@codejury +``` + +Start a new Claude Code session after installing, then run: + +```text +/codejury:review https://github.com/owner/repo/pull/123 +/codejury:review --reviewer claude --judge codex --rounds 3 +``` + +The second example reviews the current branch. You can also pass multiple related PR URLs, +use `--dir` to select a checkout, or pass other `jury review` flags. + +You need Node.js 20.10 or newer, npm, Git, and installed, authenticated agent CLIs. GitHub PR URLs +also need an authenticated `gh` CLI. The plugin uses an installed `jury`, or +`npx -y @agentsdance/codejury` if `jury` is absent. It does not bundle or authenticate agent CLIs. +Use `jury agents` (or `npx -y @agentsdance/codejury agents`) to inspect your setup. + +## Behavior + +- `/codejury:review` runs only when invoked by the user. It respects your CLI flags, + `jury.config.json`, and saved agent/model defaults. +- It defaults to `--web=false` so the command exits after review, and `--push=false` so fixes stay + local. The judge can still edit files and Jury can create commits. Pass `--push` to publish them. +- Explicit `--web` and `--push` values take precedence. With `--web=true`, the console stays open + after the review completes. +- `multi-agent-code-review` provides guidance for manually coordinating reviewers and triaging + findings. Its source moved from `skill/SKILL.md` to `plugin/skills/multi-agent-code-review/SKILL.md`; + update any copies or symlinks that used the old path. + +## Update + +```sh +claude plugin marketplace update codejury +claude plugin update codejury@codejury +``` + +The plugin deliberately omits a version field so updates follow the repository without maintaining +a second release number. The installed Code Jury CLI is separate; update a global CLI installation +with `npm install -g @agentsdance/codejury` when needed. + +## Develop and validate + +From the repository root: + +```sh +claude plugin validate ./plugin +claude plugin validate . +node --test test/plugin.test.js +claude --plugin-dir ./plugin +``` + +To test marketplace installation, add the local repository path as a marketplace and install +`codejury@codejury`. Use an isolated `CLAUDE_CONFIG_DIR` for development so this does not change your +normal marketplace settings. `claude plugin details codejury` should list `review` and +`multi-agent-code-review`. + +The plugin lives under `plugin/` so installation includes only its manifest, skills, and this guide. +Skill references to repository documentation use GitHub URLs because the rest of the source tree +is not part of the installed plugin. diff --git a/plugin/skills/multi-agent-code-review/SKILL.md b/plugin/skills/multi-agent-code-review/SKILL.md index 7dd18f9..a81a0f0 100644 --- a/plugin/skills/multi-agent-code-review/SKILL.md +++ b/plugin/skills/multi-agent-code-review/SKILL.md @@ -10,34 +10,44 @@ and report — never let one edit files. The CLI owns the mechanics; you own the judgement. See [DESIGN.md](https://github.com/agentsdance/codejury/blob/master/DESIGN.md) for the split. +For the automated loop, use `/codejury:review`; the configured judge owns its fixes. The guidance +below is for explicitly requested manual review and triage. Do not edit a checkout while an +automated Jury run is using it. In CLI examples, substitute `npx -y @agentsdance/codejury` for +`jury` if it is not installed, and keep the same `--dir` and `--run` when working with saved findings. + ## The loop ``` round N - ├─ worktree at the pushed HEAD + ├─ worktree at the commit being reviewed ├─ launch every reviewer in parallel, in the background ├─ triage each finding: reproduce → fix → prove the test fails without the fix ├─ reply to every finding, including rejections - ├─ verify, amend, push + ├─ verify, commit, push if authorized ├─ append what was settled to the prompt - └─ stop iff every reviewer emitted the stop token on the SAME commit + └─ stop iff every reviewer succeeded and emitted the stop token on the SAME commit ``` ## Running reviewers -Cut a detached worktree at the pushed commit so reviewers see what a human reviewer would: +Resolve the selected branch or PR head to `REVIEW_SHA`, then cut a detached worktree at that exact +commit. After local fixes, review their new commit even when pushing is disabled: ```bash -git worktree add "$WT" origin/ --detach +git worktree add "$WT" "$REVIEW_SHA" --detach ``` -Launch concurrently and in the background — the slowest sets the round's wall clock. Agent -invocations are configuration ([config.example.yaml](https://github.com/agentsdance/codejury/blob/master/config.example.yaml)); only three things vary: +Launch concurrently and in the background — the slowest sets the round's wall clock. Use the +current [agent definitions](https://github.com/agentsdance/codejury/tree/master/lib/agents) and +[configuration guide](https://github.com/agentsdance/codejury/blob/master/docs/configuration.md), +with overrides in `jury.config.json` +([example](https://github.com/agentsdance/codejury/blob/master/jury.config.example.json)): - **prompt delivery** — argv (`codex`) vs a file flag (`droid -f`) - **cwd** — process cwd (`codex`) vs an explicit `--cwd` flag (`droid`) -- **resume** — `codex exec resume --last` keeps context; droid's text output carries no session id, so - a follow-up must be a fresh run with its prior findings quoted back +- **resume** — retain each reviewer's exact session id and pass it to that agent's configured + resume command. Never select the most recent session: it may belong to another task. If there is + no usable session id, start fresh with only that reviewer's prior findings quoted back. ## The prompt @@ -102,8 +112,9 @@ agreement stops being evidence. `jury reply` redacts the other agents' names out for you, so writing "agy raised this too" in a `--reason` is safe — but do not rely on it as licence to quote another thread. -Delivery follows `resume.supported`: codex resumes the session that already holds its review, so it -gets your verdicts alone; agy starts fresh every run, so its own findings are quoted back to it. +Delivery follows `resume.supported` and the recorded session id. Codex, Claude, Droid and +Antigravity support resuming their own conversations. Without a usable session id, start a fresh +conversation and quote only that reviewer's findings back to it. Rejections need evidence, not authority. One was settled by writing a three-line throwaway test and pasting the panic. @@ -121,6 +132,7 @@ that is a design decision, not a fact, and the loop should stop arguing. - **Mock frameworks may not re-apply inside a loop.** Build the mock once outside it. - **A verbose agent's stdout contains the prompt**, so grepping the whole stream for the stop token matches the instruction that asked for it. Parse the final report block. +- **A failed reviewer is not a sign-off**, even if its partial output includes the stop token. - **Reviewers recycle suggestions when they have nothing left.** A verbatim repeat of a prior cosmetic note is a decent convergence signal. diff --git a/plugin/skills/review/SKILL.md b/plugin/skills/review/SKILL.md index 4d9bc26..4f16094 100644 --- a/plugin/skills/review/SKILL.md +++ b/plugin/skills/review/SKILL.md @@ -12,20 +12,27 @@ Run the Code Jury CLI on: `$ARGUMENTS` ## 1. Find the CLI Use `jury` when `command -v jury` finds it. Otherwise run it without installing, as -`npx -y @agentsdance/codejury`. It needs Node.js 20 or newer; if neither works, tell the user to run -`npm install -g @agentsdance/codejury` and stop. +`npx -y @agentsdance/codejury`. It needs Node.js 20.10 or newer and npm; if neither works, explain +which prerequisite is missing and how to install it. Use the same CLI prefix for every command +below, including `agents`, `runs`, and reopening the console. ## 2. Build the command -Start from `jury review`, then add the arguments above unchanged: +Start from `jury review` (or `npx -y @agentsdance/codejury review`), then preserve the user's +arguments and quote each value safely for the shell. Do not evaluate argument text as shell code. - One or more PR URLs review those PRs. With none, Jury reviews the current Git checkout's branch - against its trunk; if the working directory is not a Git repository, ask the user for a PR URL. + against its trunk, or uses the location/run selected by `--dir` or `--resume`. Let Jury resolve + the target; if it reports that no repository or target can be found, ask for a checkout or PR URL. - Add `--web=false` unless the arguments already set `--web`. The browser console otherwise keeps the command running after the review finishes. - Add `--push=false` unless the arguments already set `--push`. Jury pushes fixes by default; pushing from inside this session should be the user's explicit choice. Say that you added it. +Recognize both `--push=false` and `--push false`, as well as bare `--push` or `--web` (true). +For example, preserve `--push false` and `--web=true` without appending conflicting defaults. +Explain that `--push=false` still lets the judge edit files and Jury create local commits. + Do not choose reviewers, a judge or models for the user; Jury already applies the flags, the repository's `jury.config.json` and the saved defaults (`jury agents`). @@ -41,8 +48,14 @@ which agent CLIs are installed. When it finishes, summarize from the output: the rounds run, each reviewer's findings with the judge's verdict (accepted, deferred or rejected), the commits the judge made, and whether they were -pushed. Every run is saved locally: `jury runs` lists them, and `jury --web-only` reopens the console -to read the full prompts, reports and verdicts. +pushed. Distinguish convergence from a failed, interrupted, or round-limited run. If the user enabled +the web console, the process stays alive after review completion; report the finished review when +Jury announces it instead of waiting for the console to exit. + +Every run is saved locally: `jury runs` lists them, and `jury --web-only` reopens the console to read +the full prompts, reports and verdicts. Retain any `--dir` used for the review in these commands and +select the reported run with `--run` when opening the console. Include the checkout path for local +commits so the user can inspect or publish them later. Do not fix the findings yourself, and do not edit the files Jury is working on while it runs: the judge owns the fixes for this review. From 2a433d37ef8f45799b10a60f540dfcfe86f3e103 Mon Sep 17 00:00:00 2001 From: Will Date: Wed, 21 Oct 2026 20:51:38 +0800 Subject: [PATCH 3/5] feat: enable the Claude Code plugin web console by default --- CHANGELOG.md | 3 ++- README.md | 14 ++++++++------ plugin/README.md | 19 ++++++++++++------- plugin/skills/review/SKILL.md | 28 +++++++++++++++++----------- 4 files changed, 39 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9465146..b7d370f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,8 @@ - Code Jury is now a Claude Code plugin: `claude plugin marketplace add agentsdance/codejury`, then `claude plugin install codejury@codejury`. `/codejury:review ` runs a review from a Claude - Code session without pushing unless asked, and the review-loop skill moved from `skill/SKILL.md` + Code session with the web console enabled and its link shown by default, without pushing unless + asked. Pass `--web=false` to disable the console. The review-loop skill moved from `skill/SKILL.md` to `plugin/skills/multi-agent-code-review/SKILL.md`. The manual guidance now uses the current agent configuration and exact review session IDs (#115). diff --git a/README.md b/README.md index 34bd1c1..df5ca47 100644 --- a/README.md +++ b/README.md @@ -90,12 +90,14 @@ claude plugin install codejury@codejury ``` In a session, `/codejury:review ` runs `jury review` (or `npx @agentsdance/codejury` -when `jury` is not installed) with `--web=false` and, unless you pass `--push`, `--push=false`, then -summarizes the findings and verdicts. With no URL it reviews the current branch. The plugin also -ships the `multi-agent-code-review` skill for running the review loop by hand. Agent CLIs are -still installed and authenticated separately. `--push=false` keeps fixes and commits local; it -does not make the review read-only. See the [plugin guide](plugin/README.md) for prerequisites, -updates, and local installation checks. +when `jury` is not installed) with `--web=true` and, unless you pass `--push`, `--push=false`. +Claude shares the web console link, summarizes the findings and verdicts when the review ends, +and leaves the console running. Pass `--web=false` to disable it. With no URL it reviews the +current branch. The plugin also ships the `multi-agent-code-review` skill for running the review +loop by hand. Agent CLIs are +still installed and authenticated separately. `--push=false` disables pushing; it does not make +the review read-only. For retained local fixes, review your own checkout without a PR URL. +See the [plugin guide](plugin/README.md) for prerequisites, updates, and local installation checks. ## Screenshots diff --git a/plugin/README.md b/plugin/README.md index 8abd620..d2fdc16 100644 --- a/plugin/README.md +++ b/plugin/README.md @@ -14,12 +14,14 @@ claude plugin install codejury@codejury Start a new Claude Code session after installing, then run: ```text +/codejury:review /codejury:review https://github.com/owner/repo/pull/123 -/codejury:review --reviewer claude --judge codex --rounds 3 ``` -The second example reviews the current branch. You can also pass multiple related PR URLs, -use `--dir` to select a checkout, or pass other `jury review` flags. +The first example reviews the current branch using your saved settings; no PR or MR is required. +The second reviews a specific PR. Both open the web console and display its link in Claude Code. +You can also pass multiple related PR URLs, use `--dir` to select a checkout, or pass other +`jury review` flags. To override your saved agent choices, add `--reviewer claude --judge codex`. You need Node.js 20.10 or newer, npm, Git, and installed, authenticated agent CLIs. GitHub PR URLs also need an authenticated `gh` CLI. The plugin uses an installed `jury`, or @@ -30,10 +32,13 @@ Use `jury agents` (or `npx -y @agentsdance/codejury agents`) to inspect your set - `/codejury:review` runs only when invoked by the user. It respects your CLI flags, `jury.config.json`, and saved agent/model defaults. -- It defaults to `--web=false` so the command exits after review, and `--push=false` so fixes stay - local. The judge can still edit files and Jury can create commits. Pass `--push` to publish them. -- Explicit `--web` and `--push` values take precedence. With `--web=true`, the console stays open - after the review completes. +- It defaults to `--web=true`: the browser console opens and Claude shares its URL. Claude reports + the review result when it is ready and leaves the console running for you to inspect. + Pass `--web=false` for results only in Claude Code and a command that exits after review. +- It defaults to `--push=false`, so Jury does not push. The judge can still edit files and Jury + can create commits. Pass `--push` to publish them. Local-branch reviews retain fixes in your + checkout; single-PR URL checkouts are temporary and their unpushed fixes are removed on exit. +- Explicit `--web` and `--push` values take precedence. - `multi-agent-code-review` provides guidance for manually coordinating reviewers and triaging findings. Its source moved from `skill/SKILL.md` to `plugin/skills/multi-agent-code-review/SKILL.md`; update any copies or symlinks that used the old path. diff --git a/plugin/skills/review/SKILL.md b/plugin/skills/review/SKILL.md index 4f16094..be79924 100644 --- a/plugin/skills/review/SKILL.md +++ b/plugin/skills/review/SKILL.md @@ -24,13 +24,13 @@ arguments and quote each value safely for the shell. Do not evaluate argument te - One or more PR URLs review those PRs. With none, Jury reviews the current Git checkout's branch against its trunk, or uses the location/run selected by `--dir` or `--resume`. Let Jury resolve the target; if it reports that no repository or target can be found, ask for a checkout or PR URL. -- Add `--web=false` unless the arguments already set `--web`. The browser console otherwise keeps - the command running after the review finishes. +- Add `--web=true` unless the arguments already set `--web`. Open the browser console by default; + an explicit `--web=false` or `--web false` disables it. - Add `--push=false` unless the arguments already set `--push`. Jury pushes fixes by default; pushing from inside this session should be the user's explicit choice. Say that you added it. Recognize both `--push=false` and `--push false`, as well as bare `--push` or `--web` (true). -For example, preserve `--push false` and `--web=true` without appending conflicting defaults. +For example, preserve `--push false` and `--web=false` without appending conflicting defaults. Explain that `--push=false` still lets the judge edit files and Jury create local commits. Do not choose reviewers, a judge or models for the user; Jury already applies the flags, the @@ -40,17 +40,23 @@ repository's `jury.config.json` and the saved defaults (`jury agents`). Print the command, then run it with the Bash tool in the background: a review runs several agent CLIs for several rounds and can take many minutes. Before agents start, Jury prints the selected -judge and reviewers; report them. If it stops early (a missing or unauthenticated agent CLI, a -missing `gh` login for a GitHub URL), show the error and the fix it names; `jury agents` lists -which agent CLIs are installed. +judge and reviewers; report them. Read the initial output until the console URL appears, then +share that exact URL as a clickable Markdown link, including its port and run query parameter. +Do not guess the URL. Skip this step when the user disabled the console. If it stops early (a +missing or unauthenticated agent CLI, a missing `gh` login for a GitHub URL), show the error and +the fix it names; `jury agents` lists which agent CLIs are installed. + +Monitor the background output while the review runs. With the console enabled, do not rely on a +background-task completion notification: the server keeps the process alive after review ends. ## 4. Report -When it finishes, summarize from the output: the rounds run, each reviewer's findings with the -judge's verdict (accepted, deferred or rejected), the commits the judge made, and whether they were -pushed. Distinguish convergence from a failed, interrupted, or round-limited run. If the user enabled -the web console, the process stays alive after review completion; report the finished review when -Jury announces it instead of waiting for the console to exit. +When Jury announces review completion or a stopped/incomplete review, summarize from the output: +the rounds run, each reviewer's findings with the judge's verdict (accepted, deferred or rejected), +the commits the judge made, and whether they were pushed. Distinguish convergence from a failed, +interrupted, or round-limited run. Report the result +without waiting for the console to exit, include its link again, and leave it running so the user +can inspect the review. Do not stop the console unless the user asks. Every run is saved locally: `jury runs` lists them, and `jury --web-only` reopens the console to read the full prompts, reports and verdicts. Retain any `--dir` used for the review in these commands and From a4e9fcefe7f205e362bba26d6b4bc3a1804910a7 Mon Sep 17 00:00:00 2001 From: Will Date: Wed, 21 Oct 2026 20:57:03 +0800 Subject: [PATCH 4/5] docs: clarify the limits of reviews without a PR URL --- README.md | 9 +++++---- plugin/README.md | 9 +++++++-- plugin/skills/review/SKILL.md | 8 ++++++-- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 152c8e7..b373e88 100644 --- a/README.md +++ b/README.md @@ -114,10 +114,11 @@ claude plugin install codejury@codejury In a session, `/codejury:review ` runs `jury review` (or `npx @agentsdance/codejury` when `jury` is not installed) with `--web=true` and, unless you pass `--push`, `--push=false`. Claude shares the web console link, summarizes the findings and verdicts when the review ends, -and leaves the console running. Pass `--web=false` to disable it. With no URL it reviews the -current branch. The plugin also ships the `multi-agent-code-review` skill for running the review -loop by hand. Agent CLIs are -still installed and authenticated separately. `--push=false` disables pushing; it does not make +and leaves the console running. Pass `--web=false` to disable it. With no URL it reviews the current +branch's committed changes against its base. General local-directory review, including uncommitted +changes or an entire-directory audit, is not implemented. The plugin also ships the +`multi-agent-code-review` skill for running the review loop by hand. Agent CLIs are still installed +and authenticated separately. `--push=false` disables pushing; it does not make the review read-only. For retained local fixes, review your own checkout without a PR URL. See the [plugin guide](plugin/README.md) for prerequisites, updates, and local installation checks. diff --git a/plugin/README.md b/plugin/README.md index d2fdc16..5219a7d 100644 --- a/plugin/README.md +++ b/plugin/README.md @@ -18,11 +18,16 @@ Start a new Claude Code session after installing, then run: /codejury:review https://github.com/owner/repo/pull/123 ``` -The first example reviews the current branch using your saved settings; no PR or MR is required. -The second reviews a specific PR. Both open the web console and display its link in Claude Code. +The first example reviews the current branch's committed changes against its base branch using +your saved settings; no PR or MR is required for that branch comparison. The second reviews a +specific PR. Both open the web console and display its link in Claude Code. You can also pass multiple related PR URLs, use `--dir` to select a checkout, or pass other `jury review` flags. To override your saved agent choices, add `--reviewer claude --judge codex`. +General local-directory review is not implemented: `--dir` selects a Git checkout, and the review +compares committed changes against the base. It does not select staged, unstaged, or untracked +changes, or audit the entire directory. A branch matching its base has no changes to review. + You need Node.js 20.10 or newer, npm, Git, and installed, authenticated agent CLIs. GitHub PR URLs also need an authenticated `gh` CLI. The plugin uses an installed `jury`, or `npx -y @agentsdance/codejury` if `jury` is absent. It does not bundle or authenticate agent CLIs. diff --git a/plugin/skills/review/SKILL.md b/plugin/skills/review/SKILL.md index be79924..9b8471b 100644 --- a/plugin/skills/review/SKILL.md +++ b/plugin/skills/review/SKILL.md @@ -21,9 +21,13 @@ below, including `agents`, `runs`, and reopening the console. Start from `jury review` (or `npx -y @agentsdance/codejury review`), then preserve the user's arguments and quote each value safely for the shell. Do not evaluate argument text as shell code. -- One or more PR URLs review those PRs. With none, Jury reviews the current Git checkout's branch - against its trunk, or uses the location/run selected by `--dir` or `--resume`. Let Jury resolve +- One or more PR URLs review those PRs. With none, Jury reviews the current Git checkout's committed + branch changes against its trunk, or uses the location/run selected by `--dir` or `--resume`. Let Jury resolve the target; if it reports that no repository or target can be found, ask for a checkout or PR URL. +- General local-directory review is not implemented. `--dir` selects the checkout for that branch + comparison; staged, unstaged, and untracked changes are outside its diff. If the user asks to + review those changes or the entire directory, explain the missing capability. Do not present + an empty branch diff as evidence that the directory was reviewed. - Add `--web=true` unless the arguments already set `--web`. Open the browser console by default; an explicit `--web=false` or `--web false` disables it. - Add `--push=false` unless the arguments already set `--push`. Jury pushes fixes by default; pushing From e96b124d885370d542f4afb9c547a74ad91f243f Mon Sep 17 00:00:00 2001 From: Will Date: Wed, 21 Oct 2026 21:00:19 +0800 Subject: [PATCH 5/5] feat: require PR URLs for Claude Code plugin reviews --- CHANGELOG.md | 5 ++- README.md | 9 ++-- plugin/README.md | 24 +++++------ .../skills/multi-agent-code-review/SKILL.md | 5 ++- plugin/skills/review/SKILL.md | 42 +++++++++++-------- 5 files changed, 47 insertions(+), 38 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48553ad..183fcb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,9 @@ - Code Jury is now a Claude Code plugin: `claude plugin marketplace add agentsdance/codejury`, then `claude plugin install codejury@codejury`. `/codejury:review ` runs a review from a Claude Code session with the web console enabled and its link shown by default, without pushing unless - asked. Pass `--web=false` to disable the console. The review-loop skill moved from `skill/SKILL.md` - to `plugin/skills/multi-agent-code-review/SKILL.md`. The manual guidance now uses the current + asked. A PR URL is required; Claude asks for it if omitted. Pass `--web=false` to disable the console. + The review-loop skill moved from `skill/SKILL.md` to `plugin/skills/multi-agent-code-review/SKILL.md`. + The manual guidance now uses the current agent configuration and exact review session IDs (#115). - Resolve offline local GitLab reviews from the caller's valid cached remote default when available, instead of requiring a redundant `--trunk` override. diff --git a/README.md b/README.md index b373e88..acc96fd 100644 --- a/README.md +++ b/README.md @@ -114,12 +114,11 @@ claude plugin install codejury@codejury In a session, `/codejury:review ` runs `jury review` (or `npx @agentsdance/codejury` when `jury` is not installed) with `--web=true` and, unless you pass `--push`, `--push=false`. Claude shares the web console link, summarizes the findings and verdicts when the review ends, -and leaves the console running. Pass `--web=false` to disable it. With no URL it reviews the current -branch's committed changes against its base. General local-directory review, including uncommitted -changes or an entire-directory audit, is not implemented. The plugin also ships the +and leaves the console running. Pass `--web=false` to disable it. The plugin requires a PR URL; +if omitted, Claude asks for it before starting. The plugin also ships the `multi-agent-code-review` skill for running the review loop by hand. Agent CLIs are still installed -and authenticated separately. `--push=false` disables pushing; it does not make -the review read-only. For retained local fixes, review your own checkout without a PR URL. +and authenticated separately. `--push=false` disables pushing; it does not make the review read-only. +Single-PR checkouts are temporary and their unpushed fixes are removed during cleanup. See the [plugin guide](plugin/README.md) for prerequisites, updates, and local installation checks. ## Screenshots diff --git a/plugin/README.md b/plugin/README.md index 5219a7d..d67043a 100644 --- a/plugin/README.md +++ b/plugin/README.md @@ -1,7 +1,7 @@ # Code Jury for Claude Code -Run independent AI code reviewers and a judge from a Claude Code session. The judge triages -findings and fixes accepted issues; Jury repeats the loop until the reviewers agree or the run +Review PRs with independent AI code reviewers and a judge from a Claude Code session. The judge +triages findings and fixes accepted issues; Jury repeats the loop until the reviewers agree or the run reaches its limit. ## Install @@ -14,19 +14,17 @@ claude plugin install codejury@codejury Start a new Claude Code session after installing, then run: ```text -/codejury:review /codejury:review https://github.com/owner/repo/pull/123 +/codejury:review https://github.com/owner/repo/pull/123 --reviewer claude --judge codex --rounds 3 ``` -The first example reviews the current branch's committed changes against its base branch using -your saved settings; no PR or MR is required for that branch comparison. The second reviews a -specific PR. Both open the web console and display its link in Claude Code. -You can also pass multiple related PR URLs, use `--dir` to select a checkout, or pass other -`jury review` flags. To override your saved agent choices, add `--reviewer claude --judge codex`. +The first example uses your saved agent settings. The second overrides the reviewer, judge, and +round limit. Both open the web console and display its link in Claude Code. -General local-directory review is not implemented: `--dir` selects a Git checkout, and the review -compares committed changes against the base. It does not select staged, unstaged, or untracked -changes, or audit the entire directory. A branch matching its base has no changes to review. +A PR URL is required. If you run `/codejury:review` without one, Claude asks for the URL before +starting. Local-branch and local-directory reviews are outside this plugin's scope. +You can pass multiple related PR URLs or other `jury review` flags. With a PR URL, `--dir` selects +where checkouts and run records are stored. Resuming a run also requires its original PR URL(s). You need Node.js 20.10 or newer, npm, Git, and installed, authenticated agent CLIs. GitHub PR URLs also need an authenticated `gh` CLI. The plugin uses an installed `jury`, or @@ -41,8 +39,8 @@ Use `jury agents` (or `npx -y @agentsdance/codejury agents`) to inspect your set the review result when it is ready and leaves the console running for you to inspect. Pass `--web=false` for results only in Claude Code and a command that exits after review. - It defaults to `--push=false`, so Jury does not push. The judge can still edit files and Jury - can create commits. Pass `--push` to publish them. Local-branch reviews retain fixes in your - checkout; single-PR URL checkouts are temporary and their unpushed fixes are removed on exit. + can create commits. Pass `--push` to publish them. Single-PR URL checkouts are temporary and + their unpushed fixes are removed during cleanup. - Explicit `--web` and `--push` values take precedence. - `multi-agent-code-review` provides guidance for manually coordinating reviewers and triaging findings. Its source moved from `skill/SKILL.md` to `plugin/skills/multi-agent-code-review/SKILL.md`; diff --git a/plugin/skills/multi-agent-code-review/SKILL.md b/plugin/skills/multi-agent-code-review/SKILL.md index 92bd804..31cc582 100644 --- a/plugin/skills/multi-agent-code-review/SKILL.md +++ b/plugin/skills/multi-agent-code-review/SKILL.md @@ -5,6 +5,9 @@ description: Review a pull request with several independent AI reviewers (codex, # Multi-agent code review +This plugin supports PR reviews only. Require a PR URL before starting reviewers; if it is missing, +ask for it. Do not infer a local-branch or local-directory review from the current checkout. + You are the **main agent**. You write code, answer findings, and own the commit. Reviewers only read and report — never let one edit files. @@ -30,7 +33,7 @@ round N ## Running reviewers -Resolve the selected branch or PR head to `REVIEW_SHA`, then cut a detached worktree at that exact +Resolve the requested PR's head to `REVIEW_SHA`, then cut a detached worktree at that exact commit. After local fixes, review their new commit even when pushing is disabled: ```bash diff --git a/plugin/skills/review/SKILL.md b/plugin/skills/review/SKILL.md index 9b8471b..2aed618 100644 --- a/plugin/skills/review/SKILL.md +++ b/plugin/skills/review/SKILL.md @@ -1,7 +1,7 @@ --- name: review description: Run a Code Jury review of a pull request — independent AI reviewers report findings, one judge triages and fixes them, and the loop repeats until the reviewers agree there is nothing new. -argument-hint: "[pr-url ...] [jury flags]" +argument-hint: " [pr-url ...] [jury flags]" disable-model-invocation: true --- @@ -9,25 +9,33 @@ disable-model-invocation: true Run the Code Jury CLI on: `$ARGUMENTS` -## 1. Find the CLI +## 1. Require a PR URL + +This command supports PR reviews only. Require at least one PR URL, supplied as a positional +argument or with `--pr`. If none is provided, reply briefly: "Please provide the PR URL to review, +for example:" followed by: + +```text +/codejury:review https://github.com/owner/repo/pull/123 +``` + +Wait for the URL before finding or launching the CLI. Do not infer a PR from the current branch +or start a local review. Flags alone, including `--dir` or `--resume`, do not supply a review target. + +## 2. Find the CLI Use `jury` when `command -v jury` finds it. Otherwise run it without installing, as `npx -y @agentsdance/codejury`. It needs Node.js 20.10 or newer and npm; if neither works, explain which prerequisite is missing and how to install it. Use the same CLI prefix for every command below, including `agents`, `runs`, and reopening the console. -## 2. Build the command +## 3. Build the command Start from `jury review` (or `npx -y @agentsdance/codejury review`), then preserve the user's arguments and quote each value safely for the shell. Do not evaluate argument text as shell code. -- One or more PR URLs review those PRs. With none, Jury reviews the current Git checkout's committed - branch changes against its trunk, or uses the location/run selected by `--dir` or `--resume`. Let Jury resolve - the target; if it reports that no repository or target can be found, ask for a checkout or PR URL. -- General local-directory review is not implemented. `--dir` selects the checkout for that branch - comparison; staged, unstaged, and untracked changes are outside its diff. If the user asks to - review those changes or the entire directory, explain the missing capability. Do not present - an empty branch diff as evidence that the directory was reviewed. +- One or more PR URLs select the PRs to review. Let Jury resolve their checkouts. With a PR URL, + `--dir` selects the checkout/state root. Resuming a run still requires its original PR URL(s). - Add `--web=true` unless the arguments already set `--web`. Open the browser console by default; an explicit `--web=false` or `--web false` disables it. - Add `--push=false` unless the arguments already set `--push`. Jury pushes fixes by default; pushing @@ -40,7 +48,7 @@ Explain that `--push=false` still lets the judge edit files and Jury create loca Do not choose reviewers, a judge or models for the user; Jury already applies the flags, the repository's `jury.config.json` and the saved defaults (`jury agents`). -## 3. Run it +## 4. Run it Print the command, then run it with the Bash tool in the background: a review runs several agent CLIs for several rounds and can take many minutes. Before agents start, Jury prints the selected @@ -53,19 +61,19 @@ the fix it names; `jury agents` lists which agent CLIs are installed. Monitor the background output while the review runs. With the console enabled, do not rely on a background-task completion notification: the server keeps the process alive after review ends. -## 4. Report +## 5. Report When Jury announces review completion or a stopped/incomplete review, summarize from the output: the rounds run, each reviewer's findings with the judge's verdict (accepted, deferred or rejected), the commits the judge made, and whether they were pushed. Distinguish convergence from a failed, -interrupted, or round-limited run. Report the result -without waiting for the console to exit, include its link again, and leave it running so the user -can inspect the review. Do not stop the console unless the user asks. +interrupted, or round-limited run. Report the result without waiting for the console to exit, +include its link again, and leave it running so the user can inspect the review. Do not stop the +console unless the user asks. Every run is saved locally: `jury runs` lists them, and `jury --web-only` reopens the console to read the full prompts, reports and verdicts. Retain any `--dir` used for the review in these commands and -select the reported run with `--run` when opening the console. Include the checkout path for local -commits so the user can inspect or publish them later. +select the reported run with `--run` when opening the console. Single-PR checkouts are temporary; +their unpushed fixes are removed during cleanup. Do not promise that those commits remain available. Do not fix the findings yourself, and do not edit the files Jury is working on while it runs: the judge owns the fixes for this review.