Skip to content

Rules: say who runs /code-review, and what to do when nobody can - #33

Merged
jbeda merged 1 commit into
mainfrom
fix/code-review-is-user-invoked
Jul 26, 2026
Merged

Rules: say who runs /code-review, and what to do when nobody can#33
jbeda merged 1 commit into
mainfrom
fix/code-review-is-user-invoked

Conversation

@jbeda

@jbeda jbeda commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

.claude/rules/agent-workflow.md step 2 said "Run /code-review against the resulting diff" — phrased as an instruction to the agent, which is not one an agent can follow. /code-review is user-invoked and billed to the user; it cannot be launched through the Skill tool, Bash, or any workaround.

An agent reading that rule literally either stalls waiting to run something it can't, or quietly skips the step. Silent skipping is the worse failure, because the loop's whole purpose is that correctness-critical changes don't ship unreviewed.

What changed

Step 2 now splits by who is present.

  • Synchronously, with the user there: prompt them to run it, name the tier the change warrants and why, and wait for findings. Marked as the better path — it's the real review, and the user decides what merges regardless.
  • Autonomously: approximate with independent reviewer subagents (one per finder angle the tier calls for) plus the adversarial binary run against hostile fixtures, which needs no slash command and which this document already calls the highest-yield finder for a format tool. Never describe the approximation as if /code-review ran.

Tier names stop being slash-command arguments. high and medium now name the depth itself — the argument when the user runs it, the number of finder angles when approximating — so the section reads correctly on both paths.

Round records say which path was taken, alongside the existing requirement to attribute each finding to its source.

An approximated round is also called out as grounds to keep a PR in draft when the change is correctness-critical and the user hasn't looked yet.

Notes

🤖 Generated with Claude Code

Step 2 of the review loop read 'Run /code-review against the resulting diff',
phrased as an instruction to the agent. It isn't one an agent can follow:
/code-review is user-invoked and billed to the user, and cannot be launched
through the Skill tool, Bash, or any workaround. An agent reading the rule
literally either stalls or quietly skips the step, and skipping it silently is
the worse of the two.

Split step 2 by who is present. Working synchronously, the agent prompts the
user to run it and says which tier the change warrants -- that path is
preferred, since it is the real thing and the user decides what merges anyway.
Running autonomously, the agent approximates with independent reviewer
subagents plus the adversarial binary run, which needs no slash command, and
must not describe the approximation as if /code-review had run.

The tier names in 'Scale round one' were written as /code-review arguments, so
they now name the depth itself: the argument when the user runs it, the number
of finder angles when approximating. Round records say which path was taken.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Joe Beda <joe@stacklok.com>
@jbeda
jbeda merged commit 91e454c into main Jul 26, 2026
2 checks passed
@jbeda
jbeda deleted the fix/code-review-is-user-invoked branch July 26, 2026 22:45
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