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
25 changes: 25 additions & 0 deletions .changelogs/v3.34.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Release v3.34.0

Released: 2026-08-25

## Highlights

- **`/do:review` now scales its review effort to the change.** The host orchestrator inspects the PR before dispatching focused review lenses, so small or narrowly scoped changes can complete without unnecessary sub-agents.
- **Review coverage remains evidence-driven.** Security, cross-file, structural, surface, and quality lenses are selected only when the changed files provide a concrete signal, while strict mode still preserves its required checks without forcing every optional lens.
- **Zero focused agents is a valid outcome.** When the host review finds no focused lens warranted, it records that decision and continues with the host review rather than treating the absence of sub-agents as a failure.
- **The selection policy is centralized and test-protected.** The new library contract is installed and uninstalled with the rest of the shared review libraries, and the parser tests cover adaptive selection and reporting.

## Changed

- `/do:review` and the Claude improve-review command now document host-owned adaptive dispatch, selected-lens reasons, and skipped-lens reporting.
- The README describes the review command's adaptive agent behavior.
- Installer and uninstaller allowlists include the shared review-agent-selection policy.

## Tests

- `git diff --check release...main` passed.
- The full Node test suite passed: 390 tests, 64 suites, 0 failures.

## Full Changelog

**Full Diff**: https://github.com/atomantic/slashdo/compare/v3.33.3...v3.34.0
7 changes: 6 additions & 1 deletion .claude/commands/improve/review.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ Analyze code review feedback on a PR, identify patterns our review system missed

## Architecture Overview

The `/do:review` system uses 5 parallel agents, each with focused reading strategies:
The `/do:review` system has one host orchestrator and six optional focused review
lenses. The orchestrator inspects each PR and selects zero or more lenses based on
the changed behavior; selected lenses run in parallel, and a simple change may use
no sub-agents at all:

| Agent | File | Focus |
|---|---|---|
Expand All @@ -18,10 +21,12 @@ The `/do:review` system uses 5 parallel agents, each with focused reading strate
| Security Audit | `lib/review-security-audit.md` | Trust boundaries, injection, SSRF, data exposure, access control |
| Cross-File Tracing | `lib/review-cross-file-tracing.md` | State/lifecycle/concurrency across files: stale state propagation, lifecycle gaps, resource leaks, lock/flag exit paths, races |
| Cross-File Contract | `lib/review-cross-file-contract.md` | Contracts across files: schema/shape agreements, validation parity, error classification, field-set enumerations, architectural-pattern adherence |
| Structural Ambition | `lib/review-structural-ambition.md` | Strict-mode structural concerns: code-judo simplifications, file-size growth, abstraction sprawl, boundary leaks, and bespoke duplicates |

Additionally:
- `lib/code-review-checklist.md` — master source-of-truth (canonical reference, not directly used by agents)
- `commands/do/review.md` — orchestrator (dispatches agents, deduplicates, fixes, reports)
- `lib/review-agent-selection.md` — orchestrator's evidence-based lens-selection policy

## Phase 1: Parse Input & Fetch Feedback

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ By default the orchestrator that opened the PR applies every reviewer's fixes it

### Command-specific behavior

- **`/do:review`** — the listed agents run *after* the host CLI's own multi-agent self-review; the list names *additional* reviewers.
- **`/do:review`** — the host CLI inspects the change and selects only the focused self-review lenses it needs (possibly none); any `--review-with` agents run afterward as additional reviewers.
- **`/do:better` / `/do:better-swift` / `/do:simplify` / `/do:depfree`** — the chosen reviewers run as the post-PR review loop (per PR, in parallel for the multi-PR better commands). **Omitting `--review-with` skips the review loop and the auto-merge** — PRs are left open for manual review.
- **`/do:rpr`** — resolves review threads from any author (Copilot, human, or bot). Like every other command it has **no default reviewer**: omit `--review-with` (and set no saved default) and rpr requests nothing — it just fetches and resolves the unresolved threads the PR already carries. Name a reviewer and rpr requests it, then loops review → fix → re-review. It accepts only `--review-with` and `--reviewer-applies` (not `--review-iterations`, `--review-mode`, or the stop-mode flags), and it doesn't support `@<login>` entries — it drops them with a notice.

