You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Codifies the "every vX.Y commit gets a matching tag + release before
the turn ends" rule that's already implicit in the .github/workflows/
release.yml flow, and ships AGENTS-release-check.sh so the rule is
testable in one command.
What changed in AGENTS.md (§ Versioning + releases):
- Made the rule explicit for parallel-session work: when the user
commits in parallel, agents must check at end-of-turn that no
untagged version commit is sitting on main.
- Added a TL;DR pointing at the new check script.
- Clarified that the auto-release workflow does the heavy lifting —
agents only need to tag+push, not run gh release create themselves.
- Added a backfill policy: do NOT retroactively tag v1.10–v1.14
(they predate the workflow + packaging; auto-build would fail).
Explicit user request only.
- Added hot-spot reminders: fetch origin before tagging, wait for the
workflow to finish, don't bump again to "fix" a missing release.
AGENTS-release-check.sh:
- Walks every commit whose subject matches ^v[0-9]+\.[0-9]+(\.[0-9]+)?:
Verifies (a) a tag of the same name exists locally and (b) points
at the same SHA; if gh is available, also (c) verifies the GitHub
release exists. Exits 0 on a clean repo, 1 when anything is missing.
- Quiet by default; -v / --verbose prints OK rows too.
- Pulls origin/refs/tags before checking so a tag pushed but not
fetched doesn't false-positive.
Verified: against the current main, the script correctly reports
v1.10–v1.14 missing (the pre-workflow versions) and v1.15–v1.17
clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: AGENTS.md
+50-13Lines changed: 50 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,44 +4,81 @@ Working rules for agents (Claude, Codex, etc.) editing this repository.
4
4
5
5
## Versioning + releases — non-negotiable
6
6
7
-
**Every push that bumps a version MUST be accompanied by a matching GitHub release.** Pushing a commit titled `v1.X` without a release is a defect.
7
+
**Every commit titled `vX.Y`MUST be tagged and have a matching GitHub release before you end your turn.** Pushing a `v1.X`commit without a tag is a defect; pushing a tag without a release is a defect. This rule applies to any agent (Claude, Codex, etc.) and to the user themselves — when committing in parallel, agents must check at end-of-turn that there's no untagged version commit on `main`.
8
8
9
-
Workflow for any version bump:
9
+
### TL;DR for AI agents
10
+
11
+
Run this at the end of every turn that touched this repo, **before claiming done**:
If anything prints, you have unfinished work. Tag it, push it, verify the release.
24
+
25
+
### The full workflow
26
+
27
+
The repo has `.github/workflows/release.yml` that auto-builds the .deb and publishes a GitHub release on **every `v*` tag push**. So in practice the rule reduces to: **never push a `vX.Y` commit without immediately pushing the matching tag.**
10
28
11
29
1.**Bump in this order:**
12
30
-`README.md` — if a version string appears in the tagline or quick-start
- Any other file with a `v1.X` literal — search with `git grep '^# WORKING VERSION'` and `git grep -F 'v1.'`
31
+
-`bin/tmux-paste-dispatch.sh` header `WORKING VERSION: v1.X — <date>` comment (note: historically not updated past v1.0; safe to leave alone unless the rest of the file is touched)
32
+
- Any other file with a `v1.X` literal — `git grep -F 'v1.'`
15
33
16
34
2.**Commit message format:**
17
35
```
18
36
v1.X: <one-line summary>
19
37
20
38
<multi-paragraph body explaining what changed and why,
21
-
matching the style of v1.10–v1.14 in the existing history>
39
+
matching the style of v1.10–v1.17 in the existing history.>
22
40
23
41
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
24
42
```
25
43
Use `git log --pretty=fuller` to confirm the trailer is preserved.
26
44
27
-
3.**Tag + push:**
45
+
3.**Tag + push — same turn as the commit, never deferred:**
28
46
```bash
29
-
git tag -a v1.X -m "v1.X: <one-line summary>"
30
47
git push origin main
48
+
git tag -a v1.X -m "v1.X: <one-line summary>"<commit-sha>
31
49
git push origin v1.X
32
50
```
51
+
The `<commit-sha>` is explicit so you tag the exact commit you just pushed, not HEAD (HEAD may have moved if the user committed in parallel).
33
52
34
-
4.**Create the GitHub release immediately after pushing:**
53
+
4.**The workflow handles the release.** Confirm with:
54
+
```bash
55
+
gh run watch $(gh run list --workflow=release.yml --limit 1 --json databaseId -q '.[0].databaseId')
56
+
gh release view v1.X
57
+
```
58
+
Workflow runs ~3 minutes (cargo build dominates). If the workflow fails, **investigate before ending the turn** — a failed release isn't optional cleanup, it's part of the bump.
59
+
60
+
5.**If the workflow is absent** (early commits, or the file got deleted), fall back to manual:
The `tail -n +3` skips the title line + blank line so the body is the multi-paragraph description.
41
-
- If this is a **breaking** change, add `--latest=true` and prepend a `### Breaking` block to the notes.
42
-
- If experimental / not ready for general use, add `--prerelease`.
66
+
Add `--prerelease` for experimental builds; add the .deb as an asset arg when you have one built.
67
+
68
+
### Backfill policy
69
+
70
+
If you find untagged version commits in history (`v1.10`–`v1.14` are this case — they predate the .deb workflow), **do not retroactively tag them by default**. Reasons:
71
+
- The workflow doesn't exist on those commits → tag push fails the build job.
72
+
- Their build-deb.sh / Rust workspace may not exist or compile.
73
+
- Auto-generated release notes for ancient tags add noise to the Releases page.
74
+
75
+
If the user explicitly asks for backfill, push tags one-by-one and use `gh release create --notes` manually (no workflow) per tag. Verify each .deb (if any) is correct before moving on.
76
+
77
+
### Hot-spot reminders
43
78
44
-
5.**Verify** with `gh release view v1.X` and `gh release list --limit 5`. The new release MUST appear in the list before considering the bump complete.
79
+
- The user often commits in parallel with the agent. Always `git fetch origin && git log origin/main..HEAD` and `git log HEAD..origin/main` before tagging — your local HEAD may not be the version commit.
80
+
- After `git push origin main` and `git push origin v1.X`, the workflow can take 2–5 minutes. Don't claim done before `gh release view v1.X` succeeds.
81
+
- If the workflow fails for environmental reasons (transient apt fetch failure, runner restart), retry with `gh run rerun`. Don't push a v1.X+1 to "fix" a missing v1.X release.
0 commit comments