Skip to content

feat(gitgud-ship-issue): status labels for shipped issues - #31

Merged
n-stau merged 8 commits into
developfrom
feat/30-status-labels
Nov 30, 2026
Merged

n-stau merged 8 commits into
developfrom
feat/30-status-labels

Conversation

@n-stau

@n-stau n-stau commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

The review loop now keeps one status label on the issue it ships, so the issue list shows where each one stands: status: in progress (branch exists), status: in review (PR open), status: blocked (loop stopped, needs the user) and status: ready for release (merged into develop, waiting for the go to main). The release clears the status label; closed means done.

Why: without labels you have to open each issue to see whether it is being built, reviewed, stuck or waiting for the release.

Changes

  • skills/gitgud-ship-issue/SKILL.md: new Status labels section (labels, colors, set_status helper), status changes in steps 2, 3.4, 3.5 and 5, Rules allow these labels without an extra yes, description mentions them.
  • skills/gitgud-branch/SKILL.md section 8: the release removes every status label from the issues it closes.
  • README.md: the highlight names the status labels.

Changes checks

  • skills/gitgud-ship-issue/SKILL.md, skills/gitgud-branch/SKILL.md (agent instruction files)

Tested: created the four labels in this repo with the loop's command and switched issue #30 through in review, blocked and in progress with set_status; exactly one status label stayed each time. Removing a label that does not exist in the repo fails, which is why the labels are created first.

Closes #30

🤖 Generated with Claude Code

n-stau and others added 2 commits November 30, 2026 09:07
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l block

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@n-stau n-stau left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review 1 · Claude Opus 5.5 - 5 findings (2 bugs, 1 risk, 2 nits).

  • skills/gitgud-branch/SKILL.md line 128 (outside the diff hunk lines), bug: the label removal runs even when the release did not merge. Fix: guard with state = MERGED.

Comment thread skills/gitgud-ship-issue/SKILL.md Outdated
cd "<main checkout>" # leave the issue worktree before removing it
git worktree remove "../<repo>-<N>" # if a worktree was used: the branch is on GitHub
gh pr merge <N> --squash --delete-branch --body "Closes #<issue>" --match-head-commit "$sha"
set_status "status: ready for release" <issue>

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug: set_status ready for release runs even when gh pr merge fails.

Fix: chain with &&, set blocked on failure.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix 1 · Opus 5.5
Fixed in aae5282 and 670ef5f: the merge sets ready for release only in the success branch of an if/else, blocked otherwise; the release removes the label only when the PR state is MERGED; each set_status means running the Status labels block (idempotent label create + function) in the same call; placeholders are <issue>.

