docs(agent): close completed issues in wrap prompt
This commit is contained in:
@@ -25,6 +25,11 @@ Unless I explicitly override something in this request, do the following in orde
|
||||
4. If this task is tied to exactly one GitHub issue, include `closes #<issue>` in the commit message. If it is tied to multiple issues, stop and ask which one to use. If it is not tied to any issue, do not include `closes #` or `fixes #` in the commit message.
|
||||
5. Check the current git branch. If it is not `main`, stop and ask what to do. Do not push from another branch unless I explicitly say so.
|
||||
6. Push the current branch.
|
||||
7. If this task is tied to exactly one GitHub issue, explicitly close that issue with reason `completed` after the push so the issue-close workflows in `.github/` run. This applies to issues only, not PRs.
|
||||
- Inspect `gh issue view <issue> --json state,stateReason,labels`.
|
||||
- If the issue is open, run `gh issue close <issue> --reason completed`.
|
||||
- If the issue is already closed with any reason other than `COMPLETED`, reopen it first, then close it with `gh issue close <issue> --reason completed` so GitHub emits a fresh close event.
|
||||
- If the issue is already closed as `COMPLETED`, leave it closed unless the `inprogress` label is still present; in that case reopen it and close it again with reason `completed`.
|
||||
|
||||
Constraints:
|
||||
- Never stage unrelated files.
|
||||
|
||||
Reference in New Issue
Block a user