AI Code Review

OpenClaw को अपना Senior Engineer बना दो — 7×24 online, हर line को seriously देखता है

Code Review की reality

Review का wait करते हो तो फूल भी सूख जाते हैं

PR भेजा, Senior कहीं और busy है। दो दिन बाद finally Review किया, बस "LGTM" लिख दिया। Either wait बहुत ज़्यादा होता है, या properly देखता ही नहीं है — ऐसे Review का क्या फ़ायदा?

और भी painful चीज़ है कि team में सब की standards अलग हैं। एक को code ठीक लगता है, दूसरे को change करने को कह रहा है। किसकी सुनो? Standards को unified करने के लिए 3 meetings भी define नहीं कर पाते।

OpenClaw: 7×24 online Senior Engineer

Code को OpenClaw को दो, यह industry best practices के हिसाब से line by line review करेगा: security holes, performance bottlenecks, maintainability, edge cases — सब cover होगा।

Queue में wait नहीं करना पड़ता, किसी का mood देखना नहीं पड़ता, "बहुत busy हूँ" का excuse नहीं है। और हर बार review का standard exactly same होता है — फिर "क्या यह issue है या नहीं" इस बारे में group में argue नहीं करना पड़ता।

3 Review Prompts, straight copy कर सकते हो

Security review से design principles तक, जो चाहिए use करो।

Review PR: Security + performance detailed review Golden instruction
Please review following code changes (PR diff), focus करो:

1. Security holes: SQL injection, XSS, CSRF, sensitive info leaks, unsafe deserialization
2. Performance issues: N+1 queries, unnecessary memory allocation, queries without indexes, blocking operations
3. Edge cases: null handling, race conditions, huge data scenarios

हर problem के लिए दे:
- Severity (Critical / Warning / Suggestion)
- Exact location (file + line number)
- Fix suggestion और example code

आखिर में overall rating और merge suggestion दे।
यह perfect है अगर PR को submit करने से पहले खुद pass करना चाहो। Most common security issues को catch कर सकता है। Claude Opus 4.6 use करो, cross-file security risks को बेहतर समझता है।
SOLID Principles compliance check Advanced technique
Please check क्या यह code SOLID principles को follow करता है:

- S (Single Responsibility): क्या यह class/function बहुत सारे काम कर रहा है?
- O (Open/Closed): नई functionality add करने के लिए क्या existing code को modify करना पड़ता है?
- L (Liskov Substitution): क्या subclass parent को safely replace कर सकता है?
- I (Interface Segregation): क्या interface बहुत fat है?
- D (Dependency Inversion): क्या high-level module directly low-level implementation को depend कर रहा है?

हर violated principle के लिए:
1. कहाँ और क्या violate हो रहा है
2. यह problem क्यों है
3. Refactoring plan और code example दे
यह core business logic या infrastructure code के लिए perfect है। Daily CRUD endpoints के लिए ज़रूरी नहीं है।
Database N+1 issue detection Golden instruction
Please analyze निम्नलिखित code में database queries को:

1. सभी N+1 query issues को find करो:
   - Loops में trigger होने वाली queries को mark करो
   - Worst case में कितने queries होंगी, calculate करो
2. Optimization suggestions दे:
   - कौन से JOINs से merge हो सकते हैं
   - कौन से eager loading/preload से optimize हो सकते हैं
   - कौन से caching की ज़रूरत है
3. Optimized code लिख दे
4. Optimization से पहले और बाद में performance difference estimate कर

ORM framework है [तुम्हारा framework, जैसे SQLAlchemy / Prisma / ActiveRecord]।
N+1 सबसे common performance killer है, list page slow हो तो पहले यह check कर। ORM framework name को replace करना मत भूलो।

Code review: OpenClaw vs GitHub Copilot

दोनों code को review कर सकते हैं, लेकिन approach completely अलग है।

OpenClaw
  • पूरी project को context के साथ देख सकता है, cross-file business logic को समझता है
  • Prompt completely customizable है, अपनी team के standards के हिसाब से review करो
  • Models को switch कर सकते हो: simple review के लिए GPT-4o, complex architecture के लिए Opus 4.6
  • Review results को export कर, archive कर, team knowledge base बना सकते हो
VS
GitHub Copilot Code Review
  • GitHub PR interface में integrated है, trigger करना आसान है
  • Review mainly PR diff content को देखता है, cross-file understanding limited है
  • Model fixed है, review rules को customize नहीं कर सकते
  • Chinese comments और variable names को समझने में कभी-कभी issues आते हैं

Real scenario

Startup team: दो backend सब कुछ handle कर रहे हैं
Team में सिर्फ दो backend हैं, mutual review करते हैं तो अक्सर issues miss हो जाते हैं, production में bug निकलते हैं।
OpenClaw approach
PR submit करने से पहले OpenClaw से security + performance review करा लो, obvious issues को filter कर दो, human review को सिर्फ business logic पर focus करने दो। Production accidents 50% कम हुए, review time average 2 दिन से 12 घंटे हो गई।
Pure human approach
दोनों लोग mutual review करते हैं, busy होने पर सिर्फ LGTM कर दिया। Code standards सिर्फ mouth से agreements हैं, नए लोग आते हैं तो फिर से training शुरू।

कुछ practical suggestions

💡 पूरी project को एक बार AI को review के लिए मत दो। Modules के हिसाब से batch करो, हर बार एक specific angle (जैसे security, performance, readability) पर focus करो, results बेहतर आएंगे।
🎯 AI review human review की जगह नहीं है, पहले फिल्टर है। Machine को format और common issues को catch करने दो, human को design और business logic पर focus करने दो।
क्या ये केस आपके काम आया?