@howarewoo/pi-subagents 0.0.0-stage → 0.1.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.
@@ -0,0 +1,148 @@
1
+ # Release guide
2
+
3
+ Publish deliberate, versioned npm releases. GitHub releases use the matching entry from
4
+ `CHANGELOG.md`; Pi owns installation and updates. Publishing executes no live model calls.
5
+ The repository workflows do not publish on ordinary main-branch pushes.
6
+
7
+ ## Version and compatibility policy
8
+
9
+ - During 0.x, use a patch for compatible fixes and polish, and a minor for new functionality
10
+ or breaking changes. Label breaking changes and explain migration in the changelog.
11
+ - Move to 1.0 when the public tool and configuration contracts are stable. After 1.0,
12
+ use semantic versioning: major for breaking changes, minor for compatible features,
13
+ patch for compatible fixes.
14
+ - Tool arguments, permissions/grants, configuration, commands and artifact formats are
15
+ user-facing contracts. A small implementation change can still require a breaking release.
16
+ - This pipeline publishes stable versions to npm's `latest` channel. Prerelease versions
17
+ are rejected until a separate channel policy is added.
18
+ - The current tested host is Pi 1.5.2. Wildcard host peer dependencies follow Pi's packaging
19
+ requirements; they do not promise compatibility with every Pi version. Keep host development
20
+ dependencies pinned and verify SDK/CLI lifecycle, permission, cancellation/drain and native
21
+ rendering behavior before changing the documented Pi baseline.
22
+ - Never move a release tag, reuse a published version or overwrite retained user artifacts.
23
+
24
+ ## One-time setup
25
+
26
+ A repository owner and an npm package owner must complete these steps. They are not performed
27
+ by the local setup scripts.
28
+
29
+ 1. Confirm your npm account can publish `@howarewoo/pi-subagents` in the `@howarewoo` scope.
30
+ The old unscoped `pi-extended-subagents@0.1.0` is already published; this is a new npm package.
31
+ 2. Enable GitHub Actions for this repository. Create a GitHub environment named `npm`.
32
+ Add a required reviewer if desired, and restrict deployment refs to release tags (`v*`).
33
+ Protect `main` with the two CI matrix checks and restrict creation/deletion of `v*` tags
34
+ to release maintainers using repository rulesets.
35
+ 3. Bootstrap the package with the first manual npm publish below. A trusted publisher is
36
+ normally configured from an existing package's settings, so do not assume the first
37
+ tag-triggered run can create a new npm package without account setup.
38
+ 4. In **`@howarewoo/pi-subagents` → Settings → Trusted publishing**, add GitHub Actions with:
39
+ The old package's trusted publisher does not carry over to the new scoped package.
40
+
41
+ | Field | Value |
42
+ | -------------------- | ----------------------- |
43
+ | Organization or user | `howarewoo` |
44
+ | Repository | `pi-extended-subagents` |
45
+ | Workflow filename | `release.yml` |
46
+ | Environment name | `npm` |
47
+
48
+ Permit direct `npm publish` if npm presents an allowed-actions selector. The workflow uses
49
+ GitHub-hosted runners and `id-token: write`; no `NPM_TOKEN` secret is needed. Use npm
50
+ 11.5.1 or newer for OIDC publishing (the release runner uses Node 24).
51
+
52
+ 5. Follow npm's current validation/expiry rules when creating the trusted publisher; create it
53
+ near the next release. After successful OIDC publication, restrict traditional token-based
54
+ publishing and revoke unused automation tokens. Public GitHub/OIDC publication supplies npm
55
+ provenance automatically.
56
+
57
+ See [npm's trusted publishing documentation](https://docs.npmjs.com/trusted-publishers/) for
58
+ current account requirements and troubleshooting. Do not use `npm whoami` to test OIDC: it does
59
+ not validate trusted publishing permissions.
60
+
61
+ ## Prepare each release
62
+
63
+ 1. Start from current `main`, with no unrelated local changes. Review the changes being released.
64
+ 2. On a release-preparation branch, update the manifest and lockfile without creating a tag:
65
+
66
+ ```sh
67
+ npm version 0.1.1 --no-git-tag-version
68
+ ```
69
+
70
+ Choose the actual next version; `0.1.1` is prepared for the scoped package rename.
71
+ Preserve the existing `v0.1.0` tag and historical changelog entry.
72
+
73
+ 3. Add a nonempty `## [0.1.1]` entry to the root changelog, using the selected version. Include
74
+ changes, migrations, Pi compatibility, and relevant permission/lifecycle changes. Do not
75
+ promise verification that has not run. Keep the README's installation and migration examples
76
+ current.
77
+ 4. Run the local gates:
78
+
79
+ ```sh
80
+ npm ci --ignore-scripts
81
+ npm run check
82
+ npm run release:check
83
+ npm run test:package
84
+ ```
85
+
86
+ Package smoke testing installs only runtime dependencies, without host peers or lifecycle
87
+ scripts, in a disposable directory. It checks the packed manifest, changelog, license,
88
+ production extension load and tool registration, not live-provider reliability.
89
+
90
+ 5. Submit the version/changelog changes as a human-reviewed release PR and merge it after CI.
91
+ These instructions describe maintainer actions; local checks do not commit or publish.
92
+
93
+ CI runs all checks and the package smoke test on Node 22.19.0 and Node 24. It uses pinned Pi
94
+ 1.5.2 development packages, not an implied matrix of all Pi versions.
95
+
96
+ ## First scoped npm publish only
97
+
98
+ After the scoped-package release PR is merged, check out its exact clean commit and run the local gates
99
+ above. Use an npm account with publishing rights and two-factor authentication:
100
+
101
+ ```sh
102
+ npm login
103
+ release_dir="$(mktemp -d)"
104
+ npm pack --pack-destination "$release_dir"
105
+ npm run test:package -- "$release_dir/howarewoo-pi-subagents-0.1.1.tgz"
106
+ npm publish "$release_dir/howarewoo-pi-subagents-0.1.1.tgz" --access public
107
+ ```
108
+
109
+ Inspect the result with `npm view @howarewoo/pi-subagents@0.1.1 version dist.integrity`.
110
+ Keep the tarball until verified, then remove the temporary directory. This interactive bootstrap
111
+ is separate from GitHub OIDC and does not claim GitHub provenance. Configure the trusted publisher
112
+ before pushing the release tag. The workflow accepts an already-published version only when its
113
+ registry SHA-512 integrity matches the newly verified tarball byte for byte.
114
+
115
+ ## Tag and publish
116
+
117
+ From the exact merged release commit (replace the example version as needed):
118
+
119
+ ```sh
120
+ git tag -a v0.1.1 -m "Release v0.1.1"
121
+ git push origin v0.1.1
122
+ ```
123
+
124
+ `release.yml` verifies that the commit belongs to `main`, the tag matches the manifest and
125
+ lockfile versions, and a matching changelog entry exists. It runs all checks, packs once,
126
+ installs/smoke-tests that tarball, publishes the same tarball to npm, then creates the GitHub
127
+ release with the extracted notes. The `npm` environment can require human approval. Releases
128
+ serialize; a later tag does not cancel an active publish.
129
+
130
+ Verify both the npm version/integrity and the GitHub release before announcing it. Test a clean
131
+ Pi install, then `/subagent-profiles`, and confirm the documented update path. No tag, registry publish,
132
+ trusted-publisher setting or fresh installed-package user walkthrough is performed by local CI checks.
133
+
134
+ ## Recover a partial or bad release
135
+
136
+ - **Failed before npm publication:** fix the configuration or external prerequisite, then rerun
137
+ the workflow for the same tag. Do not move the tag to a changed commit.
138
+ - **npm published, GitHub release failed:** rerun the failed workflow, or dispatch **Release**
139
+ on the same existing tag. It skips npm publication only when that version's integrity exactly
140
+ matches the verified tarball. An existing GitHub release is left unchanged. A different integrity
141
+ or a registry error stops the workflow; do not bypass the check.
142
+ - **Published contents are wrong:** prepare a new patch (or appropriate breaking version), with
143
+ clear changelog guidance. Deprecate the affected version with an explanatory npm message if
144
+ needed; do not unpublish as the normal rollback strategy.
145
+ - **User rollback:** let tasks finish, explicitly install the last known-good version, then
146
+ restart Pi. For example, `pi install npm:@howarewoo/pi-subagents@0.1.1` if that is the last known-good release.
147
+ Pinning code does not undo incompatible configuration or data changes; follow release-specific
148
+ migration instructions. Reload and shutdown abort/drain active children rather than migrate them.