Skip to content

Conversation

@xingyaoww
Copy link
Collaborator

@xingyaoww xingyaoww commented Nov 12, 2025

Summary

This PR adds a new /codereview microagent based on analyzing @xingyaoww's actual code review history in this repository. The microagent captures real review patterns and principles from 153 review comments across 37 pull requests.

What's Added

1. Code Review Microagent (.openhands/microagents/code-review.md)

  • Trigger: /codereview
  • Based on: Analysis of 153 actual review comments
  • Structure: Follows the same format as codereview-roasted.md from OpenHands/OpenHands

2. Supporting Documentation

  • CODE_REVIEW_SUMMARY.md - Executive summary and usage guide
  • code_review_analysis.md - Detailed analysis of review patterns
  • code_review_history.txt - Raw review data (added to .gitignore, not committed)

Key Principles Identified

Through automated analysis, the following review principles were extracted:

  1. Simplicity First (5+ instances)

    • "This feels a bit overcomplicated to me -- what's the use case?"
    • Actively questions complexity and seeks simpler alternatives
  2. Pragmatic Testing (16 instances)

    • Avoids duplicate test coverage
    • Tests real scenarios, not library features
    • "The other file already tests all the scenarios"
  3. Type Safety Without Compromise (7+ instances)

    • Strongly discourages # type: ignore
    • Prefers proper type assertions and annotations
  4. AI-Assisted Development (24 instances!) 🚀

    • Frequently delegates to @OpenHands for implementation
    • Most distinctive pattern observed
    • "opps i forgot this... @OpenHands please implement this"
  5. Backward Compatibility Awareness (2 instances)

    • Evaluates breaking change impact carefully
    • Balances simplification vs user impact
  6. Real Use Case Validation (4 instances)

    • Always asks "what's the use case?"
    • Validates necessity before accepting complexity
  7. Concise Communication (19+ approvals)

    • Casual, friendly tone: "LGTM!", "lgtm!", "WDYT?"
    • Uses emojis: 👀 🤣 🤕

Review Statistics

  • Total PRs Analyzed: 100 recent PRs
  • PRs with Reviews: 37
  • Total Review Comments: 153
  • Most Common Theme: AI Delegation (24 instances)
  • Quick Approvals: 19 instances

Usage

Once merged, the microagent can be triggered with:

/codereview

This will activate the review persona based on the actual patterns observed in this repository.

Comparison to /codereview-roasted

Aspect /codereview /codereview-roasted
Tone Casual, collaborative Critical, direct
Verbosity Concise, often one-liners Detailed analysis
AI Usage Heavy delegation to @OpenHands Review-only
Style Pragmatic, constructive Linus-style, roasted
Focus Practical simplicity Engineering fundamentals

Examples from Real Reviews

Questioning Complexity:

This feels a bit overcomplicated to me -- what's the use case for this 👀

Maybe we can ship the file directly with the SDK so we don't need to make 
this request but rather read local file -- WDYT?

AI Delegation:

@OpenHands please add a test to verify [specific behavior]

Quick Approval:

LGTM!
confirmed working!

Testing

The microagent follows the established structure from OpenHands/OpenHands and can be tested by triggering it with /codereview in any code review context.

Files Changed

  • .openhands/microagents/code-review.md - The microagent itself (7.6K)
  • CODE_REVIEW_SUMMARY.md - Usage guide (4.4K)
  • code_review_analysis.md - Detailed analysis (6.2K)
  • .gitignore - Added exclusion for raw review history file

Ready for review! 🎉

@xingyaoww can click here to continue refining the PR


Agent Server images for this PR

GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server

Variants & Base Images

Variant Architectures Base Image Docs / Tags
java amd64, arm64 eclipse-temurin:17-jdk Link
python amd64, arm64 nikolaik/python-nodejs:python3.12-nodejs22 Link
golang amd64, arm64 golang:1.21-bookworm Link

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:c567680-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-c567680-python \
  ghcr.io/openhands/agent-server:c567680-python

All tags pushed for this build

ghcr.io/openhands/agent-server:c567680-golang-amd64
ghcr.io/openhands/agent-server:c567680-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:c567680-golang-arm64
ghcr.io/openhands/agent-server:c567680-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:c567680-java-amd64
ghcr.io/openhands/agent-server:c567680-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:c567680-java-arm64
ghcr.io/openhands/agent-server:c567680-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:c567680-python-amd64
ghcr.io/openhands/agent-server:c567680-nikolaik_s_python-nodejs_tag_python3.12-nodejs22-amd64
ghcr.io/openhands/agent-server:c567680-python-arm64
ghcr.io/openhands/agent-server:c567680-nikolaik_s_python-nodejs_tag_python3.12-nodejs22-arm64
ghcr.io/openhands/agent-server:c567680-golang
ghcr.io/openhands/agent-server:c567680-java
ghcr.io/openhands/agent-server:c567680-python

About Multi-Architecture Support

  • Each variant tag (e.g., c567680-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., c567680-python-amd64) are also available if needed

- Created /codereview microagent based on analysis of 153 review comments
- Extracted 7 key principles: simplicity, pragmatic testing, type safety,
  AI-assisted development, backward compatibility, use case validation,
  and concise communication
- Includes real examples from actual code reviews
- Follows same structure as codereview-roasted.md reference
- Added analysis documentation and summary

Co-authored-by: openhands <[email protected]>
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