Updates and CI
Update fixed Playstack package versions, reconcile owned output, and generate a review-first scheduled workflow.
Ordinary artifact synchronization and drift checks remain offline. Explicit
package installation with playstack add and version updates with playstack update may invoke the repository's package manager and use its configured
registry authentication. Update pull-request mode also interacts with the
configured Git host. Neither operation makes runtime providers part of an
artifact check.
Preview and apply an update
npx playstack update --dry-run
npx playstack updateThe CLI selects the package manager from the committed packageManager field or repository lockfile. It updates only installed @playstack/* dependencies and keeps their fixed versions aligned.
After the package-manager step, the CLI:
- synchronizes managed Prisma, email, content, and translation artifacts;
- refreshes the configured lint fragment and Skills corpus;
- attempts safe three-way merges for ejected artifacts; and
- reports conflicts without overwriting application-owned files.
Refresh the global CLI from Playstack source
This workflow is for Playstack repository maintainers on POSIX hosts. Run it from
clean, committed Playstack source with workspace dependencies already installed.
Application dependency updates use playstack update as described above.
pnpm run global:install --dry-run
pnpm run global:install
playstack version --jsonThe helper rebuilds the CLI and its native runtime dependency closure, packs
local archives with lifecycle hooks disabled, and refreshes the npm-managed
global installation. It preserves the existing Homebrew/npm command location.
The installed version, source revision, dirty flag and content-derived build ID
must match the fresh build. Selected @playstack/* dependencies come from those
local archives; public third-party dependencies use npm's configured registry
and cache.
--dry-run prints the source, dependency closure and install location without
building, packing or installing. Use --prefix=/absolute/path to select another
reviewed npm prefix, including a disposable test prefix. The helper prints the
verified absolute CLI entry point. If another playstack shadows that entry
point on PATH, fix PATH before using the command.
--allow-dirty is an explicit development-only exception. It preserves
sourceDirty: true; those bytes cannot be reproduced from the revision alone.
The command does not publish to Yalc or package registries, push consumer projects, change registered consumers or refresh other global tools. An install or verification failure exits nonzero, but the global prefix may already have changed. No automatic rollback is attempted; cleanup removes only helper-owned temporary archives.
Open review branches
npx playstack update --prPull-request mode requires a clean tracked worktree and a configured host adapter. It partitions changes by ownership:
| Review branch | Contains |
|---|---|
| Primary | Fixed package versions and package-owned managed output. |
| Ejected merge | Clean application-owned merges, based on the primary branch. |
| Conflict draft | One isolated artifact conflict without committed conflict markers. |
Security manifest flags label the affected review and always disable auto-merge. Clean ejected changes remain human-reviewed because the application owns their behavior.
Automated pull-request updates disable dependency lifecycle/build scripts during
both the frozen bootstrap install and the version update. The generated checkout
does not persist Git credentials, package-manager and ordinary Git processes do
not receive the GitHub mutation token, and separately scoped registry
authentication remains available for package resolution. Before installing
dependencies, the workflow records the runner's Node, selected package manager,
Git, and GitHub CLI executable paths and starts the exact CLI package entry
rather than a shared bin name. The CLI validates those paths, constrains child
command lookup, and removes inherited Git helper/configuration overrides.
Repository write authority is introduced only for those trusted executables, an
isolated hook-bypassed push of the validated commit object, and pull-request
operations run outside the worktree and pinned to the current github.com
repository. Authenticated Git and GitHub CLI calls use isolated configuration.
Ordinary local playstack update retains the repository's normal
package-manager build policy. Tokenless local PR updates preserve existing Git
and GitHub CLI authentication only for the exact trusted mutation calls, not
dependency processes.
Configure scheduled updates
{
"updates": {
"gitHost": "github",
"schedule": "0 9 * * 1",
"requiredCheck": "test",
"autoMerge": false
}
}npx playstack ci initci init emits .github/workflows/playstack-update.yml from the committed policy. It records:
- the weekly cron schedule;
- the existing CI job required before merge; and
- whether eligible managed updates may auto-merge.
An existing workflow is never overwritten unless --force is explicit. The generated workflow runs the same reviewed update command rather than introducing a second update implementation.
Doctor in ordinary CI
Scheduled updates and ordinary drift checks are separate concerns. Add the offline check to the repository's normal verification workflow:
npx playstack doctor --checkInteractive playstack init can offer that edit for an existing GitHub Actions job, but it prints the proposed change and asks independently before writing it.
For ownership behavior during an update, see Ejection and merging.