@navels/neal 0.3.0 → 0.3.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.
Files changed (2) hide show
  1. package/docs/release.md +58 -75
  2. package/package.json +1 -1
package/docs/release.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Release process
2
2
 
3
- Releases are manual, versioned npm operations. Normal CI only verifies pushes
4
- and pull requests. The GitHub Actions `Publish` workflow handles publishing and
5
- runs only through `workflow_dispatch`.
3
+ Releases start from the manual GitHub Actions `Publish` workflow. The workflow
4
+ checks and stages the npm package, waits for a maintainer's npm approval, then
5
+ creates the matching GitHub tag and release.
6
6
 
7
7
  ## Versioning policy
8
8
 
@@ -18,9 +18,9 @@ exit codes, or durable run artifacts require a major version.
18
18
 
19
19
  Examples:
20
20
 
21
- - Patch: `0.1.1` fixes a defect or compatibility issue without intentionally
21
+ - Patch: `0.3.2` fixes a defect or compatibility issue without intentionally
22
22
  changing documented behavior.
23
- - Minor before `1.0.0`: `0.2.0` adds a feature or meaningful behavior change
23
+ - Minor before `1.0.0`: `0.4.0` adds a feature or meaningful behavior change
24
24
  while the public contract is still settling.
25
25
  - Major: `1.0.0` establishes the stable public contract. Later breaking
26
26
  contract changes require `2.0.0`, `3.0.0`, and so on.
@@ -40,105 +40,86 @@ published CLI package:
40
40
 
41
41
  An SDK update should land as a normal dependency pull request that updates both
42
42
  `package.json` and `pnpm-lock.yaml`, runs normal CI, and records any provider
43
- compatibility findings. The resulting neal release should match the user-facing
44
- impact: use a patch release for a compatibility fix that preserves documented
45
- behavior, a minor release for behavior changes before `1.0.0`, and a major
46
- release after `1.0.0` if a documented public contract breaks.
43
+ compatibility findings. Match the neal release to the user-facing impact: use a
44
+ patch release for a compatibility fix that preserves documented behavior, a
45
+ minor release for behavior changes before `1.0.0`, and a major release after
46
+ `1.0.0` if a documented public contract breaks.
47
47
 
48
- ## Local release readiness
48
+ ## Prepare a release
49
49
 
50
- Prepare a release with a normal pull request that changes `package.json.version`
51
- to the intended exact SemVer version:
50
+ Bump `package.json.version` and add a nonempty `## [<version>]` section to
51
+ `CHANGELOG.md` in a normal release-preparation pull request:
52
52
 
53
53
  ```sh
54
54
  pnpm version <version> --no-git-tag-version
55
55
  ```
56
56
 
57
- Run the local release-readiness gates from the repository root:
57
+ Run the release gates from the repository root:
58
58
 
59
59
  ```sh
60
60
  RELEASE_VERSION=<version> RELEASE_DRY_RUN=true pnpm run validate:release
61
61
  pnpm typecheck
62
62
  pnpm test
63
+ pnpm lint
63
64
  pnpm build
64
65
  node scripts/verify-package.mjs
65
66
  ```
66
67
 
67
- `validate:release` checks that the workflow input version matches
68
- `package.json.version`, validates required package metadata, checks npm version
69
- availability, and checks remote `v<version>` tag availability when an `origin`
70
- remote is configured. Package verification confirms the built CLI and packed
71
- tarball.
68
+ `validate:release` checks the package version, required metadata, direct SDK
69
+ pins, changelog section, npm version availability, and remote tag availability.
72
70
 
73
- ## Manual publish workflow
71
+ ## Publish
74
72
 
75
- After the release-preparation pull request is merged and normal CI passes, run
76
- the `Publish` workflow manually from `main` with:
73
+ After the release-preparation pull request is merged and normal CI passes, open
74
+ **Actions > Publish > Run workflow** on `main`.
77
75
 
78
- - `version`: the exact `package.json.version`, without a leading `v`
79
- - `dry_run`: `true`
76
+ Run it first with the exact version and `dry_run: true`. This runs every gate
77
+ and `npm publish --dry-run` without changing npm or GitHub.
80
78
 
81
- The workflow is guarded to `refs/heads/main`, uses the `npm-publish`
82
- environment, grants `contents: read` and `id-token: write`, installs with
83
- `pnpm install --frozen-lockfile`, and runs these gates before any publish step:
79
+ Run it again with `dry_run: false` after reviewing the dry run. The workflow:
84
80
 
85
- ```sh
86
- RELEASE_VERSION=<version> RELEASE_DRY_RUN=<dry_run> pnpm run validate:release
87
- pnpm typecheck
88
- pnpm test
89
- pnpm build
90
- node scripts/verify-package.mjs
91
- ```
81
+ 1. Runs the same release gates.
82
+ 2. Runs `npm stage publish` and writes the stage ID and approval commands to the
83
+ GitHub job summary.
84
+ 3. Waits up to 60 minutes for the package to become public.
85
+ 4. Verifies npm's signed provenance against the workflow's repository, path,
86
+ branch, and exact commit SHA.
87
+ 5. Creates `v<version>` at that commit and a GitHub release from the matching
88
+ changelog section.
92
89
 
