A stamp-shaped directory name is not ownership proof: pruneSkillBackups counted and RemoveAll'd any 20260819-120000-shaped entry under ~/.dws/skill-backups, so a user or tool that created such a directory lost its contents once DWS held five backups, and the Go backup path (MkdirAll) adopted a same-named foreign root outright. The PowerShell installers already implemented the correct contract; every other surface now matches it. Go stamps a freshly created root with the exact marker bytes the install scripts write (.dws-skill-backup = "dws skill backup v1") before any payload moves in, claims the root with mkdir so an existing unproven root bumps to a collision suffix instead of being adopted, and prunes only roots whose marker verifies — unmarked or wrongly worded stamp-shaped directories are foreign data, preserved and never counted against the keep limit. The shell installers (install.sh, install-skills.sh, install-event.sh, install-devapp.sh) and the npm installer apply the same rule in their backup collision loops, with roots recorded as created by the running process exempt from marker re-verification so a mid-run marker permission failure still reuses this run's own root and keeps the sibling payload intact. Regression tests cover every surface: pruning an unmarked/wrongly marked stamp-shaped directory alongside marked ones, refusing to adopt a foreign root (payload moves to a suffixed root, foreign data and its nonexistent marker untouched), same-stamp reuse of a proven root, and marker-write failure cleaning the empty fresh root.
Go Bootstrap Scripts
These repo-local entrypoints are the supported shell entrypoints for building, testing, packaging, and policy checks.
make build: build thedwsCLI fromcmdmake test: run every default package returned bygo list ./...make test-plan: verify every default Go package belongs to exactly one CI test shardmake lint: run the repository-wide format check,go vet, and requiredstaticcheckmake format-check: check every tracked or non-ignored untracked repository Go source file withgofmtmake fmt: format every tracked or non-ignored untracked repository Go source filemake policy: reuse the currentdwsbinary and run the complete policy suite (make buildfirst)make package: build all release artifacts locallymake release-pre VERSION=vX.Y.Z-beta.N: validate a prerelease (PUBLISH=1pushes its tag)make release-stable VERSION=vX.Y.Z FROM_BETA=vX.Y.Z-beta.N: validate a stable promotion (PUBLISH=1pushes its tag)
Script groups:
- Root installers:
./scripts/install.sh,./scripts/install.ps1,./scripts/install-skills.sh - Product convenience installers:
./scripts/install-devapp.sh,./scripts/install-devapp.ps1,./scripts/install-event.sh - CI package plan:
./scripts/ci/test-packages.sh - Dev helpers:
./scripts/dev/build.sh,./scripts/dev/lint.sh,./scripts/dev/ci-local.sh,./scripts/dev/run-mock-e2e.sh,./scripts/dev/coverage.sh - Policy checks:
./scripts/policy/check-generated-drift.sh,./scripts/policy/check-command-surface.sh,./scripts/policy/check-command-compatibility.sh --base-ref <main-ref> --stable-ref <latest-GA-tag> --candidate-ref <candidate-sha>,./scripts/policy/check-schema-catalog.sh,./scripts/policy/check-schema-binary.sh,./scripts/policy/check-open-source-assets.sh - Policy runtime files: set
DWS_POLICY_TMPDIRto override the default.worktrees/policy-tmpworkspace - Release entrypoint and contract:
./scripts/release/release.sh,./scripts/release/release-contract.sh; operator guide:docs/releasing.md - Release packaging helpers:
./scripts/release/post-goreleaser.sh,./scripts/release/stage-npm-package.sh,./scripts/release/pack-npm-package.sh,./scripts/release/verify-delivered-stable.sh,./scripts/release/verify-release-artifacts.sh,./scripts/release/verify-github-release-assets.sh,./scripts/release/verify-github-tag-authority.sh,./scripts/release/verify-package-managers.sh,./scripts/release/publish-homebrew-formula.sh