Branch handling
If on main, checkout a new branch first.
If on a non-main branch where the existing PR is already merged, the uncommitted changes are likely unrelated to that branch. In this case:
- Checkout main and pull
- Create a new branch with a name describing the uncommitted changes
- Continue with the commit and PR workflow below
Commit and PR workflow
Commit the changes. Use gh cli to check if a PR exists for this branch. If no PR exists, create one with an appropriate title and description. If a PR exists, query its current title and description and update them if the new changes warrant it. Push the changes.
For follow-up edits in this session, continue to commit, push, and update the PR as needed.
CI and review gating
Do not report completion to the user until all required GitHub PR checks pass.
After every push:
- Watch the PR checks with
gh pr checks --watch.
- Wait for all required checks to complete.
- If any test or type-check command fails, inspect logs immediately, fix the issue, commit, push, and repeat this CI loop until checks pass.
- If checks are blocked on AI review bots, wait for bot completion and read all bot reviews before reporting completion.
AI review bot handling:
- Read every new AI review comment on the PR, including multiple reviews from multiple bots.
- Analyze each concern and classify it as valid, partially valid, or not valid.
- For valid or partially valid concerns, apply fixes, commit, push, and restart the CI loop.
- For concerns that are not valid, explain why with concrete technical reasoning when you report status to the user.
1---2name: push3description: Commit and push changes, creating or updating a PR as needed. Use for standard push workflow.4---56## Branch handling78If on main, checkout a new branch first.910If on a non-main branch where the existing PR is already merged, the uncommitted changes are likely unrelated to that branch. In this case:11121. Checkout main and pull132. Create a new branch with a name describing the uncommitted changes143. Continue with the commit and PR workflow below1516## Commit and PR workflow1718Commit the changes. Use gh cli to check if a PR exists for this branch. If no PR exists, create one with an appropriate title and description. If a PR exists, query its current title and description and update them if the new changes warrant it. Push the changes.1920For follow-up edits in this session, continue to commit, push, and update the PR as needed.2122## CI and review gating2324Do not report completion to the user until all required GitHub PR checks pass.2526After every push:27281. Watch the PR checks with `gh pr checks --watch`.292. Wait for all required checks to complete.303. If any test or type-check command fails, inspect logs immediately, fix the issue, commit, push, and repeat this CI loop until checks pass.314. If checks are blocked on AI review bots, wait for bot completion and read all bot reviews before reporting completion.3233AI review bot handling:34351. Read every new AI review comment on the PR, including multiple reviews from multiple bots.362. Analyze each concern and classify it as valid, partially valid, or not valid.373. For valid or partially valid concerns, apply fixes, commit, push, and restart the CI loop.384. For concerns that are not valid, explain why with concrete technical reasoning when you report status to the user.