| name | code-review |
| description | Review code changes in Copex for bugs, style issues, and best practices. Use this when reviewing PRs or code changes. |
Code Review Guide for Copex
Review Checklist
Python Style
Client Code (client.py)
CLI Code (cli.py)
Tests
Critical Patterns
Stale Content Bug (MUST CHECK)
When streaming, NEVER use history fallback:
if not received_content:
messages = await session.get_messages()
if not received_content and on_chunk is None:
messages = await session.get_messages()
UI State Priority
When streaming, prefer accumulated UI state:
ui.set_final_content(response.content, response.reasoning)
final_message = ui.state.message if ui.state.message else response.content
ui.set_final_content(final_message, final_reasoning)
Version Sync
Both files must have same version:
pyproject.toml → version = "X.Y.Z"
src/copex/cli.py → __version__ = "X.Y.Z"
Review Format
## Summary
Brief description of changes
## Status
- [ ] Approved
- [ ] Changes Requested
## Critical Issues
- Must-fix problems
## Suggestions
- Nice-to-have improvements
## Positive
- Good patterns used