@rtorcato/repo-tooling 3.13.0 → 3.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/skills/ai-issue-loop/SKILL.md +10 -0
- package/skills/npm-publish/SKILL.md +69 -21
package/README.md
CHANGED
|
@@ -175,7 +175,7 @@ ln -sf ../../node_modules/@rtorcato/repo-tooling/tooling/claude/repo-tooling.md
|
|
|
175
175
|
|
|
176
176
|
This repo is also a self-hosted Claude Code marketplace. Install the plugin to
|
|
177
177
|
get three skills — `repo-tooling` (adopt/audit the presets via the CLI),
|
|
178
|
-
`npm-publish` (
|
|
178
|
+
`npm-publish` (never hand-cut a release) and `ai-issue-loop` (the label-driven
|
|
179
179
|
issue → PR pipeline) — in any session:
|
|
180
180
|
|
|
181
181
|
```
|
package/package.json
CHANGED
|
@@ -694,6 +694,16 @@ Then spawn a background implementer agent:
|
|
|
694
694
|
> 3. Read the repo's `CLAUDE.md` and obey it — especially any pre-commit build
|
|
695
695
|
> step or committed build output.
|
|
696
696
|
> 4. Do the work. Conventional Commits within the branch.
|
|
697
|
+
>
|
|
698
|
+
> **Do not run `pnpm install`.** This worktree's `node_modules` is a symlink to
|
|
699
|
+
> the main checkout, so pnpm sees a foreign directory it must purge first and
|
|
700
|
+
> aborts with `ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY`. Dependencies are
|
|
701
|
+
> already present — run tests, lint and build directly. If the work *is* a
|
|
702
|
+
> dependency change, `pnpm install --lockfile-only` updates `pnpm-lock.yaml`
|
|
703
|
+
> without touching `node_modules`. When that leaves a verification step you
|
|
704
|
+
> cannot run, say so in the PR body — name the command you could not run and
|
|
705
|
+
> why — so the reviewer knows CI is the only check on it rather than assuming
|
|
706
|
+
> you ran it.
|
|
697
707
|
> 5. Push and open the PR. The title must be a Conventional Commit — it becomes
|
|
698
708
|
> the squash subject on `main` and, in repos using semantic-release, decides
|
|
699
709
|
> whether a release goes out at all. Body must contain `Closes #<N>`.
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: npm-publish
|
|
3
|
-
description: Use before releasing or publishing any
|
|
3
|
+
description: Use before releasing or publishing any package in a repo set up by @rtorcato/repo-tooling. Triggers on "publish", "cut a release", "bump the version", "tag a release", "npm publish", "how do releases work here". The hard rule — releases are automated by the repo's release tool (semantic-release, Changesets, or Release Please); an agent must NEVER run `npm publish`, `npm version`, or `git tag`, or hand-edit the version in package.json. NOT for the day-to-day tooling audit/fix flow — that's the repo-tooling skill.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# npm-publish
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
A repo set up by `@rtorcato/repo-tooling` releases through **automation on merge to
|
|
9
|
+
`main`** — one of semantic-release, Changesets, or Release Please. Versioning, the
|
|
10
|
+
git tag, the GitHub release, the CHANGELOG, and the npm publish all come from that
|
|
11
|
+
pipeline. There is no manual release step under any of them.
|
|
11
12
|
|
|
12
13
|
## The rule
|
|
13
14
|
|
|
@@ -17,31 +18,78 @@ all derived from the commit history. There is no manual release step.
|
|
|
17
18
|
- `npm version` (or editing `"version"` in `package.json`)
|
|
18
19
|
- `git tag` / pushing tags
|
|
19
20
|
- hand-editing `CHANGELOG.md`
|
|
21
|
+
- merging the "Version Packages" PR (Changesets) or the release PR (Release Please) —
|
|
22
|
+
that merge *is* the publish, so it is the human's release decision, not yours
|
|
20
23
|
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
This holds for all three tools. Only the "what to do instead" differs, so first
|
|
25
|
+
work out which tool the repo uses.
|
|
23
26
|
|
|
24
|
-
##
|
|
27
|
+
## Which release tool is this repo on?
|
|
25
28
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
Check the repo root, in this order — these are the same signals the CLI's
|
|
30
|
+
`doctor` check uses (`usesChangesets` / `checkSemanticRelease` in
|
|
31
|
+
`src/languages/js/checks.ts`):
|
|
32
|
+
|
|
33
|
+
| Signal | Tool |
|
|
34
|
+
|---|---|
|
|
35
|
+
| `.changeset/config.json` exists | **Changesets** |
|
|
36
|
+
| `release-please-config.json` exists | **Release Please** |
|
|
37
|
+
| `.releaserc*` / `release.config.*` exists, or a `"release"` key in `package.json` | **semantic-release** |
|
|
38
|
+
|
|
39
|
+
Or just ask the tooling: `npx @rtorcato/repo-tooling doctor --json` reports the
|
|
40
|
+
`semantic-release` check as ok with a detail naming the tool actually in use.
|
|
41
|
+
|
|
42
|
+
If more than one is configured that's drift, not a choice — stop and flag it.
|
|
43
|
+
|
|
44
|
+
## What to do instead, per tool
|
|
45
|
+
|
|
46
|
+
### semantic-release
|
|
47
|
+
|
|
48
|
+
The bump is derived from the commit history, so the commit type *is* the release
|
|
49
|
+
decision:
|
|
50
|
+
|
|
51
|
+
- `fix:` → patch
|
|
52
|
+
- `feat:` → minor
|
|
53
|
+
- `feat!:` / `BREAKING CHANGE:` → major
|
|
54
|
+
- `chore:` / `docs:` / `refactor:` / `test:` → **no release**
|
|
55
|
+
|
|
56
|
+
To ship a change: give it the right commit type and merge to `main`.
|
|
57
|
+
|
|
58
|
+
### Changesets
|
|
59
|
+
|
|
60
|
+
The bump is declared in a changeset file, **not** inferred from commits. A PR with
|
|
61
|
+
no changeset publishes nothing, silently — so this is a required step, not an
|
|
62
|
+
optional one:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pnpm changeset # pick the packages + bump level, write the summary
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
That writes `.changeset/<name>.md`. Commit it with the change. On merge to `main`
|
|
69
|
+
the release action opens (or updates) a "Version Packages" PR; merging *that* is
|
|
70
|
+
what publishes — so never merge it yourself, leave it for a human. Hand-authoring
|
|
71
|
+
`.changeset/*.md` is fine — it is the one file in this flow you are meant to
|
|
72
|
+
write. `CHANGELOG.md` is still generated; don't touch it.
|
|
73
|
+
|
|
74
|
+
### Release Please
|
|
75
|
+
|
|
76
|
+
Also commit-driven, same Conventional Commit → bump mapping as semantic-release.
|
|
77
|
+
On merge to `main` it opens a release PR that carries the version bump and the
|
|
78
|
+
CHANGELOG entry; merging that PR tags and publishes, so leave that merge to a
|
|
79
|
+
human — never do it yourself. Don't edit `.release-please-manifest.json` by hand.
|
|
34
80
|
|
|
35
81
|
## What an agent should do
|
|
36
82
|
|
|
37
|
-
- To ship a change:
|
|
83
|
+
- To ship a change: right commit type, plus a changeset if the repo is on Changesets.
|
|
38
84
|
- To check the last release: `git tag --sort=-creatordate | head -1`, or the GitHub
|
|
39
|
-
Releases page — don't infer it from `package.json` (that's
|
|
40
|
-
|
|
41
|
-
- If a release seems stuck, inspect the release workflow run
|
|
85
|
+
Releases page — don't infer it from `package.json` (under semantic-release that's
|
|
86
|
+
`0.0.0-development` / a placeholder until CI stamps it).
|
|
87
|
+
- If a release seems stuck, inspect the release workflow run, and check for an open
|
|
88
|
+
release / "Version Packages" PR waiting to be merged — report it, do **not** merge
|
|
89
|
+
it yourself and do **not** publish by hand.
|
|
42
90
|
|
|
43
91
|
## Why
|
|
44
92
|
|
|
45
93
|
Manual publishes skip provenance, the CHANGELOG, and the tag/version invariant the
|
|
46
|
-
|
|
47
|
-
|
|
94
|
+
pipeline maintains, and a stray `npm version` commit derails the next automated bump.
|
|
95
|
+
One automated path per repo keeps releases reproducible and reviewable.
|