{"owner":"Homebrew","repo":"brew","hasSkills":true,"totalSkillsCount":5,"totalTokensCount":2371,"categories":["root-instruction","codex-rule","mcp-config"],"hasMcp":true,"mcpConfig":{"servers":{"Homebrew":{"type":"stdio","command":"brew","args":["mcp-server"]}}},"found":["docs/AGENTS.md",".codex/hooks.json",".vscode/mcp.json",".codex/hooks/brew-lgtm-stop.sh","AGENTS.md"],"skills":{"docs/AGENTS.md":"---\nlast_review_date: \"2026-06-10\"\n---\n\n# Agent Instructions for Homebrew/brew docs\n\nThese instructions apply when working in `docs/`.\n\n## Tooling\n\n- Use the system Homebrew `brew bundle exec ...` workflow from this directory\n  rather than `./bin/brew` for the docs site toolchain.\n- Set `HOMEBREW_NO_AUTO_UPDATE=1` for docs verification commands to match the\n  CI workflow.\n- Install or refresh the docs Ruby environment with\n  `brew bundle exec bundle install`.\n\n## Markdown style\n\n- Write prose with one sentence per line (semantic line breaks) rather than wrapping paragraphs at a fixed column.\n  This keeps diffs small and readable.\n- Format tables so the raw Markdown is readable: pad each column with spaces so the cell borders line up vertically.\n- Use UK spelling and punctuation.\n- Use `licence` for the noun and `license` for the verb.\n  Keep `license` when referring to the exact DSL stanza, command-line option or other interface name.\n- Avoid em-dashes (prefer semicolons, colons and commas) and Oxford commas.\n- Do not use bare URLs; use Markdown links.\n  Internal links must point at the `.md` file (for example `[Bottles](Bottles.md)`), not a `docs.brew.sh` URL.\n- Indent nested unordered lists by 2 spaces.\n\n## Verification\n\nWhen you change docs, run the relevant checks from `.github/workflows/docs.yml`\nand `docs/Rakefile`.\n\nAt a minimum, from `docs/` run:\n\n- `HOMEBREW_NO_AUTO_UPDATE=1 brew bundle exec bundle install`\n- `HOMEBREW_NO_AUTO_UPDATE=1 brew bundle exec bin/jekyll build`\n- `HOMEBREW_NO_AUTO_UPDATE=1 brew bundle exec bundle exec rake lint`\n- `HOMEBREW_NO_AUTO_UPDATE=1 brew bundle exec bundle exec rake test`\n\nAlso run these from the repository root when docs content changes:\n\n- `rg --files docs -0 -g '*.md' -g '!vendor/**' -g '!_site/**' -g '!rubydoc/**' | xargs -0 vale`\n- `HOMEBREW_NO_AUTO_UPDATE=1 brew style docs`\n\n## Notes\n\n- Prefer `brew bundle exec bin/jekyll build` explicitly for site builds.\n- Prefer `brew bundle exec bundle exec rake ...` for Rake tasks so bundled\n  executables such as `mdl` are available to the task.\n- For `Homebrew/brew`, the docs CI also runs\n  `brew generate-man-completions --no-exit-code` before docs checks. Run it\n  when your docs change depends on updated generated manpages or completions.\n",".codex/hooks.json":"{\n  \"hooks\": {\n    \"Stop\": [\n      {\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \".codex/hooks/brew-lgtm-stop.sh\",\n            \"timeout\": 360\n          }\n        ]\n      }\n    ]\n  }\n}\n",".vscode/mcp.json":"{\n  \"servers\": {\n    \"Homebrew\": {\n      \"type\": \"stdio\",\n      \"command\": \"brew\",\n      \"args\": [\n        \"mcp-server\"\n      ]\n    }\n  }\n}\n",".codex/hooks/brew-lgtm-stop.sh":"#!/bin/bash\n\ncd \"$(dirname \"$0\")/../..\" || {\n  printf '%s\\n' '{\"decision\":\"block\",\"reason\":\"Failed to cd to the repository root before running ./bin/brew lgtm.\"}'\n  exit 0\n}\n\nif ./bin/brew lgtm >&2\nthen\n  printf '%s\\n' '{\"continue\":true}'\nelse\n  printf '%s\\n' '{\"decision\":\"block\",\"reason\":\"./bin/brew lgtm failed; review the output above and fix it before stopping.\"}'\nfi\n","AGENTS.md":"# Agent Instructions for Homebrew/brew\n\nMost importantly, run `./bin/brew lgtm` (style checks, type checks and tests) to verify any file edits before prompting for input.\n\nInline any new or existing methods or variables used only once unless they are needed for unit tests or explain magic numbers.\nKeep the diff as small, DRY and YAGNI as possible.\nRe-read relevant files after each prompt and preserve user edits and comments.\nBefore finishing, check your work and point out anything the user may not have considered.\n\nThis is a Ruby repository with Bash scripts for faster execution that provides the `brew` command for the Homebrew package manager.\n\n## Running Commands\n\n- Use `./bin/brew`, never a system `brew` on `PATH`.\n- Never use the system Ruby; it is an incompatible older version. Run Ruby with `./bin/brew ruby -- <args>` to load Homebrew's vendored Ruby and libraries.\n\n## Required Before Each Commit\n\n- `./bin/brew typecheck`: Sorbet type checking. It only runs globally but is fast.\n- `./bin/brew style --fix --changed`: RuboCop linting. Pass files to check them individually, e.g. `./bin/brew style --fix Library/Homebrew/cmd/reinstall.rb`.\n- `./bin/brew tests --online --changed`: RSpec tests. Online tests can be flaky, so ignore failures that pass on a rerun. Pass `--only` for individual files, e.g. `./bin/brew tests --only=cmd/reinstall` runs `Library/Homebrew/test/cmd/reinstall_spec.rb`.\n- `./bin/brew lgtm --online` runs all of the above in one command.\n- The Homebrew MCP Server (`./bin/brew mcp-server`) can also run all of the above.\n\n## Git\n\n- Inspect `git diff` and keep it focused.\n- Never commit to `main`. Branch from `origin/HEAD` with a relevant name without category prefixes such as `fix/` or `chore/`, replacing any autogenerated branch name before its first commit.\n- Amend the existing commit for related fixes and update its message rather than adding a follow-up commit.\n- Use a commit subject under 51 characters without Conventional Commit prefixes such as `feat:`, `fix:` or `chore:`; the `Commit Style` GitHub Actions workflow rejects them. When a body is useful, use a dash list with lines under 73 characters focused on why and wrap filenames, code and identifiers in backticks. Pass multiline messages through `git commit -F` rather than literal `\\n`.\n- Never add `Co-Authored-By` or other AI attribution trailers to commits or pull requests and never GPG-sign agent commits.\n- Fill in the pull request template from `.github/PULL_REQUEST_TEMPLATE.md`; never bypass it with e.g. `gh pr create --fill`.\n\n## Code\n\n- Maintain existing code structure and organisation and document public APIs.\n- Use Sorbet `sig` type signatures and `typed: strict` for new files.\n- Never use `T.must` (enforced by `Sorbet/ForbidTMust`): bind the value to a local and branch on `nil`, use `fetch` or `first(n)` on collections, or raise an exception with a helpful message where `nil` is impossible.\n- Never use `T.unsafe` (enforced by `Sorbet/ForbidTUnsafe`): give DSL parameters `= nil` defaults with nilable types, narrow with `is_a?` or `case`, use `requires_ancestor` for typed modules and `public_send` behind a `respond_to?` guard for duck typing.\n- Avoid `T.cast`, `T.let`, `T.untyped` and `T.anything`: use precise types and APIs that return non-nil values. If a generic top type is unavoidable, use `T.anything` rather than `T.untyped`.\n- Never use `.send`: call methods directly, use `.public_send` only for dynamically-named public methods and make private methods public in tests (enforced by `Homebrew/NoSendInTests`). In tests, read and write state through public `attr_*` accessors rather than `instance_variable_get`/`instance_variable_set` (enforced by `Homebrew/NoInstanceVariableAccessInTests`).\n- Shell out via `HOMEBREW_BREW_FILE` instead of requiring `cmd/` or `dev-cmd` when composing brew commands.\n- Keep `extend/os/*` prepends thin: put the `prepend` in the OS-specific `linux` or `macos` file rather than the shared loader with an inline `if`, and put substantive logic in shared code outside `extend/` so it is tested on all platforms rather than in `:needs_linux` or `:needs_macos` specs.\n- When Bash logic mirrors Ruby logic, keep both in sync with two-way comments naming the matching Ruby and Bash locations and keep matching helper filenames aligned.\n- Use `&>/dev/null` instead of `>/dev/null 2>&1`.\n- Put a comment immediately above each `shellcheck disable` explaining why it is needed.\n- Prefer self-documenting code through strings and variable names to new explanatory comments.\n- Avoid magic numbers; use self-explanatory intermediate variables or constants to make their meaning clear.\n- Use UK spelling and punctuation; avoid em dashes and Oxford commas.\n- Wrap human-written user-facing terminal output at around 80 characters; generated output and code are exempt.\n- Update `docs/` when the behaviour it describes changes.\n\n## Tests\n\n- Write unit tests for new functionality. Try `typed: strict` first and revert to `typed: true` if the errors are not easily fixable; never use `typed: false`.\n- For bug fixes and regressions, use red-green TDD and change the fewest lines needed.\n- When adding or tightening tests, verify them with a red/green cycle using the exact `--only=file:line` target for the example you changed.\n- Use at most one `:integration_test` per command: a fast happy-path test. Add another only for essential core functionality in essential non-developer commands.\n- Use a single `expect` per unit test; combine expectations only in integration tests or when the `before` setup is non-trivial.\n- Formula classes created in specs may be frozen, so stub instances rather than class methods.\n- `Library/Homebrew/test/spec_helper.rb` snapshots and restores `ENV` around every example, so set environment variables directly without `with_env` or manual cleanup.\n\n## Repository Structure\n\n- `bin/brew`: Homebrew's `brew` command main Bash entry point script.\n- `completions/` and `manpages/`: generated shell completions and `man` pages. Don't edit directly; regenerate with `./bin/brew generate-man-completions`.\n- `Library/Homebrew/`: Homebrew's core Ruby (with a little Bash) logic.\n- `Library/Homebrew/bundle/`: Homebrew's `brew bundle` command.\n- `Library/Homebrew/cask/`: Homebrew's Cask classes and DSL.\n- `Library/Homebrew/extend/os/`: Homebrew's OS-specific (i.e. macOS or Linux) class extension logic.\n- `Library/Homebrew/formula.rb`: Homebrew's Formula class and DSL.\n- `docs/`: Documentation for Homebrew users, contributors and maintainers. Consult these for best practices and help.\n- `package/`: Files to generate the macOS `.pkg` file.\n"},"files":{"docs/AGENTS.md":"---\nlast_review_date: \"2026-06-10\"\n---\n\n# Agent Instructions for Homebrew/brew docs\n\nThese instructions apply when working in `docs/`.\n\n## Tooling\n\n- Use the system Homebrew `brew bundle exec ...` workflow from this directory\n  rather than `./bin/brew` for the docs site toolchain.\n- Set `HOMEBREW_NO_AUTO_UPDATE=1` for docs verification commands to match the\n  CI workflow.\n- Install or refresh the docs Ruby environment with\n  `brew bundle exec bundle install`.\n\n## Markdown style\n\n- Write prose with one sentence per line (semantic line breaks) rather than wrapping paragraphs at a fixed column.\n  This keeps diffs small and readable.\n- Format tables so the raw Markdown is readable: pad each column with spaces so the cell borders line up vertically.\n- Use UK spelling and punctuation.\n- Use `licence` for the noun and `license` for the verb.\n  Keep `license` when referring to the exact DSL stanza, command-line option or other interface name.\n- Avoid em-dashes (prefer semicolons, colons and commas) and Oxford commas.\n- Do not use bare URLs; use Markdown links.\n  Internal links must point at the `.md` file (for example `[Bottles](Bottles.md)`), not a `docs.brew.sh` URL.\n- Indent nested unordered lists by 2 spaces.\n\n## Verification\n\nWhen you change docs, run the relevant checks from `.github/workflows/docs.yml`\nand `docs/Rakefile`.\n\nAt a minimum, from `docs/` run:\n\n- `HOMEBREW_NO_AUTO_UPDATE=1 brew bundle exec bundle install`\n- `HOMEBREW_NO_AUTO_UPDATE=1 brew bundle exec bin/jekyll build`\n- `HOMEBREW_NO_AUTO_UPDATE=1 brew bundle exec bundle exec rake lint`\n- `HOMEBREW_NO_AUTO_UPDATE=1 brew bundle exec bundle exec rake test`\n\nAlso run these from the repository root when docs content changes:\n\n- `rg --files docs -0 -g '*.md' -g '!vendor/**' -g '!_site/**' -g '!rubydoc/**' | xargs -0 vale`\n- `HOMEBREW_NO_AUTO_UPDATE=1 brew style docs`\n\n## Notes\n\n- Prefer `brew bundle exec bin/jekyll build` explicitly for site builds.\n- Prefer `brew bundle exec bundle exec rake ...` for Rake tasks so bundled\n  executables such as `mdl` are available to the task.\n- For `Homebrew/brew`, the docs CI also runs\n  `brew generate-man-completions --no-exit-code` before docs checks. Run it\n  when your docs change depends on updated generated manpages or completions.\n",".codex/hooks.json":"{\n  \"hooks\": {\n    \"Stop\": [\n      {\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \".codex/hooks/brew-lgtm-stop.sh\",\n            \"timeout\": 360\n          }\n        ]\n      }\n    ]\n  }\n}\n",".vscode/mcp.json":"{\n  \"servers\": {\n    \"Homebrew\": {\n      \"type\": \"stdio\",\n      \"command\": \"brew\",\n      \"args\": [\n        \"mcp-server\"\n      ]\n    }\n  }\n}\n",".codex/hooks/brew-lgtm-stop.sh":"#!/bin/bash\n\ncd \"$(dirname \"$0\")/../..\" || {\n  printf '%s\\n' '{\"decision\":\"block\",\"reason\":\"Failed to cd to the repository root before running ./bin/brew lgtm.\"}'\n  exit 0\n}\n\nif ./bin/brew lgtm >&2\nthen\n  printf '%s\\n' '{\"continue\":true}'\nelse\n  printf '%s\\n' '{\"decision\":\"block\",\"reason\":\"./bin/brew lgtm failed; review the output above and fix it before stopping.\"}'\nfi\n","AGENTS.md":"# Agent Instructions for Homebrew/brew\n\nMost importantly, run `./bin/brew lgtm` (style checks, type checks and tests) to verify any file edits before prompting for input.\n\nInline any new or existing methods or variables used only once unless they are needed for unit tests or explain magic numbers.\nKeep the diff as small, DRY and YAGNI as possible.\nRe-read relevant files after each prompt and preserve user edits and comments.\nBefore finishing, check your work and point out anything the user may not have considered.\n\nThis is a Ruby repository with Bash scripts for faster execution that provides the `brew` command for the Homebrew package manager.\n\n## Running Commands\n\n- Use `./bin/brew`, never a system `brew` on `PATH`.\n- Never use the system Ruby; it is an incompatible older version. Run Ruby with `./bin/brew ruby -- <args>` to load Homebrew's vendored Ruby and libraries.\n\n## Required Before Each Commit\n\n- `./bin/brew typecheck`: Sorbet type checking. It only runs globally but is fast.\n- `./bin/brew style --fix --changed`: RuboCop linting. Pass files to check them individually, e.g. `./bin/brew style --fix Library/Homebrew/cmd/reinstall.rb`.\n- `./bin/brew tests --online --changed`: RSpec tests. Online tests can be flaky, so ignore failures that pass on a rerun. Pass `--only` for individual files, e.g. `./bin/brew tests --only=cmd/reinstall` runs `Library/Homebrew/test/cmd/reinstall_spec.rb`.\n- `./bin/brew lgtm --online` runs all of the above in one command.\n- The Homebrew MCP Server (`./bin/brew mcp-server`) can also run all of the above.\n\n## Git\n\n- Inspect `git diff` and keep it focused.\n- Never commit to `main`. Branch from `origin/HEAD` with a relevant name without category prefixes such as `fix/` or `chore/`, replacing any autogenerated branch name before its first commit.\n- Amend the existing commit for related fixes and update its message rather than adding a follow-up commit.\n- Use a commit subject under 51 characters without Conventional Commit prefixes such as `feat:`, `fix:` or `chore:`; the `Commit Style` GitHub Actions workflow rejects them. When a body is useful, use a dash list with lines under 73 characters focused on why and wrap filenames, code and identifiers in backticks. Pass multiline messages through `git commit -F` rather than literal `\\n`.\n- Never add `Co-Authored-By` or other AI attribution trailers to commits or pull requests and never GPG-sign agent commits.\n- Fill in the pull request template from `.github/PULL_REQUEST_TEMPLATE.md`; never bypass it with e.g. `gh pr create --fill`.\n\n## Code\n\n- Maintain existing code structure and organisation and document public APIs.\n- Use Sorbet `sig` type signatures and `typed: strict` for new files.\n- Never use `T.must` (enforced by `Sorbet/ForbidTMust`): bind the value to a local and branch on `nil`, use `fetch` or `first(n)` on collections, or raise an exception with a helpful message where `nil` is impossible.\n- Never use `T.unsafe` (enforced by `Sorbet/ForbidTUnsafe`): give DSL parameters `= nil` defaults with nilable types, narrow with `is_a?` or `case`, use `requires_ancestor` for typed modules and `public_send` behind a `respond_to?` guard for duck typing.\n- Avoid `T.cast`, `T.let`, `T.untyped` and `T.anything`: use precise types and APIs that return non-nil values. If a generic top type is unavoidable, use `T.anything` rather than `T.untyped`.\n- Never use `.send`: call methods directly, use `.public_send` only for dynamically-named public methods and make private methods public in tests (enforced by `Homebrew/NoSendInTests`). In tests, read and write state through public `attr_*` accessors rather than `instance_variable_get`/`instance_variable_set` (enforced by `Homebrew/NoInstanceVariableAccessInTests`).\n- Shell out via `HOMEBREW_BREW_FILE` instead of requiring `cmd/` or `dev-cmd` when composing brew commands.\n- Keep `extend/os/*` prepends thin: put the `prepend` in the OS-specific `linux` or `macos` file rather than the shared loader with an inline `if`, and put substantive logic in shared code outside `extend/` so it is tested on all platforms rather than in `:needs_linux` or `:needs_macos` specs.\n- When Bash logic mirrors Ruby logic, keep both in sync with two-way comments naming the matching Ruby and Bash locations and keep matching helper filenames aligned.\n- Use `&>/dev/null` instead of `>/dev/null 2>&1`.\n- Put a comment immediately above each `shellcheck disable` explaining why it is needed.\n- Prefer self-documenting code through strings and variable names to new explanatory comments.\n- Avoid magic numbers; use self-explanatory intermediate variables or constants to make their meaning clear.\n- Use UK spelling and punctuation; avoid em dashes and Oxford commas.\n- Wrap human-written user-facing terminal output at around 80 characters; generated output and code are exempt.\n- Update `docs/` when the behaviour it describes changes.\n\n## Tests\n\n- Write unit tests for new functionality. Try `typed: strict` first and revert to `typed: true` if the errors are not easily fixable; never use `typed: false`.\n- For bug fixes and regressions, use red-green TDD and change the fewest lines needed.\n- When adding or tightening tests, verify them with a red/green cycle using the exact `--only=file:line` target for the example you changed.\n- Use at most one `:integration_test` per command: a fast happy-path test. Add another only for essential core functionality in essential non-developer commands.\n- Use a single `expect` per unit test; combine expectations only in integration tests or when the `before` setup is non-trivial.\n- Formula classes created in specs may be frozen, so stub instances rather than class methods.\n- `Library/Homebrew/test/spec_helper.rb` snapshots and restores `ENV` around every example, so set environment variables directly without `with_env` or manual cleanup.\n\n## Repository Structure\n\n- `bin/brew`: Homebrew's `brew` command main Bash entry point script.\n- `completions/` and `manpages/`: generated shell completions and `man` pages. Don't edit directly; regenerate with `./bin/brew generate-man-completions`.\n- `Library/Homebrew/`: Homebrew's core Ruby (with a little Bash) logic.\n- `Library/Homebrew/bundle/`: Homebrew's `brew bundle` command.\n- `Library/Homebrew/cask/`: Homebrew's Cask classes and DSL.\n- `Library/Homebrew/extend/os/`: Homebrew's OS-specific (i.e. macOS or Linux) class extension logic.\n- `Library/Homebrew/formula.rb`: Homebrew's Formula class and DSL.\n- `docs/`: Documentation for Homebrew users, contributors and maintainers. Consult these for best practices and help.\n- `package/`: Files to generate the macOS `.pkg` file.\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","rawUrl":"https://raw.githubusercontent.com/Homebrew/brew/HEAD/AGENTS.md","title":"AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"# Agent Instructions for Homebrew/brew\n\nMost importantly, run `./bin/brew lgtm` (style checks, type checks and tests) to verify any file edits before prompting for input.\n\nInline any new or existing methods or variables used only once unless they are needed for unit tests or explain magic numbers.\nKeep the diff as small, DRY and YAGNI as possible.\nRe-read relevant files after each prompt and preserve user edits and comments.\nBefore finishing, check your work and point out anything the user may not have considered.\n\nThis is a Ruby repository with Bash scripts for faster execution that provides the `brew` command for the Homebrew package manager.\n\n## Running Commands\n\n- Use `./bin/brew`, never a system `brew` on `PATH`.\n- Never use the system Ruby; it is an incompatible older version. Run Ruby with `./bin/brew ruby -- <args>` to load Homebrew's vendored Ruby and libraries.\n\n## Required Before Each Commit\n\n- `./bin/brew typecheck`: Sorbet type checking. It only runs globally but is fast.\n- `./bin/brew style --fix --changed`: RuboCop linting. Pass files to check them individually, e.g. `./bin/brew style --fix Library/Homebrew/cmd/reinstall.rb`.\n- `./bin/brew tests --online --changed`: RSpec tests. Online tests can be flaky, so ignore failures that pass on a rerun. Pass `--only` for individual files, e.g. `./bin/brew tests --only=cmd/reinstall` runs `Library/Homebrew/test/cmd/reinstall_spec.rb`.\n- `./bin/brew lgtm --online` runs all of the above in one command.\n- The Homebrew MCP Server (`./bin/brew mcp-server`) can also run all of the above.\n\n## Git\n\n- Inspect `git diff` and keep it focused.\n- Never commit to `main`. Branch from `origin/HEAD` with a relevant name without category prefixes such as `fix/` or `chore/`, replacing any autogenerated branch name before its first commit.\n- Amend the existing commit for related fixes and update its message rather than adding a follow-up commit.\n- Use a commit subject under 51 characters without Conventional Commit prefixes such as `feat:`, `fix:` or `chore:`; the `Commit Style` GitHub Actions workflow rejects them. When a body is useful, use a dash list with lines under 73 characters focused on why and wrap filenames, code and identifiers in backticks. Pass multiline messages through `git commit -F` rather than literal `\\n`.\n- Never add `Co-Authored-By` or other AI attribution trailers to commits or pull requests and never GPG-sign agent commits.\n- Fill in the pull request template from `.github/PULL_REQUEST_TEMPLATE.md`; never bypass it with e.g. `gh pr create --fill`.\n\n## Code\n\n- Maintain existing code structure and organisation and document public APIs.\n- Use Sorbet `sig` type signatures and `typed: strict` for new files.\n- Never use `T.must` (enforced by `Sorbet/ForbidTMust`): bind the value to a local and branch on `nil`, use `fetch` or `first(n)` on collections, or raise an exception with a helpful message where `nil` is impossible.\n- Never use `T.unsafe` (enforced by `Sorbet/ForbidTUnsafe`): give DSL parameters `= nil` defaults with nilable types, narrow with `is_a?` or `case`, use `requires_ancestor` for typed modules and `public_send` behind a `respond_to?` guard for duck typing.\n- Avoid `T.cast`, `T.let`, `T.untyped` and `T.anything`: use precise types and APIs that return non-nil values. If a generic top type is unavoidable, use `T.anything` rather than `T.untyped`.\n- Never use `.send`: call methods directly, use `.public_send` only for dynamically-named public methods and make private methods public in tests (enforced by `Homebrew/NoSendInTests`). In tests, read and write state through public `attr_*` accessors rather than `instance_variable_get`/`instance_variable_set` (enforced by `Homebrew/NoInstanceVariableAccessInTests`).\n- Shell out via `HOMEBREW_BREW_FILE` instead of requiring `cmd/` or `dev-cmd` when composing brew commands.\n- Keep `extend/os/*` prepends thin: put the `prepend` in the OS-specific `linux` or `macos` file rather than the shared loader with an inline `if`, and put substantive logic in shared code outside `extend/` so it is tested on all platforms rather than in `:needs_linux` or `:needs_macos` specs.\n- When Bash logic mirrors Ruby logic, keep both in sync with two-way comments naming the matching Ruby and Bash locations and keep matching helper filenames aligned.\n- Use `&>/dev/null` instead of `>/dev/null 2>&1`.\n- Put a comment immediately above each `shellcheck disable` explaining why it is needed.\n- Prefer self-documenting code through strings and variable names to new explanatory comments.\n- Avoid magic numbers; use self-explanatory intermediate variables or constants to make their meaning clear.\n- Use UK spelling and punctuation; avoid em dashes and Oxford commas.\n- Wrap human-written user-facing terminal output at around 80 characters; generated output and code are exempt.\n- Update `docs/` when the behaviour it describes changes.\n\n## Tests\n\n- Write unit tests for new functionality. Try `typed: strict` first and revert to `typed: true` if the errors are not easily fixable; never use `typed: false`.\n- For bug fixes and regressions, use red-green TDD and change the fewest lines needed.\n- When adding or tightening tests, verify them with a red/green cycle using the exact `--only=file:line` target for the example you changed.\n- Use at most one `:integration_test` per command: a fast happy-path test. Add another only for essential core functionality in essential non-developer commands.\n- Use a single `expect` per unit test; combine expectations only in integration tests or when the `before` setup is non-trivial.\n- Formula classes created in specs may be frozen, so stub instances rather than class methods.\n- `Library/Homebrew/test/spec_helper.rb` snapshots and restores `ENV` around every example, so set environment variables directly without `with_env` or manual cleanup.\n\n## Repository Structure\n\n- `bin/brew`: Homebrew's `brew` command main Bash entry point script.\n- `completions/` and `manpages/`: generated shell completions and `man` pages. Don't edit directly; regenerate with `./bin/brew generate-man-completions`.\n- `Library/Homebrew/`: Homebrew's core Ruby (with a little Bash) logic.\n- `Library/Homebrew/bundle/`: Homebrew's `brew bundle` command.\n- `Library/Homebrew/cask/`: Homebrew's Cask classes and DSL.\n- `Library/Homebrew/extend/os/`: Homebrew's OS-specific (i.e. macOS or Linux) class extension logic.\n- `Library/Homebrew/formula.rb`: Homebrew's Formula class and DSL.\n- `docs/`: Documentation for Homebrew users, contributors and maintainers. Consult these for best practices and help.\n- `package/`: Files to generate the macOS `.pkg` file.\n","isInternal":false,"tokens":1582,"sizeBytes":6639},{"name":"AGENTS.md","path":"docs/AGENTS.md","rawUrl":"https://raw.githubusercontent.com/Homebrew/brew/HEAD/docs/AGENTS.md","title":"docs - AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"---\nlast_review_date: \"2026-06-10\"\n---\n\n# Agent Instructions for Homebrew/brew docs\n\nThese instructions apply when working in `docs/`.\n\n## Tooling\n\n- Use the system Homebrew `brew bundle exec ...` workflow from this directory\n  rather than `./bin/brew` for the docs site toolchain.\n- Set `HOMEBREW_NO_AUTO_UPDATE=1` for docs verification commands to match the\n  CI workflow.\n- Install or refresh the docs Ruby environment with\n  `brew bundle exec bundle install`.\n\n## Markdown style\n\n- Write prose with one sentence per line (semantic line breaks) rather than wrapping paragraphs at a fixed column.\n  This keeps diffs small and readable.\n- Format tables so the raw Markdown is readable: pad each column with spaces so the cell borders line up vertically.\n- Use UK spelling and punctuation.\n- Use `licence` for the noun and `license` for the verb.\n  Keep `license` when referring to the exact DSL stanza, command-line option or other interface name.\n- Avoid em-dashes (prefer semicolons, colons and commas) and Oxford commas.\n- Do not use bare URLs; use Markdown links.\n  Internal links must point at the `.md` file (for example `[Bottles](Bottles.md)`), not a `docs.brew.sh` URL.\n- Indent nested unordered lists by 2 spaces.\n\n## Verification\n\nWhen you change docs, run the relevant checks from `.github/workflows/docs.yml`\nand `docs/Rakefile`.\n\nAt a minimum, from `docs/` run:\n\n- `HOMEBREW_NO_AUTO_UPDATE=1 brew bundle exec bundle install`\n- `HOMEBREW_NO_AUTO_UPDATE=1 brew bundle exec bin/jekyll build`\n- `HOMEBREW_NO_AUTO_UPDATE=1 brew bundle exec bundle exec rake lint`\n- `HOMEBREW_NO_AUTO_UPDATE=1 brew bundle exec bundle exec rake test`\n\nAlso run these from the repository root when docs content changes:\n\n- `rg --files docs -0 -g '*.md' -g '!vendor/**' -g '!_site/**' -g '!rubydoc/**' | xargs -0 vale`\n- `HOMEBREW_NO_AUTO_UPDATE=1 brew style docs`\n\n## Notes\n\n- Prefer `brew bundle exec bin/jekyll build` explicitly for site builds.\n- Prefer `brew bundle exec bundle exec rake ...` for Rake tasks so bundled\n  executables such as `mdl` are available to the task.\n- For `Homebrew/brew`, the docs CI also runs\n  `brew generate-man-completions --no-exit-code` before docs checks. Run it\n  when your docs change depends on updated generated manpages or completions.\n","frontmatter":{"last_review_date":"2026-06-10"},"isInternal":false,"tokens":572,"sizeBytes":2267},{"name":"mcp.json","path":".vscode/mcp.json","rawUrl":"https://raw.githubusercontent.com/Homebrew/brew/HEAD/.vscode/mcp.json","title":"Model Context Protocol (MCP) Configuration","category":"mcp-config","format":"json","content":"{\n  \"servers\": {\n    \"Homebrew\": {\n      \"type\": \"stdio\",\n      \"command\": \"brew\",\n      \"args\": [\n        \"mcp-server\"\n      ]\n    }\n  }\n}\n","frontmatter":{"servers":{"Homebrew":{"type":"stdio","command":"brew","args":["mcp-server"]}}},"isInternal":false,"tokens":44,"sizeBytes":140},{"name":"hooks.json","path":".codex/hooks.json","rawUrl":"https://raw.githubusercontent.com/Homebrew/brew/HEAD/.codex/hooks.json","title":"Codex Directive: hooks.json","category":"codex-rule","format":"markdown","content":"{\n  \"hooks\": {\n    \"Stop\": [\n      {\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \".codex/hooks/brew-lgtm-stop.sh\",\n            \"timeout\": 360\n          }\n        ]\n      }\n    ]\n  }\n}\n","frontmatter":{"hooks":{"Stop":[{"hooks":[{"type":"command","command":".codex/hooks/brew-lgtm-stop.sh","timeout":360}]}]}},"isInternal":false,"tokens":61,"sizeBytes":225},{"name":"brew-lgtm-stop.sh","path":".codex/hooks/brew-lgtm-stop.sh","rawUrl":"https://raw.githubusercontent.com/Homebrew/brew/HEAD/.codex/hooks/brew-lgtm-stop.sh","title":"Codex Directive: brew-lgtm-stop.sh","category":"codex-rule","format":"markdown","content":"#!/bin/bash\n\ncd \"$(dirname \"$0\")/../..\" || {\n  printf '%s\\n' '{\"decision\":\"block\",\"reason\":\"Failed to cd to the repository root before running ./bin/brew lgtm.\"}'\n  exit 0\n}\n\nif ./bin/brew lgtm >&2\nthen\n  printf '%s\\n' '{\"continue\":true}'\nelse\n  printf '%s\\n' '{\"decision\":\"block\",\"reason\":\"./bin/brew lgtm failed; review the output above and fix it before stopping.\"}'\nfi\n","isInternal":false,"tokens":112,"sizeBytes":373}],"systemPromptSnippet":"<yakaai_skills repo=\"Homebrew/brew\">\n<!-- File: AGENTS.md (Tokens: ~1582 | Category: root-instruction) -->\n# Agent Instructions for Homebrew/brew\n\nMost importantly, run `./bin/brew lgtm` (style checks, type checks and tests) to verify any file edits before prompting for input.\n\nInline any new or existing methods or variables used only once unless they are needed for unit tests or explain magic numbers.\nKeep the diff as small, DRY and YAGNI as possible.\nRe-read relevant files after each prompt and preserve user edits and comments.\nBefore finishing, check your work and point out anything the user may not have considered.\n\nThis is a Ruby repository with Bash scripts for faster execution that provides the `brew` command for the Homebrew package manager.\n\n## Running Commands\n\n- Use `./bin/brew`, never a system `brew` on `PATH`.\n- Never use the system Ruby; it is an incompatible older version. Run Ruby with `./bin/brew ruby -- <args>` to load Homebrew's vendored Ruby and libraries.\n\n## Required Before Each Commit\n\n- `./bin/brew typecheck`: Sorbet type checking. It only runs globally but is fast.\n- `./bin/brew style --fix --changed`: RuboCop linting. Pass files to check them individually, e.g. `./bin/brew style --fix Library/Homebrew/cmd/reinstall.rb`.\n- `./bin/brew tests --online --changed`: RSpec tests. Online tests can be flaky, so ignore failures that pass on a rerun. Pass `--only` for individual files, e.g. `./bin/brew tests --only=cmd/reinstall` runs `Library/Homebrew/test/cmd/reinstall_spec.rb`.\n- `./bin/brew lgtm --online` runs all of the above in one command.\n- The Homebrew MCP Server (`./bin/brew mcp-server`) can also run all of the above.\n\n## Git\n\n- Inspect `git diff` and keep it focused.\n- Never commit to `main`. Branch from `origin/HEAD` with a relevant name without category prefixes such as `fix/` or `chore/`, replacing any autogenerated branch name before its first commit.\n- Amend the existing commit for related fixes and update its message rather than adding a follow-up commit.\n- Use a commit subject under 51 characters without Conventional Commit prefixes such as `feat:`, `fix:` or `chore:`; the `Commit Style` GitHub Actions workflow rejects them. When a body is useful, use a dash list with lines under 73 characters focused on why and wrap filenames, code and identifiers in backticks. Pass multiline messages through `git commit -F` rather than literal `\\n`.\n- Never add `Co-Authored-By` or other AI attribution trailers to commits or pull requests and never GPG-sign agent commits.\n- Fill in the pull request template from `.github/PULL_REQUEST_TEMPLATE.md`; never bypass it with e.g. `gh pr create --fill`.\n\n## Code\n\n- Maintain existing code structure and organisation and document public APIs.\n- Use Sorbet `sig` type signatures and `typed: strict` for new files.\n- Never use `T.must` (enforced by `Sorbet/ForbidTMust`): bind the value to a local and branch on `nil`, use `fetch` or `first(n)` on collections, or raise an exception with a helpful message where `nil` is impossible.\n- Never use `T.unsafe` (enforced by `Sorbet/ForbidTUnsafe`): give DSL parameters `= nil` defaults with nilable types, narrow with `is_a?` or `case`, use `requires_ancestor` for typed modules and `public_send` behind a `respond_to?` guard for duck typing.\n- Avoid `T.cast`, `T.let`, `T.untyped` and `T.anything`: use precise types and APIs that return non-nil values. If a generic top type is unavoidable, use `T.anything` rather than `T.untyped`.\n- Never use `.send`: call methods directly, use `.public_send` only for dynamically-named public methods and make private methods public in tests (enforced by `Homebrew/NoSendInTests`). In tests, read and write state through public `attr_*` accessors rather than `instance_variable_get`/`instance_variable_set` (enforced by `Homebrew/NoInstanceVariableAccessInTests`).\n- Shell out via `HOMEBREW_BREW_FILE` instead of requiring `cmd/` or `dev-cmd` when composing brew commands.\n- Keep `extend/os/*` prepends thin: put the `prepend` in the OS-specific `linux` or `macos` file rather than the shared loader with an inline `if`, and put substantive logic in shared code outside `extend/` so it is tested on all platforms rather than in `:needs_linux` or `:needs_macos` specs.\n- When Bash logic mirrors Ruby logic, keep both in sync with two-way comments naming the matching Ruby and Bash locations and keep matching helper filenames aligned.\n- Use `&>/dev/null` instead of `>/dev/null 2>&1`.\n- Put a comment immediately above each `shellcheck disable` explaining why it is needed.\n- Prefer self-documenting code through strings and variable names to new explanatory comments.\n- Avoid magic numbers; use self-explanatory intermediate variables or constants to make their meaning clear.\n- Use UK spelling and punctuation; avoid em dashes and Oxford commas.\n- Wrap human-written user-facing terminal output at around 80 characters; generated output and code are exempt.\n- Update `docs/` when the behaviour it describes changes.\n\n## Tests\n\n- Write unit tests for new functionality. Try `typed: strict` first and revert to `typed: true` if the errors are not easily fixable; never use `typed: false`.\n- For bug fixes and regressions, use red-green TDD and change the fewest lines needed.\n- When adding or tightening tests, verify them with a red/green cycle using the exact `--only=file:line` target for the example you changed.\n- Use at most one `:integration_test` per command: a fast happy-path test. Add another only for essential core functionality in essential non-developer commands.\n- Use a single `expect` per unit test; combine expectations only in integration tests or when the `before` setup is non-trivial.\n- Formula classes created in specs may be frozen, so stub instances rather than class methods.\n- `Library/Homebrew/test/spec_helper.rb` snapshots and restores `ENV` around every example, so set environment variables directly without `with_env` or manual cleanup.\n\n## Repository Structure\n\n- `bin/brew`: Homebrew's `brew` command main Bash entry point script.\n- `completions/` and `manpages/`: generated shell completions and `man` pages. Don't edit directly; regenerate with `./bin/brew generate-man-completions`.\n- `Library/Homebrew/`: Homebrew's core Ruby (with a little Bash) logic.\n- `Library/Homebrew/bundle/`: Homebrew's `brew bundle` command.\n- `Library/Homebrew/cask/`: Homebrew's Cask classes and DSL.\n- `Library/Homebrew/extend/os/`: Homebrew's OS-specific (i.e. macOS or Linux) class extension logic.\n- `Library/Homebrew/formula.rb`: Homebrew's Formula class and DSL.\n- `docs/`: Documentation for Homebrew users, contributors and maintainers. Consult these for best practices and help.\n- `package/`: Files to generate the macOS `.pkg` file.\n\n<!-- File: docs/AGENTS.md (Tokens: ~572 | Category: root-instruction) -->\n---\nlast_review_date: \"2026-06-10\"\n---\n\n# Agent Instructions for Homebrew/brew docs\n\nThese instructions apply when working in `docs/`.\n\n## Tooling\n\n- Use the system Homebrew `brew bundle exec ...` workflow from this directory\n  rather than `./bin/brew` for the docs site toolchain.\n- Set `HOMEBREW_NO_AUTO_UPDATE=1` for docs verification commands to match the\n  CI workflow.\n- Install or refresh the docs Ruby environment with\n  `brew bundle exec bundle install`.\n\n## Markdown style\n\n- Write prose with one sentence per line (semantic line breaks) rather than wrapping paragraphs at a fixed column.\n  This keeps diffs small and readable.\n- Format tables so the raw Markdown is readable: pad each column with spaces so the cell borders line up vertically.\n- Use UK spelling and punctuation.\n- Use `licence` for the noun and `license` for the verb.\n  Keep `license` when referring to the exact DSL stanza, command-line option or other interface name.\n- Avoid em-dashes (prefer semicolons, colons and commas) and Oxford commas.\n- Do not use bare URLs; use Markdown links.\n  Internal links must point at the `.md` file (for example `[Bottles](Bottles.md)`), not a `docs.brew.sh` URL.\n- Indent nested unordered lists by 2 spaces.\n\n## Verification\n\nWhen you change docs, run the relevant checks from `.github/workflows/docs.yml`\nand `docs/Rakefile`.\n\nAt a minimum, from `docs/` run:\n\n- `HOMEBREW_NO_AUTO_UPDATE=1 brew bundle exec bundle install`\n- `HOMEBREW_NO_AUTO_UPDATE=1 brew bundle exec bin/jekyll build`\n- `HOMEBREW_NO_AUTO_UPDATE=1 brew bundle exec bundle exec rake lint`\n- `HOMEBREW_NO_AUTO_UPDATE=1 brew bundle exec bundle exec rake test`\n\nAlso run these from the repository root when docs content changes:\n\n- `rg --files docs -0 -g '*.md' -g '!vendor/**' -g '!_site/**' -g '!rubydoc/**' | xargs -0 vale`\n- `HOMEBREW_NO_AUTO_UPDATE=1 brew style docs`\n\n## Notes\n\n- Prefer `brew bundle exec bin/jekyll build` explicitly for site builds.\n- Prefer `brew bundle exec bundle exec rake ...` for Rake tasks so bundled\n  executables such as `mdl` are available to the task.\n- For `Homebrew/brew`, the docs CI also runs\n  `brew generate-man-completions --no-exit-code` before docs checks. Run it\n  when your docs change depends on updated generated manpages or completions.\n\n<!-- File: .vscode/mcp.json (Tokens: ~44 | Category: mcp-config) -->\n{\n  \"servers\": {\n    \"Homebrew\": {\n      \"type\": \"stdio\",\n      \"command\": \"brew\",\n      \"args\": [\n        \"mcp-server\"\n      ]\n    }\n  }\n}\n\n<!-- File: .codex/hooks.json (Tokens: ~61 | Category: codex-rule) -->\n{\n  \"hooks\": {\n    \"Stop\": [\n      {\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \".codex/hooks/brew-lgtm-stop.sh\",\n            \"timeout\": 360\n          }\n        ]\n      }\n    ]\n  }\n}\n\n<!-- File: .codex/hooks/brew-lgtm-stop.sh (Tokens: ~112 | Category: codex-rule) -->\n#!/bin/bash\n\ncd \"$(dirname \"$0\")/../..\" || {\n  printf '%s\\n' '{\"decision\":\"block\",\"reason\":\"Failed to cd to the repository root before running ./bin/brew lgtm.\"}'\n  exit 0\n}\n\nif ./bin/brew lgtm >&2\nthen\n  printf '%s\\n' '{\"continue\":true}'\nelse\n  printf '%s\\n' '{\"decision\":\"block\",\"reason\":\"./bin/brew lgtm failed; review the output above and fix it before stopping.\"}'\nfi\n</yakaai_skills>"}