Skip to content

Add code review guidance and require Assisted-by on every agent commit - #4067

Merged
siegfriedpammer merged 2 commits into
masterfrom
docs/code-review-guidelines
Aug 29, 2026
Merged

siegfriedpammer merged 2 commits into
masterfrom
docs/code-review-guidelines

Conversation

@siegfriedpammer

Copy link
Copy Markdown
Member

Two rules for agents working in this repo, both written after a concrete incident on #4065. CLAUDE.md only, no code changes.

Code review guidance (new section)

An agent review on #4065 posted twelve inline comments and eight had to be withdrawn. Two causes were worth writing down:

  • Most of the withdrawn comments were output of a decompdiff corpus sweep run against the PR branch. A sweep measures the whole decompiler, not the diff, so most of what it surfaces is pre-existing, unrelated, or a known limitation, and it does not belong in a review verbatim. Exploratory testing on a PR branch is still encouraged - it just gets triaged first, and what the diff did not cause becomes an issue instead.
  • One comment called an inserted cast a regression. It was the correct emission: the previous output compiled only because C# target-types the switch expression, which the decompiler does not model. Building the baseline output would have caught that in under a minute.

The section also sets the bar for what gets posted at all - output that does not compile, changes semantics, or crashes - with one deliberate exception for coverage gaps in the PR's own feature, since sweeps are good at finding those and the PR is the right moment to add the fixture.

Assisted-by on every agent-written commit

The existing wording described what an AI-assisted commit looks like without saying the trailer is required, which left it readable as a convention for substantial changes only. The marker is only informative if it is on all of the agent's work, so the exemption is removed. The same bullet extends it to PR and issue comments, where a single disclaimer on a review body had left eleven inline comments carrying no indication an agent wrote them.

Happy to drop either commit if the project would rather not carry this as guidance.


This pull request was opened by an AI agent (Claude) on Siegfried's behalf.

@siegfriedpammer
siegfriedpammer force-pushed the docs/code-review-guidelines branch 3 times, most recently from f9fa690 to 278242d Compare August 28, 2026 11:23
@siegfriedpammer
siegfriedpammer force-pushed the docs/code-review-guidelines branch 3 times, most recently from 3193ecf to ab25ca4 Compare August 28, 2026 16:43
An agent review of PR #4065 posted twelve comments and eight had to be
withdrawn. Most were output of a decompdiff corpus sweep run against the
PR branch, which measures the whole decompiler rather than the diff, and
one called a cast a regression when it was the correct emission -- the
old form compiled only because C# target-types the switch expression.

The guide lives in .github/ rather than inline because most sessions
never review anything and should not carry it, and because it is as
useful to a human reviewer as to an agent. CLAUDE.md keeps only the two
rules that have to hold before you have decided you are reviewing at
all, plus the pointer.

Assisted-by: Claude:claude-opus-5[1m]:Claude Code
The previous wording described what an AI-assisted commit looks like
without saying the trailer is mandatory, which left it readable as a
convention for substantial changes only. The marker is what lets a
reader tell which work came from an agent, so it has to hold across all
of it -- an exemption for trivial commits makes the absence of the
trailer meaningless. The same reasoning closed a matching gap in how
agents comment on PRs, where a single disclaimer on a review body left
eleven inline comments unmarked.

Assisted-by: Claude:claude-opus-5[1m]:Claude Code
@siegfriedpammer
siegfriedpammer force-pushed the docs/code-review-guidelines branch from ab25ca4 to 8971986 Compare August 28, 2026 16:51
@siegfriedpammer
siegfriedpammer merged commit 46d8f8c into master Aug 29, 2026
15 checks passed
@siegfriedpammer
siegfriedpammer deleted the docs/code-review-guidelines branch August 29, 2026 18:36
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.

3 participants