Git strategy and workflow for cq development.
cq uses trunk-based development on main.
mainis the only long-lived branch. Every change lands through a short-lived branch and a PR.- Feature branches live for hours to days, not weeks. Target: < 2 days ideal, > 5 days is a smell — split the work.
- Branches are deleted immediately after merge.
Format: {kind}/{slug}
kindis one of:feat,fix,refactor,docs,test,chore,perf,ci.slugis lowercase kebab-case describing the change.
Examples:
feat/gemini-providerfix/oauth-callback-oncerefactor/architecturedocs/readme
Format: type: description
Types: feat, fix, refactor, docs, test, chore, perf, ci
- Keep subjects imperative and specific.
- When useful, lead with the package:
fix: auth — validate URL scheme before browser open. - Avoid
wipandfix stuff.
- Open a PR for every branch into
main. - Squash merge only on
main— one bisect point per reviewed change. - PR title must be the final squash commit subject in conventional-commit form.
- Delete the source branch immediately after merge.
- Self-review: read the diff in the PR view after CI passes before merging.
All checks must pass before merge:
go build ./...
go vet ./...
go test -race -count=1 ./...- All changes should be reviewed, either by a human or an AI agent
- Critical and high severity issues must be resolved before merge
- Security-sensitive changes (auth, keyring, credential handling) require extra scrutiny
cq uses semver starting at v0.1.0. Bump minor for features, patch for fixes.
To release a new version:
- Ensure
mainis green (CI passing). - Tag the commit:
git tag v0.x.y - Push the tag:
git push origin v0.x.y - GitHub Actions runs GoReleaser, which:
- Builds cross-platform binaries (darwin/linux amd64+arm64, windows amd64)
- Creates a GitHub Release with auto-generated changelog
- Opens a PR against
jacobcxdev/homebrew-tapto update the formula
- Merge the Homebrew formula PR.
Homebrew-managed installs should run the proxy via brew services, not cq proxy install.
- Start on first install:
brew services start cq - Restart after upgrades or config changes:
brew services restart cq - Stop the service:
brew services stop cq - Check proxy health with
cq proxy status
The generated formula service runs cq proxy start and writes logs to ~/Library/Logs/cq/proxy.log.
Direct cq proxy install|restart|uninstall LaunchAgent commands remain available for manual macOS workflows, but they are no longer the supported Homebrew path.
The release workflow needs a HOMEBREW_TAP_TOKEN repository secret — a GitHub PAT with repo scope on jacobcxdev/homebrew-tap.