Comment thread skills/gitgud-ship-issue/SKILL.md Outdated
for l in "status: in progress|fbca04|Branch exists, being built" "status: in review|1d76db|PR open, review loop running" "status: blocked|d93f0b|Loop stopped, needs the user" "status: ready for release|0e8a16|Merged into develop, waits for the release to main"; do
IFS='|' read -r name color desc <<<"$l"; gh label create "$name" --color "$color" --description "$desc" --force # creates or updates
done # once per repo, before the first status
set_status() { # set_status "<label>" <issue>: removes the other three, adds this one; functions do not survive between calls, so define it in each call

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

risk: the step blocks call set_status without defining it, though functions do not survive between calls.

Fix: say each set_status means running the Status labels block in the same call.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix 1 · Opus 5.5
Fixed in aae5282 and 670ef5f: the merge sets ready for release only in the success branch of an if/else, blocked otherwise; the release removes the label only when the PR state is MERGED; each set_status means running the Status labels block (idempotent label create + function) in the same call; placeholders are <issue>.

Find it, or write one if none matches, and rewrite unclear text per `gitgud-issue` section 5. Closed issue: ask before reopening or working on it. Still unclear what "done" means after reading the code: ask before implementing.

## 2. Branch

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: step 2 never runs the label creation; on a fresh repo the edit fails.

Fix: run the label block before the first status.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix 1 · Opus 5.5
Fixed in aae5282 and 670ef5f: the merge sets ready for release only in the success branch of an if/else, blocked otherwise; the release removes the label only when the PR state is MERGED; each set_status means running the Status labels block (idempotent label create + function) in the same call; placeholders are <issue>.

@@ -41,8 +62,8 @@ No host subagents: ship them one after another.
1. Read the code the issue touches, implement the smallest change that meets every "Done when" check, add or update tests.
2. Run what CI runs (`gitgud-pr` section 1), plus each "Done when" check you can run.
3. Commit per `gitgud-commit`, push with `git push -u origin HEAD`.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: <N> means the PR number in steps 3-5.

Fix: <issue>.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix 1 · Opus 5.5
Fixed in aae5282 and 670ef5f: the merge sets ready for release only in the success branch of an if/else, blocked otherwise; the release removes the label only when the PR state is MERGED; each set_status means running the Status labels block (idempotent label create + function) in the same call; placeholders are <issue>.

n-stau and others added 2 commits November 30, 2026 09:10
… PR blocked

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…bel colors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@n-stau n-stau left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review 2 · Claude Opus 5.5 - 3 findings (1 risk, 2 nits).

## 5. Merge into develop

Merge only when all of these hold; otherwise do not merge and report:
Merge only when all of these hold; otherwise do not merge, `set_status "status: blocked" <issue>` and report:

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

risk: nothing moves the issue off blocked when the loop resumes.

Fix: one sentence: set the label of the step it resumes at.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix 2 · Opus 5.5
Fixed in 5349e36: resume sentence added; the block comment is at the top of the step 5 snippet and the moved-head stop sets blocked; labels are created only when missing (tested the lookup on this repo).

Comment thread skills/gitgud-ship-issue/SKILL.md Outdated
cd "<main checkout>" # leave the issue worktree before removing it
git worktree remove "../<repo>-<N>" # if a worktree was used: the branch is on GitHub
gh pr merge <N> --squash --delete-branch --body "Closes #<issue>" --match-head-commit "$sha"
# Status labels block first (set_status)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the moved-head stop exits without marking the issue blocked; the block comment sits too late.

Fix: comment at the top, set blocked on the moved-head stop.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix 2 · Opus 5.5
Fixed in 5349e36: resume sentence added; the block comment is at the top of the step 5 snippet and the moved-head stop sets blocked; labels are created only when missing (tested the lookup on this repo).

Comment thread skills/gitgud-ship-issue/SKILL.md Outdated
```bash
for l in "status: in progress|fbca04|Branch exists, being built" "status: in review|1d76db|PR open, review loop running" "status: blocked|d93f0b|Loop stopped, needs the user" "status: ready for release|0e8a16|Merged into develop, waits for the release to main"; do
IFS='|' read -r name color desc <<<"$l"; gh label create "$name" --color "$color" --description "$desc" --force # creates or updates
done # idempotent: removing a label the repo lacks would fail the edit

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: --force on every call resets colors the user changed.

Fix: create only missing labels.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix 2 · Opus 5.5
Fixed in 5349e36: resume sentence added; the block comment is at the top of the step 5 snippet and the moved-head stop sets blocked; labels are created only when missing (tested the lookup on this repo).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@n-stau n-stau left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review 3 · Claude Opus 5.5 - 2 findings (1 risk, 1 nit).

Comment thread skills/gitgud-branch/SKILL.md Outdated
sha=$(gh pr view <N> --json headRefOid -q .headRefOid) # show it with the body: the go covers exactly this commit
gh repo view --json deleteBranchOnMerge -q .deleteBranchOnMerge # true would delete develop on merge: stop and ask
gh pr checks <N> --watch --fail-fast && gh pr merge <N> --merge --match-head-commit "$sha" # merge commit; never squash, never --delete-branch (it would delete develop)
[ "$(gh pr view <N> --json state -q .state)" = MERGED ] && for n in <each issue the release closes>; do gh issue edit "$n" --remove-label "status: ready for release"; done # only after the merge, also a later one by hand; if the repo has that label

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

risk: only ready for release is removed; an issue whose PR was merged by hand after a stop closes with a stale blocked or in review.

Fix: remove all four.

nit: the comment is hard to read and does not say where the issue numbers come from.

Fix: reword it.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix 3 · Opus 5.5
Fixed in 1943a1b: the release removes all four status labels; the comment names the source of the issue numbers and the skip case. PR body updated.

…itive label lookup

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@n-stau n-stau left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review 4 · Claude Opus 5.5 - 3 findings (1 risk, 2 nits).

Comment thread skills/gitgud-branch/SKILL.md Outdated
sha=$(gh pr view <N> --json headRefOid -q .headRefOid) # show it with the body: the go covers exactly this commit
gh repo view --json deleteBranchOnMerge -q .deleteBranchOnMerge # true would delete develop on merge: stop and ask
gh pr checks <N> --watch --fail-fast && gh pr merge <N> --merge --match-head-commit "$sha" # merge commit; never squash, never --delete-branch (it would delete develop)
[ "$(gh pr view <N> --json state -q .state)" = MERGED ] && for n in <each issue the release closes>; do gh issue edit "$n" --remove-label "status: in progress,status: in review,status: blocked,status: ready for release"; done # after the merge (also a later manual one); issues from the "issues it closes" line above; skip if the repo has no status labels (the edit fails)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

risk: the issue list comes from the commit-body grep, which still holds issues switched to Refs #N; they stay open without a status label.

Fix: take the numbers from the release body Closes lines.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix 4 · Opus 5.5
Fixed in 23dd224: issue numbers from the release body's Closes #N lines (tested: Refs lines are skipped), a failed label list prints a message, lookup is case-insensitive (tested).

Comment thread skills/gitgud-ship-issue/SKILL.md Outdated
| `status: ready for release` | `0e8a16` | the PR is merged into `develop` (step 5); the release removes it |

```bash
have=$(gh label list --limit 200 --json name -q '.[].name') || exit 1

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: a failed gh label list exits silently before the merge.

Fix: print a message to report.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix 4 · Opus 5.5
Fixed in 23dd224: issue numbers from the release body's Closes #N lines (tested: Refs lines are skipped), a failed label list prints a message, lookup is case-insensitive (tested).

Comment thread skills/gitgud-ship-issue/SKILL.md Outdated
```bash
have=$(gh label list --limit 200 --json name -q '.[].name') || exit 1
for l in "status: in progress|fbca04|Branch exists, being built" "status: in review|1d76db|PR open, review loop running" "status: blocked|d93f0b|Loop stopped, needs the user" "status: ready for release|0e8a16|Merged into develop, waits for the release to main"; do
IFS='|' read -r name color desc <<<"$l"; grep -qxF "$name" <<<"$have" || gh label create "$name" --color "$color" --description "$desc"

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: label names are case-insensitive on GitHub, grep -qxF is not.

Fix: grep -qixF.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix 4 · Opus 5.5
Fixed in 23dd224: issue numbers from the release body's Closes #N lines (tested: Refs lines are skipped), a failed label list prints a message, lookup is case-insensitive (tested).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@n-stau n-stau left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review 5 · Claude Opus 5.5 - 1 finding (1 risk).

Comment thread skills/gitgud-branch/SKILL.md Outdated
sha=$(gh pr view <N> --json headRefOid -q .headRefOid) # show it with the body: the go covers exactly this commit
gh repo view --json deleteBranchOnMerge -q .deleteBranchOnMerge # true would delete develop on merge: stop and ask
gh pr checks <N> --watch --fail-fast && gh pr merge <N> --merge --match-head-commit "$sha" # merge commit; never squash, never --delete-branch (it would delete develop)
[ "$(gh pr view <N> --json state -q .state)" = MERGED ] && for n in $(grep -oE '^Closes #[0-9]+' /tmp/release.md | tr -dc '0-9\n'); do gh issue edit "$n" --remove-label "status: in progress,status: in review,status: blocked,status: ready for release"; done # after the merge (also a later manual one); issues from the release body's Closes lines; skip if the repo has no status labels (the edit fails)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

risk: /tmp/release.md may be gone or stale for a later manual merge.

Fix: read the Closes lines from the merged PR body.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix 5 · Opus 5.5
Fixed in 37dadbd: the numbers come from gh pr view <N> --json body (tested on PR #25: prints 24).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@n-stau n-stau left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review 6 · Claude Opus 5.5 - 1 finding (1 nit).

Comment thread skills/gitgud-branch/SKILL.md Outdated
sha=$(gh pr view <N> --json headRefOid -q .headRefOid) # show it with the body: the go covers exactly this commit
gh repo view --json deleteBranchOnMerge -q .deleteBranchOnMerge # true would delete develop on merge: stop and ask
gh pr checks <N> --watch --fail-fast && gh pr merge <N> --merge --match-head-commit "$sha" # merge commit; never squash, never --delete-branch (it would delete develop)
[ "$(gh pr view <N> --json state -q .state)" = MERGED ] && for n in $(gh pr view <N> --json body -q .body | grep -oE '^Closes #[0-9]+' | tr -dc '0-9\n'); do gh issue edit "$n" --remove-label "status: in progress,status: in review,status: blocked,status: ready for release"; done # after the merge (also a later manual one); issues from the merged PR body's Closes lines; skip if the repo has no status labels (the edit fails)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: only exact Closes #N at line start matches; Fixes #12, closes #12 or - Closes #12 close the issue but keep the label.

Fix: use the closing-keyword matcher of line 118, anchored with optional list markers.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix 6 · Opus 5.5
Fixed in a86acbe: case-insensitive closing keywords with optional list markers (tested: Closes #22, - fixes #24, resolved: #26 match; Refs #9 and mid-line text do not).

@n-stau n-stau left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review 7 · Claude Opus 5.5 - No findings. Checked: skills/gitgud-ship-issue/SKILL.md, skills/gitgud-branch/SKILL.md

@n-stau
n-stau merged commit 3b2c048 into develop Nov 30, 2026
15 of 16 checks passed
@n-stau
n-stau deleted the feat/30-status-labels branch November 30, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant