1. Check the working directory status for uncommitted changes.
2. If uncommitted changes exist, check if CHANGELOG.md is updated. If not, auto-generate and update it.
3. Stage all new (untracked) files in the git repository.
4. Evaluate the task difficulty based on the number of changed files and lines of code.
5. Invoke the Task tool to execute linting and codex review with appropriate timeout and reasoning effort.
6. If Codex finds inconsistencies, perform self-correction by fixing the code or updating the CHANGELOG.
7. Return the results of the code review.