AI Code Review
OpenClaw को अपना Senior Engineer बना दो — 7×24 online, हर line को seriously देखता है
Code Review की reality
PR भेजा, Senior कहीं और busy है। दो दिन बाद finally Review किया, बस "LGTM" लिख दिया। Either wait बहुत ज़्यादा होता है, या properly देखता ही नहीं है — ऐसे Review का क्या फ़ायदा?
और भी painful चीज़ है कि team में सब की standards अलग हैं। एक को code ठीक लगता है, दूसरे को change करने को कह रहा है। किसकी सुनो? Standards को unified करने के लिए 3 meetings भी define नहीं कर पाते।
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 करो।
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 दे।
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 दे
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]।
Code review: OpenClaw vs GitHub Copilot
दोनों code को review कर सकते हैं, लेकिन approach completely अलग है।
- पूरी 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 बना सकते हो
- GitHub PR interface में integrated है, trigger करना आसान है
- Review mainly PR diff content को देखता है, cross-file understanding limited है
- Model fixed है, review rules को customize नहीं कर सकते
- Chinese comments और variable names को समझने में कभी-कभी issues आते हैं