| name | rein-review |
| description | Use before committing. Self-reviews the current diff for unrelated changes, debug leftovers, test weakening, and scope drift. |
rein-review
Use this after implementation and before committing to review your own diff for problems that verification commands alone will not catch.
Treat every changed line as needing a clear path back to the user's request or to cleanup made necessary by your own change.
When To Use
- Before any commit that touches more than a trivial change
- After a multi-file implementation pass
- When you are about to declare work complete
When Not To Use
- The change is a single-line typo fix with no surrounding edits
- rein-verify has already been run and covers diff review (avoid duplication)
Steps
- Read the full diff (staged and unstaged).
- For every changed file, verify you read it before editing it.
- Check for unrelated changes:
- files modified that are not part of the task
- adjacent code or comments touched without task need
- formatting-only changes in files you did not need to touch
- import reordering or whitespace changes outside the task scope
- Check for debug leftovers:
- console.log, print, debugger statements
- commented-out code that should be removed
- TODO/FIXME comments added without justification
- Check for test and fixture integrity:
- tests removed or weakened without explanation
- assertions loosened (exact match to contains, strict to loose)
- test data changed to make failures disappear
- new tests that only assert the happy path
- Check for scope drift:
- refactors beyond what the task required
- speculative cleanup beyond the request
- new abstractions or helpers for one-time use
- feature additions not in the original scope
- Apply the boundary rule:
- only clean up the mess created by this task unless the user explicitly asked for broader cleanup
- If any issue is found, fix it before committing.
- If all checks pass, state what was reviewed and confirm the diff is clean.
Output
Emit a short review note with:
- files reviewed
- issues found (if any) and how they were resolved
- confirmation that the diff is limited to the task scope
- any caveats or remaining concerns