From 49956a7cd022773bf85198075a0c5ffd6aaf4059 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Thu, 25 Jun 2026 14:08:53 +0200 Subject: [PATCH] docs(agent): close completed issues in wrap prompt --- .pi/prompts/wr.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pi/prompts/wr.md b/.pi/prompts/wr.md index a2e42b2c..8f05bd8f 100644 --- a/.pi/prompts/wr.md +++ b/.pi/prompts/wr.md @@ -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 #` 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 --json state,stateReason,labels`. + - If the issue is open, run `gh issue close --reason completed`. + - If the issue is already closed with any reason other than `COMPLETED`, reopen it first, then close it with `gh issue close --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.