This repository uses a risk-based review model with hard CI gates.
The following checks must pass before merge:
format(Go formatting check)test(go vet,go test,go test -race)lint(golangci-lint)coverage(threshold gate inscripts/check_coverage.sh)
Current required thresholds:
- Total coverage:
>= 85% - Critical packages:
>= 90%./cmd./internal/repl./internal/provider./internal/safety./internal/prompt
- Temporary floor:
./internal/setup >= 70%
- High-risk runtime paths are CODEOWNED in
.github/CODEOWNERS. - Enable GitHub branch protection / rulesets with:
- Required status checks (the CI jobs above)
- Require review from Code Owners
This allows low-risk changes (for example docs-only changes) to auto-merge when checks pass, while keeping human review on high-risk paths.
Releases are published via goreleaser + GitHub Actions.
git tag v0.2.0
git push origin v0.2.0Pushing a v* tag triggers .github/workflows/release.yml, which:
- Runs
make validate(same CI gates as PRs) - Builds
afm-bridgeon a macOS arm64 runner (Xcode 26), packages as tarball with SHA256 checksum - Builds cross-platform Go binaries named
sb(darwin/linux, amd64/arm64) - Creates a GitHub release with archives, checksums, and the
afm-bridgetarball - Pushes a Homebrew formula to
hpkotak/homebrew-tap
The build-bridge job (macOS arm64, Xcode 26) produces a tarball and SHA256 that the
release job consumes:
- Tarball name:
afm-bridge_${TAG}_darwin_arm64.tar.gz— placed inextra/byactions/download-artifact - goreleaser picks it up via
release.extra_files: glob: extra/afm-bridge_*.tar.gz - SHA256 is passed as
BRIDGE_SHA256env var → embedded in the Homebrew formula via{{ .Env.BRIDGE_SHA256 }}
Homebrew conditional install: the formula installs afm-bridge only on macOS Apple
Silicon (on_macos { on_arm { ... } }). On Intel macOS and Linux, sb installs without
the bridge — AFM is unavailable on those platforms regardless.
If you change the tarball filename pattern, update both .goreleaser.yml:release.extra_files
and the custom_block URL in the brews config.
- Homebrew:
brew install hpkotak/tap/sb— on macOS Apple Silicon, the formula also installsafm-bridgefor Apple Foundation Models support - GitHub Releases: download from https://github.com/hpkotak/shellbud/releases (includes
afm-bridgetarball for macOS arm64) - From source:
go install github.com/hpkotak/shellbud@latest(binary is namedshellbud; rename tosb). For AFM support, also runmake install-bridge(requires macOS 26+ and Xcode 26)
| Secret | Scope | Purpose |
|---|---|---|
GITHUB_TOKEN |
Automatic in Actions | Upload release assets |
TAP_GITHUB_TOKEN |
Fine-grained PAT: Contents read/write on hpkotak/homebrew-tap |
Push Homebrew formula |
goreleaser is pinned to v2.13.3 in the release workflow. The brews config is deprecated but functional at this version. Do not bump goreleaser without verifying brews support.