name: implementation-loop description: Use when the user asks to implement a plan end-to-end, test it, run codex review against the base branch in a loop until no P0/P1 issues remain, and make sure CI/CD is green before finishing.
Do the following in the given order
-
Implement the given plan end-to-end. If there is no plan markdown document for the task which the skill is triggered for, create a
.mdfile in~/scratch-repofor that plan and then proceed with implementation. If context compaction happens, make sure to re-read the plan to stay on track. Finish to completion. If there is a PR open for the implementation plan, do it in the same PR. If there is no PR already, open PR. -
Once you finish implementing, make sure to test it. This will depend on the nature of the problem. If needed, run local smoke tests, spin up dev servers, make requests and such. Try to test as much as possible, without merging. State explicitly what could not be tested locally and what still needs staging or production verification.
-
Push your latest commits before running review so the review is always against the current PR head. Run codex review against the base branch:
codex review --base <branch_name>. Use a 30 minute timeout on the tool call available to the model, not the shelltimeoutprogram. Do this in a loop and address any P0 or P1 issues that come up until there are none left. Ignore issues related to supporting legacy/cutover, unless the plan says so. We do cutover most of the time. -
Check both inline review comments and PR issue comments dropped by Codex on the PR, and address them if they are valid. Ignore them if irrelevant. Ignore stale comments from before the latest commit unless they still apply. Either case, make sure that the comments are replied to and resolved. Make sure to wait 5 minutes if your last commit was recent, because it takes some time for review comment to come.
-
In the final step, make sure that CI/CD is green. Ignore the fails unrelated to your changes, others break stuff sometimes and don't fix it. Make sure whatever changes you did don't break anything. If CI/CD is not fully green, state explicitly which failures are unrelated and why.
-
Once CI/CD is green and you think that the PR is ready to merge, finish and give a summary with the PR link. Include the exact validation commands you ran and their outcomes. Also comment a final report on the PR.
-
Do not merge automatically unless the user explicitly asks.
If this skill is queued many times, treat that as a reminder to make sure the work is fully finished. Once the work is fully finished, you can ignore the repeated instructions. If the work is not finished, continue working.