Skip to content

Commit 12866b8

Browse files
committed
docs: add agent git/release playbook and clarify github-vs-npm releases
1 parent c7a05e6 commit 12866b8

2 files changed

Lines changed: 109 additions & 1 deletion

File tree

AGENTS.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,76 @@ When in doubt, optimize for: **determinism, recoverability, and clear operator v
144144

145145
---
146146

147+
## Git/GitHub workflow policy (for agents)
148+
149+
### Branching strategy
150+
151+
- `main` is protected and should remain releasable.
152+
- Default to short-lived topic branches from latest `main`:
153+
- `feat/<topic>`
154+
- `fix/<topic>`
155+
- `docs/<topic>`
156+
- `chore/<topic>`
157+
- `refactor/<topic>`
158+
- `test/<topic>`
159+
- Keep one logical change per PR.
160+
161+
### Default command recipe (unless user asks otherwise)
162+
163+
1. Sync and branch:
164+
- `git switch main`
165+
- `git pull --ff-only`
166+
- `git switch -c <type/topic>`
167+
2. Implement changes + run relevant validation.
168+
3. Commit with conventional format:
169+
- `type(scope): short description`
170+
4. Push and open PR:
171+
- `git push -u origin <branch>`
172+
- `gh pr create --fill`
173+
5. Ensure required checks pass (`ci`) and conversations are resolved.
174+
6. Merge via squash and delete branch:
175+
- `gh pr merge --squash --delete-branch`
176+
7. Sync local after merge:
177+
- `git switch main && git pull --ff-only`
178+
179+
### Protection/bypass rule
180+
181+
- Do **not** bypass branch protection or push directly to `main` unless explicitly instructed by the user for an urgent exception.
182+
- If merge is blocked unexpectedly, inspect:
183+
- `gh pr view <n> --json mergeStateStatus,statusCheckRollup`
184+
- `gh pr checks <n>`
185+
- `gh api repos/HenryLach/taskplane/branches/main/protection`
186+
187+
---
188+
189+
## Release strategy (for agents)
190+
191+
- GitHub release and npm publish are related but distinct:
192+
- `npm publish` ships installable package bits.
193+
- GitHub release publishes human-facing release metadata for a tag.
194+
- Keep them aligned: **one version → one tag → one npm publish → one GitHub release**.
195+
196+
### Default release sequence (only when explicitly requested)
197+
198+
1. Ensure `main` is clean and synced; tests/smokes pass.
199+
2. Update `CHANGELOG.md`.
200+
3. Validate package contents:
201+
- `npm pack --dry-run`
202+
4. Bump version and create tag:
203+
- `npm version patch` (or `minor`/`major`)
204+
5. Publish package:
205+
- `npm publish` (or `npm publish --tag beta`)
206+
6. Push commit + tags:
207+
- `git push && git push --tags`
208+
7. Create GitHub release for the same version tag.
209+
8. Verify:
210+
- `npm view taskplane version`
211+
- `gh release view v<version>`
212+
213+
- Never perform publish/release actions unless the user explicitly asks.
214+
215+
---
216+
147217
## Practical dev commands
148218

149219
- Run both extensions locally:

docs/maintainers/release-process.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
This guide covers how to publish a new Taskplane npm release.
44

5+
## GitHub Releases vs npm Publish
6+
7+
These are related, but not the same operation:
8+
9+
- **`npm publish`** uploads installable package artifacts to npm (`npm install taskplane`).
10+
- **GitHub Release** is a repository release record tied to a git tag (`vX.Y.Z`) with notes/assets.
11+
12+
Best practice for Taskplane is to keep them aligned:
13+
14+
- one package version in `package.json`
15+
- one git tag (`vX.Y.Z`)
16+
- one npm publish (`taskplane@X.Y.Z`)
17+
- one GitHub Release (`vX.Y.Z`)
18+
519
## Prerequisites
620

721
- npm publish access for `taskplane`
@@ -90,7 +104,23 @@ git push --tags
90104

91105
---
92106

93-
## 7) Post-release verification
107+
## 7) Create GitHub Release
108+
109+
After tags are pushed, create a GitHub Release for the same tag/version.
110+
111+
Example:
112+
113+
```bash
114+
gh release create v<version> \
115+
--title "v<version>" \
116+
--notes-file CHANGELOG.md
117+
```
118+
119+
Or create it in the GitHub UI and paste release notes from `CHANGELOG.md`.
120+
121+
---
122+
123+
## 8) Post-release verification
94124

95125
Verify published metadata:
96126

@@ -99,6 +129,13 @@ npm view taskplane version
99129
npm view taskplane versions --json
100130
```
101131

132+
Verify GitHub release/tag:
133+
134+
```bash
135+
gh release view v<version>
136+
git tag --list | grep "^v<version>$"
137+
```
138+
102139
Sanity install in scratch project:
103140

104141
```bash
@@ -116,6 +153,7 @@ npx taskplane version
116153
- [ ] `npm pack --dry-run` reviewed
117154
- [ ] Published successfully
118155
- [ ] Tag pushed
156+
- [ ] GitHub release created for the same tag/version
119157
- [ ] Install smoke test passed
120158

121159
---

0 commit comments

Comments
 (0)