Expand Down
63 changes: 42 additions & 21 deletions commands/do/review.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ LIBS=(
local-agent-review-loop model-tiers multi-reviewer-loop ollama-review-loop
per-finding-root-cause plan-id-format plan-issue-mode
post-review-doc-recommendations remediation-agent-template
review-config-defaults review-convergence-gate
review-agent-selection review-config-defaults review-convergence-gate
swift-review-checklist swift-gotchas
review-surface-scan review-surface-quality review-security-audit
review-cross-file-tracing review-cross-file-contract
Expand Down
52 changes: 52 additions & 0 deletions lib/review-agent-selection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Review Agent Selection

The host CLI agent is the review orchestrator. It must inspect the scoped diff,
changed files, commit claims, and project conventions before deciding whether any
focused sub-agent is needed. The focused agents below are optional review lenses,
not a fixed checklist or a minimum fan-out.

## Selection protocol

After the PR-level coherence check and before dispatch:

1. Read the changed files in full and summarize what the change actually does.
2. Start with an empty `SELECTED_REVIEW_AGENTS` list. Add a lens only when the
diff contains a concrete signal that its reading strategy will add coverage.
3. Record one short reason beside every selected lens. The reason must name the
changed behavior or boundary that triggered it, not merely repeat the lens
name.
4. If no focused lens is justified, dispatch no sub-agents. The host agent still
performs the complete self-review, and the report must say that the focused
pass was intentionally skipped and why.
5. When the signal is ambiguous but the consequence could be serious, select the
relevant lens. Saving a dispatch is not a reason to omit a lens that is clearly
needed.

The decision is about review coverage, not file extensions alone. A small diff can
need several lenses when it changes a security boundary or a producer/consumer
contract; a larger mechanical or documentation-only diff may need none or only one.
If multiple lenses are selected, dispatch them in parallel. Each selected lens reads
all changed files, but reports only findings within its own mandate.

## Lens signals

| Lens | Select when the diff shows | Usually skip when |
|---|---|---|
| Surface Scan (Runtime) | Executable behavior, request handling, UI state, scripts, migrations, subprocesses, or error paths that can fail at runtime | The change is only prose, metadata, or a mechanically generated fixture with no runtime behavior |
| Surface Quality | Documentation or configuration claims, tests/fixtures, dependency metadata, or a behavior change whose intent and coverage need a file-local quality pass | The diff is a tiny, self-evident implementation edit and the host can verify its local quality directly |
| Security Audit | Authentication/authorization, untrusted input, secrets, URLs, shell/process execution, network calls, file paths, dependencies, or sensitive output | No trust boundary, privilege, external input, or sensitive data changes |
| Cross-File Tracing (State) | Async work, state machines, events, jobs, retries, lifecycle, persistence, concurrency, or a control/data flow spanning modules | A self-contained change with no stateful or cross-module lifecycle |
| Cross-File Contract | API/schema/type, serialization, persistence, configuration, event payload, or producer/consumer changes across a boundary | No changed shape or agreement crosses a module, layer, or documented interface |
| Structural Ambition | `--strict` is active **and** the diff contains non-trivial refactoring, new abstraction layers, large-file growth, conditional sprawl, boundary leakage, or duplicated canonical logic | `--strict` is absent, or strict mode is active only for a small isolated behavior/doc fix |

These signals are prompts for judgment, not an exhaustive classifier. Select more
than one lens when the change crosses concerns, and do not select a lens solely
because its category appears in the generic review checklist.

## Dispatch record

The review summary must report the selected lenses and their reasons, plus the
focused lenses intentionally skipped when that is useful context. The summary must
also distinguish the host orchestrator's self-review from the optional focused
passes, so zero sub-agents is visible as an intentional decision rather than a
missing review.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "slash-do",
"version": "3.33.3",
"version": "3.34.0",
"description": "Curated slash commands for AI coding assistants — Claude Code, OpenCode, Antigravity CLI, Codex, and Grok Build",
"author": "Adam Eivy <adam@eivy.com>",
"license": "MIT",
Expand Down
24 changes: 24 additions & 0 deletions test/review-loop-contract.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,30 @@ const LOOPS_WITH_OPTIONAL_ARRAYS = [
];

describe('review-loop parse contracts', () => {
it('lets the host orchestrator select focused review lenses from the diff', () => {
const command = readCommand('review.md');
const selection = readLib('review-agent-selection.md');

assert.match(command, /The host CLI is the review orchestrator/);
assert.match(command, /Strict mode does not force a focused agent/);
assert.match(command, /selection protocol/);
assert.match(command, /Spawn the selected agents simultaneously/);
assert.match(command, /If the selection is\s+empty, spawn no focused agents/);
assert.doesNotMatch(command, /Always dispatch agents 1–5/);
assert.doesNotMatch(command, /Spawn agents 1–5 simultaneously/);

assert.match(selection, /Start with an empty `SELECTED_REVIEW_AGENTS` list/);
assert.match(selection, /If no focused lens is justified, dispatch no sub-agents/);
assert.match(selection, /Structural Ambition \| `--strict` is active \*\*and\*\*/);
assert.match(selection, /selected lenses and their reasons/);

const summaryStart = command.indexOf('## Report');
const report = command.slice(summaryStart);
assert.match(report, /The table is dynamic/);
assert.match(report, /Host orchestrator \(self-review\)/);
assert.match(report, /Omit all focused-lens rows when none were selected/);
});

it('requires structured local-agent verdicts without weakening Codex handling', () => {
const body = readLib('local-agent-review-loop.md');
assert.match(body, /after stripping blank lines, the result must be either exactly `NO FINDINGS`/);
Expand Down
2 changes: 1 addition & 1 deletion uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ LIBS=(
local-agent-review-loop model-tiers multi-reviewer-loop ollama-review-loop
per-finding-root-cause plan-id-format plan-issue-mode
post-review-doc-recommendations remediation-agent-template
review-config-defaults review-convergence-gate
review-agent-selection review-config-defaults review-convergence-gate
swift-review-checklist swift-gotchas
review-surface-scan review-surface-quality review-security-audit
review-cross-file-tracing review-cross-file-contract
Expand Down