| name | .agents/skills/release-teamcopilot-npm |
| description | Release TeamCopilot together with a new OpenCode fork asset update. Use this when the user wants to ship a new TeamCopilot version that consumes fresh opencode-fork GitHub release tarballs. |
Release TeamCopilot
Use this skill when the task is to ship a new TeamCopilot release.
The preferred entry point is now:
npm run release:teamcopilot
There are two release modes:
- Release without any
opencode-fork changes.
- Release with a new
opencode-fork build bundled into TeamCopilot.
Do not invent or bump versions inside this skill unless the user explicitly asks for that.
The TeamCopilot release must stop if package.json and package-lock.json do not match.
For a real release, all OpenCode references must stay on published https://github.com/... tarball URLs. Never leave a file: OpenCode dependency in a release manifest or lockfile.
Mode 1: Release Without OpenCode Fork Changes
Use this when the user is only changing TeamCopilot code and the bundled OpenCode runtime does not need to change.
What this means:
- You do not build or republish
opencode-fork.
- You reuse the already-published GitHub release tarballs that TeamCopilot is pinned to in
src/utils/opencode-release.ts and package.json.
- You only release TeamCopilot itself.
Workflow:
- Read
package.json and confirm the current TeamCopilot name and version.
- Make sure the working tree is suitable for release. Do not hide or discard unrelated user changes.
- Verify the pinned OpenCode release URLs in
src/utils/opencode-release.ts still point to the intended existing release tag.
- Use
npm run release:teamcopilot to refresh the lockfiles, run the checks, and publish the TeamCopilot package when ready.
- If you need to dry-run only, use
npm run release:teamcopilot -- --dry-run.
- If the checks pass and the user wants the real release, publish the TeamCopilot package with npm.
- Create the matching git tag and GitHub release notes for the TeamCopilot release.
Useful commands:
- Check the release version:
node -p "require('./package.json').version"
- Run the TeamCopilot release workflow:
npm run release:teamcopilot
- Run the TeamCopilot release workflow without publishing:
npm run release:teamcopilot -- --dry-run
- Regenerate the root lockfile after dependency edits:
npm install --package-lock-only
- Regenerate the workspace lockfile after dependency edits:
cd src/workspace_files && npm install --package-lock-only
- Run the TeamCopilot test suite:
npm run test
- Run the TeamCopilot build:
npm run build
- Publish the TeamCopilot npm package from the current commit:
npm publish
What to verify:
package.json and package-lock.json versions must match.
- The root lockfile should keep
@opencode-ai/sdk and opencode-ai pointed at the currently pinned GitHub tarball URLs.
src/workspace_files/package-lock.json should keep opencode-ai pointed at the currently pinned GitHub tarball URL.
npm run build must pass before publishing TeamCopilot.
npm run test must pass before publishing TeamCopilot.
- Fresh installs and existing workspace migrations should rely on the launcher cache fallback. Do not recommend manual unpacking of the platform tarball into
node_modules.
Mode 2: Release With OpenCode Fork Changes
Use this when the TeamCopilot release must include a new opencode-fork build.
What this means:
- You rebuild the OpenCode fork first.
- You package the fork into new GitHub release tarballs.
- You update TeamCopilot to point at the new tarball URLs.
- Then you release TeamCopilot.
Workflow:
- Read
package.json and confirm the current TeamCopilot name and version.
- Make sure the working tree is suitable for release. Do not hide or discard unrelated user changes.
- Confirm the OpenCode fork branch is at the intended commit and its version has been rebuilt.
- Build the OpenCode fork packages:
bun run --cwd opencode-fork/packages/sdk/js build
bun run --cwd opencode-fork/packages/opencode build
- Prefer the repo-local release script instead of packing the tarballs by hand:
npm run release:opencode-fork
- optional flags:
npm run release:opencode-fork -- --skip-teamcopilot
npm run release:opencode-fork -- --skip-publish
npm run release:opencode-fork -- --dry-run
- If you are doing the release manually for any reason, pack the release assets from the fork and upload them to the
rishabhpoddar/opencode GitHub release tag used by TeamCopilot.
- Update the TeamCopilot release URL constants in
src/utils/opencode-release.ts if the fork release tag changes.
- Update the root dependencies in
package.json to point at the new GitHub tarball URLs for @opencode-ai/sdk and opencode-ai.
- Update the workspace bootstrap in
src/utils/workspace-sync.ts and the workspace template in src/workspace_files/package.json.
- Regenerate the lockfiles:
npm install --package-lock-only
cd src/workspace_files && npm install --package-lock-only
- Run the normal TeamCopilot verification:
npm run test
npm run build
- If the checks pass and the user wants the real release, publish the TeamCopilot package with npm.
- Create the matching git tag and GitHub release notes for the TeamCopilot release.
Useful commands:
- Build the OpenCode SDK package:
bun run --cwd opencode-fork/packages/sdk/js build
- Build the OpenCode CLI/runtime package:
bun run --cwd opencode-fork/packages/opencode build
- Run the full fork+TeamCopilot release flow:
npm run release:teamcopilot -- --with-opencode-fork
- Run the fork release packaging flow only:
npm run release:opencode-fork
- Run the fork release packaging flow without publishing the GitHub release yet:
npm run release:opencode-fork -- --dry-run
- Regenerate the TeamCopilot root lockfile:
npm install --package-lock-only
- Regenerate the TeamCopilot workspace lockfile:
cd src/workspace_files && npm install --package-lock-only
- Run the TeamCopilot test suite:
npm run test
- Run the TeamCopilot build:
npm run build
- Publish the TeamCopilot npm package from the current commit:
npm publish
What to verify:
package.json and package-lock.json versions must match.
src/utils/opencode-release.ts must point to the intended OpenCode release tag.
@opencode-ai/sdk in the root lockfile should resolve to the GitHub tarball URL.
opencode-ai in the root lockfile should resolve to the GitHub tarball URL.
src/workspace_files/package-lock.json should also resolve opencode-ai from the GitHub tarball URL.
npm run release:teamcopilot -- --with-opencode-fork should create the GitHub release assets and update TeamCopilot in one pass.
npm run release:opencode-fork should still create the GitHub release assets without leaving stale tarballs in the fork checkout.
- A TeamCopilot release should not point at local
file: OpenCode artifacts. If you need to test with a local bundle, keep that outside the release path and never commit it.
npm run build must pass before publishing TeamCopilot.
npm run test must pass before publishing TeamCopilot.
Shared Rules
- Treat the TeamCopilot
package.json version as the source of truth for the TeamCopilot release version.
- Treat the OpenCode fork release tag as the source of truth only when a new fork build is being shipped.
- Prefer
npm run release:teamcopilot over manual lockfile regeneration and manifest updates.
- Stop if
package-lock.json top-level version or packages[""].version does not match package.json.
- Prefer updating
src/utils/opencode-release.ts instead of scattering release URLs through the codebase.
- Do not leave stale npm registry URLs for
@opencode-ai/sdk or opencode-ai in any lockfile or manifest.
- Do not leave local
file: OpenCode URLs in any release manifest or lockfile.
- Do not use the local
opencode-fork checkout as a release artifact path.
- Do not publish if tests fail.
- Do not publish if build fails.
- If the user wants a prerelease tag like
beta, use it for the TeamCopilot npm publish step only.
- After a successful TeamCopilot publish, create a git tag equal to the TeamCopilot version with no prefix.
- Write detailed manual GitHub release notes that summarize the TeamCopilot changes, and include the OpenCode fork update only when mode 2 was used.
Examples
-
Dry run a TeamCopilot-only release:
Use /release-teamcopilot-npm to dry-run the next TeamCopilot release without changing opencode-fork.
-
Publish TeamCopilot after an OpenCode fork update:
Use /release-teamcopilot-npm to publish the current TeamCopilot version with the new OpenCode fork tarballs.
-
Verify the current pinned OpenCode release is still fine for a TeamCopilot-only change:
Use /release-teamcopilot-npm to run the TeamCopilot release checks without rebuilding opencode-fork.
Resources
src/utils/opencode-release.ts: centralized OpenCode fork release URL constants
OPENCODE_UPGRADE_CHECKLIST.md: upgrade checklist for OpenCode and workspace runtime changes
CONTRIBUTING.md: local setup instructions for TeamCopilot and opencode-fork