Skip to content

docs(gemini-task): Gemini reviews its finished work with a fresh subagent - #12476

Merged
MarkusNeusinger merged 3 commits into
mainfrom
docs/gemini-self-review
Oct 30, 2026
Merged

MarkusNeusinger merged 3 commits into
mainfrom
docs/gemini-self-review

Conversation

@MarkusNeusinger

@MarkusNeusinger MarkusNeusinger commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

The owner's call after #12470: code quality comes before saving tokens, so Gemini reviews its own finished work before Claude sees it.

  • New section 2, step 7 in the gemini-task skill. Once a task (a single brief or one in packages) or a review round is done and the gates pass, Gemini pushes and starts one fresh subagent as the reviewer, in its own worktree on a detached checkout of the task branch. The reviewer's prompt names only the brief's Constraints and Acceptance and the diff, not Gemini's plan or notes, so it judges the code rather than the intent. It reads the whole diff for defects, runs the mutation table plus two or three breaks of its own, and reports findings with path:line, severity, and a fix. It commits and pushes nothing. Gemini fixes what holds up, reruns the gates, and pushes. A hand-over on a blocker skips the step.
  • ## Self-review in the hand-over PR body lists every finding as fixed (with its commit) or declined (with the reason), or as not run after a blocker hand-over. Review-round comments carry the findings too.
  • Claude's review stays independent (section 3, step 3). A reviewer of the same model shares the author's blind spots: in test(app): add render tests for palette, debug, and map sections #12470 the copied page logic passed Gemini's own gates. So the Opus subagent never sees the self-review, and afterwards Claude judges each declined finding. This matches the existing /zweitmeinung rule that a Gemini review never counts as the independent review of Gemini's work.
  • The hand-over moves from step 7 to step 8, and all references follow.

Test plan

  • uv run python -m tools.changelog check --base origin/main: the fragment is well-formed and the diff passes.
  • grep for section 2, step and step 7 across the skills and docs: every reference names the new numbers.
  • No automated check covers skill prose; the next Gemini task is the real test.

🤖 Generated with Claude Code

…gent

Before the hand-over, Gemini starts one reviewer subagent that sees only
Acceptance and the diff, runs the mutation table plus its own breaks, and
reports findings; Gemini fixes what holds up and lists every finding under
## Self-review in the PR body. Claude's independent review stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 30, 2026 14:44
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Three unresolved findings in .claude/skills/gemini-task/SKILL.md remain open, and the main gap is that the self-review step skips single-brief tasks even though the PR description and changelog say it runs for any finished task.

3 open issues
What changed in this PR

This PR changes the gemini-task skill so Gemini has its finished work reviewed by a fresh subagent before it hands the work over. Claude's independent Opus review stays in place, because a reviewer of the same model shares the author's blind spots. The skill is Claude's process document for briefs that Gemini works in the owner's interactive agy session.

Changes:

  • Adds step 7 to the Gemini section of the skill. Gemini starts a reviewer subagent that sees only the Acceptance section and the diff, and reports findings without committing or pushing.
  • Adds a ## Self-review section to the hand-over PR body. Each finding is listed as fixed (with its commit) or declined (with the reason).
  • Renumbers the hand-over from step 7 to step 8 and updates all references to it. Section 3 now says Claude judges each declined finding.
File Description
changelog.d/​gemini-self-review.md Adds the changelog fragment for the self-review step.
.claude/​skills/​gemini-task/​SKILL.md Adds the reviewer step, the Self-review section in the PR template, and the renumbered hand-over references.

Review effort: Lite

Comment thread .claude/skills/gemini-task/SKILL.md Resolved
Comment thread .claude/skills/gemini-task/SKILL.md Resolved
Comment thread .claude/skills/gemini-task/SKILL.md Resolved
…, has a blocker line

Copilot review on #12476 (three low findings).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MarkusNeusinger
MarkusNeusinger merged commit 6312239 into main Oct 30, 2026
20 checks passed
@MarkusNeusinger
MarkusNeusinger deleted the docs/gemini-self-review branch October 30, 2026 14:50
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.

2 participants