Skip to content

docs: drop early-return advice from java-reviewer nesting rule - #38734

Merged
harshach merged 1 commit into
mainfrom
detail/fix-docs/docs-drop-early-return-advice-from-java-reviewer-n-66fefd
Nov 26, 2026
Merged

harshach merged 1 commit into
mainfrom
detail/fix-docs/docs-drop-early-return-advice-from-java-reviewer-n-66fefd

Conversation

@detail-app

@detail-app detail-app Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Describe your changes:

N/A — documentation-only drift fix.

I worked on skills/agents/java-reviewer.md because the Java "one return per
method" rule was promoted from a preference to a 🟡 finding, but the reviewer
agent's nesting-depth row still told reviewers to "Use early returns ... to
reduce nesting" — the exact practice the rule now forbids. A reviewer following
this guidance would flag well-formed code and suggest a banned refactor (e.g.,
recommend converting an if/else block into a guard-clause return).

The row now keeps only the two sanctioned remedies (extract methods or invert
conditions) and points at .claude/rules/java.md so the advice cannot drift back.

Introduced by commit 5d5bb2c (@harshach, #38415)

Type of change:

  • Documentation

High-level design:

N/A — small change (one line in one living doc).

Tests:

N/A — documentation-only; no code, schema, or UI behavior changed.

Unit tests

  • Not applicable (no backend code changes).

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • Not applicable (no UI changes).

Manual testing performed

None — verified by reading the updated rule in .claude/rules/java.md:57 and
AGENTS.md:93, both of which state early returns are forbidden.

UI screen recording:

Not applicable — documentation-only change with no UI impact.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title follows <type>: <short explanation> form.
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above. — doc-drift fixup, no separate issue.
  • Self-review: reviewed the final diff against REVIEW.md; no 🔴 findings (doc-only change).
  • Decision check: not applicable — no new decision; this aligns an existing doc with an already-recorded ADR (docs/decisions/2026-11-20-a-method-returns-once.md).

Doc Drift PRs can be configured here.

@detail-app
detail-app Bot requested a review from harshach November 25, 2026 18:40
@harshach
harshach merged commit e8e2116 into main Nov 26, 2026
37 checks passed
@harshach
harshach deleted the detail/fix-docs/docs-drop-early-return-advice-from-java-reviewer-n-66fefd branch November 26, 2026 00:33
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