Self-Review Loop
A self-paced loop for coding agents to iteratively review and improve their pull request quality before submission. The agent acts on the codebase, runs automated checks, inspects results, and refines changes until all quality criteria are met.
Goal
Improve PR quality
How to Run
Execute this loop by repeatedly prompting your coding agent to make changes, run quality checks, and refine its work based on feedback until all checklist items are satisfied.
- 01
Start Loop
Begin by running the kickoff prompt to initiate the self-review process.
- 02
Act
Make necessary changes to your code or PR based on current understanding and context.
- 03
Run Check
Execute the check command to assess code quality, style, and completeness.
- 04
Inspect Results
Analyze the output from the check command to identify issues or areas for improvement.
- 05
Refine or Exit
If issues remain and iterations haven't been exceeded, repeat the loop; otherwise, finalize the PR.
Workflow Steps
- 01
Act on the codebase to implement improvements.
- 02
Run the checklist review command.
- 03
Inspect the results of the review.
- 04
If issues are found and iterations remain, return to Act step; otherwise, exit loop.
Kickoff Prompt
Start the "Self-Review Loop" loop. Goal: Improve PR quality Max iterations: 10 Between iterations run: checklist review Exit when: Checklist complete You are now entering the Self-Review Loop. Your goal is to enhance the quality of your pull request by iterating through changes, checks, and refinements. Begin by examining the current state of the codebase and identifying areas where improvements can be made. Once you've made initial changes, run the 'checklist review' command to evaluate your work. Self-pace this loop. After each iteration, run `checklist review` and evaluate the output, and only continue if the exit condition is not met (Checklist complete). Stop when the exit condition passes or 10 iterations are reached. Give a short status update each pass.
Guardrails
hardcoded- ·Limit iterations to prevent infinite loops.
- ·Avoid introducing external dependencies unless explicitly required.
- ·Focus only on code quality, readability, and correctness aspects.
- ·Do not modify unrelated parts of the codebase.
- ·Maintain consistency with existing codebase style and patterns.
Flow Diagram
Related loops — Review
Review
Address Review Feedback
This loop systematically identifies, analyzes, and resolves unresolved code review comments to improve code quality and ensure all feedback is addressed before merging.
Review
PR Polish Loop
An automated workflow loop that iteratively reviews and improves pull request code quality to achieve merge readiness. This loop focuses on code standards, testing, documentation, and best practices through self-paced agent iterations.
Review
Security Review Resolver
An automated iterative loop that analyzes code for security vulnerabilities, runs security checks, identifies issues, implements fixes, and continues until security approval is achieved. The agent self-paces through act → check → inspect cycles to ensure code meets security standards.