Skip to content

Commit 73a1b78

Browse files
authored
Merge pull request #159 from barocss/chore/barodoc-release-gh-required
docs(skills): barodoc-release — require gh for agents
2 parents c01a291 + f8a9d79 commit 73a1b78

1 file changed

Lines changed: 32 additions & 13 deletions

File tree

.cursor/skills/barodoc-release/SKILL.md

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
---
22
name: barodoc-release
3-
description: Barodoc changeset and release workflow. Use when adding a changeset, updating the changelog, preparing a release, or merging the "Version packages" PR. Prefer this skill whenever the user mentions changeset, release, version bump, changelog, or publishing barodoc packages to npm.
3+
description: Barodoc changeset and release workflow. Use when adding a changeset, updating the changelog, preparing a release, or merging the "Version packages" PR. Prefer this skill whenever the user mentions changeset, release, version bump, changelog, or publishing barodoc packages to npm. Agents must use GitHub CLI (gh) for issue, PR, merge, and release-PR monitoring.
44
---
55

66
# Barodoc Changeset & Release
77

88
This skill covers how to add changesets, keep the docs changelog in sync, and complete a release. Linked packages (core, theme-docs, barodoc CLI, plugins) are versioned together.
99

10+
## GitHub CLI (`gh`) — **required for agents**
11+
12+
Automated runs (issue → branch → PR → merge → monitor **chore: release packages** → merge) **must** use **`gh`**. Do not substitute the GitHub web UI for these steps unless a human explicitly opts out.
13+
14+
- **Issue:** `gh issue create`
15+
- **PR:** `gh pr create`, `gh pr view`, `gh pr merge`
16+
- **Monitor:** `gh pr list`, `gh pr checks` (poll until the Version PR exists and is green)
17+
- **Prereq:** `gh auth status` succeeds in the environment running the agent.
18+
1019
## Version bump: prefer patch
1120

1221
- Use **patch** for bug fixes, docs-only changes, and small improvements.
@@ -88,31 +97,41 @@ Details: **.changeset/README.md** and **DEVELOPMENT.md** in the repo.
8897

8998
## End-to-end checklist (issue → changeset → PR → npm)
9099

91-
Use this when **shipping code** that touches **published packages** (`packages/*`, `barodoc` CLI, plugins). Agents can run the same flow with **GitHub CLI** (`gh`).
100+
Use when **shipping code** that touches **published packages** (`packages/*`, `barodoc` CLI, plugins). **Run every GitHub step with `gh`** (see above).
92101

93102
| # | Step | What to do |
94103
|---|------|------------|
95-
| 1 | **Issue** | Create a tracking issue: `gh issue create --title "..." --body "..."`. Reference it in the feature PR body with `Fixes #N` so it closes on merge. |
104+
| 1 | **Issue** | `gh issue create --title "..." --body "..."`. Put `Fixes #N` in the feature PR body (`gh pr create --body` or edit) so the issue closes on merge. |
96105
| 2 | **Changeset** | Add `.changeset/<name>.md` listing each **touched** package and bump type (`patch` unless feature/breaking). |
97106
| 3 | **Site changelog** | Add `docs/src/content/changelog/vX.Y.Z.mdx` using the **next patch** version (see `packages/theme-docs/package.json`). |
98-
| 4 | **Branch & commit** | Feature branch; **one commit or PR** should include code + changeset + changelog together. |
99-
| 5 | **Open & merge PR** | `gh pr create``gh pr merge` into `main` (after CI is green). |
100-
| 6 | **Wait for Version PR** | The **Release** workflow (`changesets/action`) opens a PR titled **`chore: release packages`** (branch often `changeset-release/main`). Poll until it appears: `gh pr list --state open --search "chore: release packages"`. |
101-
| 7 | **Merge release PR** | `gh pr merge <number> --merge`this bumps versions, updates package `CHANGELOG.md` files, and **publishes to npm** (per `.github/workflows/release.yml`). |
107+
| 4 | **Branch & commit** | Feature branch; **one PR** should include code + changeset + changelog together. |
108+
| 5 | **Open & merge PR** | `git push -u origin <branch>``gh pr create --base main --head <branch> --title "..." --body "Fixes #N\n\n..."`wait for checks (`gh pr checks <N>` or poll) → `gh pr merge <N> --merge` (use squash only if repo policy allows; default here is `--merge`). |
109+
| 6 | **Monitor Version PR** | After merge to `main`, **poll** until the release PR exists: e.g. every 10–15s run `gh pr list --state open --search "chore: release packages" --json number,title,url`. Optionally `gh run watch` on the latest **Release** workflow on `main` while waiting. |
110+
| 7 | **Merge release PR** | `gh pr merge <number> --merge` — bumps versions, updates package `CHANGELOG.md` files, **publishes to npm** (`.github/workflows/release.yml`). Confirm with `gh pr view <number> --json state` after merge. |
102111

103112
### When **not** to use changeset / release PR
104113

105114
- **Skill-only**, **plans**, or **docs** that do not ship with a versioned package.
106115
- **Repo/tooling** changes that do not affect `@barodoc/*` or `barodoc` publish artifacts.
107116

108-
In those cases: issue + PR to `main` is enough; **no** `.changeset/` and **no** `vX.Y.Z.mdx` unless the docs site itself should announce something on `/changelog`.
117+
Still use **`gh`** for issue + PR + merge to `main`; only **skip** `.changeset/`, `vX.Y.Z.mdx`, and step 6–7 (no Version PR / npm).
109118

110-
### Optional `gh` snippets
119+
### `gh` commands (reference)
111120

112121
```bash
113-
# List open release PRs
114-
gh pr list --state open --search "chore: release packages"
122+
# Auth (must work before anything else)
123+
gh auth status
124+
125+
# Feature PR
126+
gh pr create --base main --head <branch> --title "..." --body $'Summary\n\nFixes #N'
127+
gh pr checks <PR_NUMBER> # wait until pass
128+
gh pr merge <PR_NUMBER> --merge
129+
130+
# Find and merge Version packages PR (poll until listed)
131+
gh pr list --state open --search "chore: release packages" --json number,title,url
132+
gh pr merge <N> --merge
115133

116-
# Merge release PR (replace N)
117-
gh pr merge N --merge
134+
# Optional: watch the Release workflow on main after pushing
135+
gh run list --workflow=release.yml --limit 1
136+
gh run watch <RUN_ID>
118137
```

0 commit comments

Comments
 (0)