93
- Review the dry-run result before any real publish. Run `Publish` again with
94
- `dry_run: false` only when a release-preparation plan has explicitly authorized
95
- the real publish.
90
+ Review the stage with `npm stage view <stage-id>` or
91
+ `npm stage download <stage-id>`. Approve it with 2FA using
92
+ `npm stage approve <stage-id>` or the npmjs.com UI. npm won't publish the
93
+ package until that approval happens.
96
94
 
97
- The real-publish path is **staged**: the workflow runs `npm stage publish`,
98
- which places the version in a staged, not-publicly-available state. A
99
- maintainer then reviews and approves it with 2FA: `npm stage list`,
100
- `npm stage view <stage-id>` / `npm stage download <stage-id>`, and
101
- `npm stage approve <stage-id>` (or the npmjs.com UI). Nothing reaches `latest`
102
- without that human approval, so a compromised workflow cannot ship directly.
95
+ ## Recovery
103
96
 
104
- ## First-publish history
97
+ Rerun `Publish` with the same version and `dry_run: false` after a timeout or a
98
+ partial failure. The workflow checks existing state before taking action:
105
99
 
106
- `0.1.0` was published manually on 2026-07-12 with an interactive 2FA publish
107
- from a maintainer terminal: npm trusted publishing cannot be configured for a
108
- package that has never been published, so the first publish had to
109
- authenticate directly. Every release after `0.1.0` goes through the `Publish`
110
- workflow and the staged flow above.
100
+ - If the npm version isn't public, it stages it and waits for approval.
101
+ - If the npm version is public, it skips staging and verifies its signed
102
+ provenance against the current workflow commit.
103
+ - If the tag or GitHub release already exists at the expected commit, it keeps
104
+ it and finishes successfully.
105
+ - If the npm provenance or tag points to another commit, it stops without
106
+ changing the existing release.
111
107
 
112
- ## Trusted publishing setup
113
-
114
- The publish workflow relies on trusted publishing/OIDC and intentionally has no
115
- npm-token fallback. It grants `id-token: write` for OIDC, keeps repository
116
- contents read-only, uses the `npm-publish` GitHub environment, and runs
117
- `npm stage publish` only on the real-publish path (staged publishing requires
118
- npm >= 11.15.0, so the workflow upgrades npm accordingly).
119
-
120
- The npm-side configuration for `@navels/neal`:
108
+ If the approval wait times out, approve the existing npm stage before rerunning.
109
+ Do not try to stage the same version a second time.
121
110
 
122
- - Publishing access: **Require two-factor authentication and disallow tokens**.
123
- This blocks every traditional token permanently. Trusted publishers are
124
- unaffected because they use OIDC, and staged approvals always require a
125
- maintainer's 2FA.
126
- - Trusted publisher: owner/repo `navels/neal`, workflow filename
127
- `publish.yml`, environment `npm-publish`, allowed action **`npm stage
128
- publish` only** (stage-only, plain `npm publish` is deliberately not
129
- granted).
130
-
131
- ## Release boundaries
111
+ ## Trusted publishing setup
132
112
 
133
- The current workflow checks that the remote `v<version>` tag is available, but
134
- it does not create tags or GitHub releases. Do not promise or perform release
135
- marker creation as part of the current publish workflow. If tags or GitHub
136
- releases are needed after a successful publish, add them in a separate plan with
137
- the required permissions and explicit operator approval.
113
+ The workflow uses npm trusted publishing with no token fallback. The npm trusted
114
+ publisher is configured for owner/repository `navels/neal`, workflow
115
+ `publish.yml`, environment `npm-publish`, and the **`npm stage publish` only**
116
+ permission. Publishing access requires two-factor authentication and disallows
117
+ traditional tokens.
138
118
 
139
- Recovery rule for later real publishes: if `npm publish` succeeds but a later
140
- release-marker step fails in a separate plan, do not rerun the publish blindly.
141
- First confirm the npm version exists, then create only the missing marker.
119
+ The workflow grants `id-token: write` for npm's OpenID Connect authentication
120
+ and `contents: write` for the final tag and GitHub release. The `npm-publish`
121
+ environment accepts only `main`. npm's stage-only permission means the workflow
122
+ can't make a package public without a maintainer's 2FA approval.
142
123
 
143
124
  Official references:
144
125
 
@@ -146,5 +127,7 @@ Official references:
146
127
  <https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/trigger-a-workflow>
147
128
  - npm trusted publishing:
148
129
  <https://docs.npmjs.com/trusted-publishers/>
130
+ - npm staged packages:
131
+ <https://docs.npmjs.com/staged-publishing/>
149
132
  - npm trust command:
150
133
  <https://docs.npmjs.com/cli/v11/commands/npm-trust/>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navels/neal",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "A source-first multi-agent CLI for planning, executing, reviewing, and resuming scoped code changes.",
5
5
  "license": "MIT",
6
6
  "publishConfig": {