Repository navigation
Prefer Homebrew packages with apt fallback - #2
Merged
Merged
Conversation
StreamOfRon
force-pushed
the
package-manager-precedence
branch
from
October 29, 2026 01:53
631b3e8 to
ac2db61
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements docs/superpowers/plans/2026-10-25-package-manager-precedence.md (spec: docs/superpowers/specs/2026-10-25-package-manager-precedence-design.md).
Goal: prefer Homebrew formulae on machines that have both brew and apt; apt fills the gaps; casks only on macOS.
Changes
tasks/package_manager.yml: setsbrew_available/brew_bin/brew_bin_dirby locating brew independently ofansible_facts.pkg_mgr(Linux reports pkg_mgr=apt even with Linuxbrew). Initialises brew list facts when brew is absent.tasks/package_resolve.yml: side-effect-free group resolution — installs*_formulaeplus apt entries promoted where a same-named brew formula exists;brew_apt_equivalentscovers renamed pairs (nodejs/npm→node, kubectl→kubernetes-cli); removal (enabled: false) passes the full apt list.tasks/package_group.yml: formulae → apt fallback → casks (macOS only). All ten group blocks inmain.ymlandai-dev-tools.ymlmigrated to it.ansible_facts.system == "Darwin"as first condition on the cask task.not (brew_available | bool)with sudo gating preserved.prefer_homebrew: truedefault + TUI toggle; ~/.setup-options can force apt.Verification
ansible-playbook --syntax-check: cleantests/test_brew_detection.yml: ok=8 failed=0tests/test_package_precedence.yml: ok=40 failed=0 (8 scenarios)python3 -m unittest tests.test_setup_config: 36 OKpkg_mgr == "homebrew"grep across group/git/krew/list files: no hitsmain.yml --checkruntime pass used to pin down a template recursion fix in the dispatcher