Public repo. MIT. Changes land through pull requests on the default branch (main). Maintainers with admin can push or merge without a review when they need to; everyone else needs a PR and one approval that is not their own.
GitHub already blocks you from approving your own PR. That is the “not self” rule.
- Read README.md and docs/get-started.md.
- Open an issue for bugs or larger features before a big PR.
- Keep the host OpenCode. Do not add Copilot, an Ink/
squadshell, Aspire, or npm as the primary distribution.
git clone https://github.com/xeaser/squad-opencode.git
cd squad-opencode
go test ./...
go build -o squad-oc ./cmd/squad-ocOr, with Task (go install github.com/go-task/task/v3/cmd/task@latest):
task # list
task test # go test ./...
task build # go build -o squad-oc[.exe]
task ci # local CI gate (fmt/vet/lint/race/build/vuln/actionlint)
task tools # install lint/vuln/actionlint/goreleaser
task release:check # validate .goreleaser.yaml
task release # GoReleaser snapshot into dist/ (no tag, no publish)
task bump TAG=vX.Y.Z # pin Homebrew/Scoop/winget from dist/ (no PR)
task release:tag TAG=vX.Y.Z # annotated tag on main only (no push)
task release:push TAG=vX.Y.Z # push tag; GitHub release workflow publishesDo not edit internal/version/version.go to bump. Do not tag a feature branch.
Requires Go 1.26.6+. CI is go test ./... (no live OpenCode). task ci is the local mirror of .github/workflows/ci.yml. Optional package test TestLiveEnsureAPI stays behind SQUAD_OC_LIVE=1.
- Branch from the default branch:
feat/…orfix/…. - One logical change per PR. Match existing Go style (small packages, table tests, temp dirs).
gofmt,go vet ./..., andgo test ./...must pass. CI also runs race tests on Linux/Windows/macOS, golangci-lint, govulncheck, actionlint, and a build on all three OSes.- Update README / get-started if you add a user-visible command or flag.
- Open a PR. Wait for the
cicheck (lint + test + vuln + build) and one review.
Do not force-push to the default branch. Do not rewrite published tags.
-
Merge the PR to
main. -
Wait for the
cicheck on that merge commit to go green. -
Tag that main commit, not the feature-branch SHA:
git checkout main && git pull git tag -a vX.Y.Z -m "squad-oc vX.Y.Z" git push origin vX.Y.Z
-
The release workflow checks the tag is on
origin/main, waits forci, then GoReleaser publishes. It uses.goreleaser.yamlfromorigin/mainso a config fix can retry the same tag. -
The bump job writes the packaging branch with GraphQL
createCommitOnBranch(one signed commit for every file; do not setauthor/committer).GITHUB_TOKENis a GitHub App token, so GitHub signs it asgithub-actions[bot]. It opens the PR and startsciviaworkflow_dispatch. Approve and squash-merge that PR whenciis green.upgrade --selfalready works from the GitHub Release if the bump is delayed.
If the release job fails before a GitHub Release exists, do not tag the next version. Fix the config on main, then retry the same tag: Actions → release → Run workflow (workflow_dispatch). The job checks out that tag’s code and overlays origin/main’s .goreleaser.yaml.
A newer stable tag is refused while the previous stable tag has no GitHub Release. Only delete a v* tag when no GitHub Release exists for it.
go build (and CI's compile job) report dev. GoReleaser injects the tag into version.Version, so squad-oc version on a release binary matches the tag. Do not edit internal/version/version.go to bump the version.
Do not tag a feature branch. Do not move or delete a published v* tag. After a squash-merge the feature-branch SHA is not on main; tag the squash commit.
Commits on the default branch must be verified (GPG or SSH signing).
# SSH signing (simple)
git config --global gpg.format ssh
git config --global user.signingkey ~/.ssh/id_ed25519.pub
git config --global commit.gpgsign trueAdd the same public key as a signing key in GitHub → Settings → SSH and GPG keys.
Unsigned history already on a feature branch cannot merge unless an admin bypasses the rule. New work should be signed from the first commit.
- Copilot CLI / Copilot SDK
- Interactive Ink/
squadshell - Aspire / .NET dashboard
- npm as the install path
- Secrets, API keys,
.opencode/node_modules
By contributing you agree your work is MIT, same as LICENSE.