Skip to content

Add missing development tool definitions - #166

Merged
andrew merged 4 commits into
git-pkgs:mainfrom
abhinavgautam01:issue-145-missing-development-tools
Sep 3, 2026
Merged

Add missing development tool definitions#166
andrew merged 4 commits into
git-pkgs:mainfrom
abhinavgautam01:issue-145-missing-development-tools

Conversation

@abhinavgautam01

Copy link
Copy Markdown
Contributor

Closes #145

Summary

  • Add knowledge definitions for Babashka, OpenTofu, Stack, Chef, BitBake, Buck, Devbox, Jsonnet Bundler, Puppet, Mint, Meteor, Helmfile, Argo CD and Flux.
  • Add content-aware YAML detection for Argo CD and Flux.
  • Allow extension-scoped YAML content globs while bounding reads to the first 1 MiB of each matched file.
  • Add focused fixtures and signal-level regression tests for every new tool.
  • Regenerate the README tool inventory.

Testing

  • go build ./...
  • go test -race ./...
  • golangci-lint run ./...
  • git diff --check
  • Verified the README tool block matches generated output.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request expands Brief’s knowledge base and detection engine to recognize additional development tools (via new tool definitions + fixtures), including GitOps tools that require content-aware YAML matching, and adds regression tests to keep those signals stable.

Changes:

  • Add knowledge definitions + fixtures for Babashka, OpenTofu, Stack, Chef, BitBake, Buck, Devbox, Jsonnet Bundler, Puppet, Mint, Meteor, Helmfile, Argo CD, and Flux.
  • Allow detect.file_contains to use extension-scoped YAML globs (**/*.yaml / **/*.yml) and bound glob-content reads to 1 MiB per file.
  • Add focused signal/fixture regression tests and regenerate the README tool inventory.

Reviewed changes

Copilot reviewed 41 out of 42 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
testdata/stack-project/stack.yaml Fixture for Stack detection.
testdata/puppet-project/Puppetfile Fixture for Puppet detection.
testdata/opentofu-project/main.tofu Fixture for OpenTofu detection.
testdata/mint-project/Mintfile Fixture for Mint detection.
testdata/meteor-project/versions.json Fixture for Meteor detection.
testdata/meteor-project/package.js Fixture for Meteor detection.
testdata/meteor-project/.meteor/versions Fixture for Meteor detection.
testdata/jsonnet-bundler-project/jsonnetfile.lock.json Fixture for Jsonnet Bundler detection.
testdata/jsonnet-bundler-project/jsonnetfile.json Fixture for Jsonnet Bundler detection.
testdata/helmfile-project/helmfile.yaml Fixture for Helmfile detection.
testdata/flux-project/gotk-sync.yaml Fixture for Flux content-aware YAML detection.
testdata/devbox-project/devbox.lock Fixture for Devbox detection.
testdata/devbox-project/devbox.json Fixture for Devbox detection.
testdata/chef-project/metadata.rb Fixture for Chef detection.
testdata/chef-project/metadata.json Fixture for Chef detection.
testdata/chef-project/Berksfile Fixture for Chef detection.
testdata/buck-project/METADATA.bzl Fixture for Buck detection.
testdata/buck-project/BUCK Fixture for Buck detection.
testdata/bitbake-project/example_1.0.bbappend Fixture for BitBake detection.
testdata/bitbake-project/example_1.0.bb Fixture for BitBake detection.
testdata/babashka-project/bb.edn Fixture for Babashka detection.
testdata/argocd-project/application.yaml Fixture for Argo CD content-aware YAML detection.
README.md Regenerated tool inventory list reflecting new tools.
knowledge/swift/mint.toml Add Mint tool definition.
knowledge/node/meteor.toml Add Meteor tool definition.
knowledge/haskell/stack.toml Add Stack tool definition.
knowledge/clojure/babashka.toml Add Babashka tool definition.
knowledge/_shared/puppet.toml Add Puppet tool definition.
knowledge/_shared/opentofu.toml Add OpenTofu tool definition.
knowledge/_shared/jsonnet-bundler.toml Add Jsonnet Bundler tool definition.
knowledge/_shared/helmfile.toml Add Helmfile tool definition.
knowledge/_shared/flux.toml Add Flux tool definition using YAML content globs.
knowledge/_shared/devbox.toml Add Devbox tool definition.
knowledge/_shared/chef.toml Add Chef tool definition.
knowledge/_shared/buck.toml Add Buck tool definition.
knowledge/_shared/bitbake.toml Add BitBake tool definition.
knowledge/_shared/argocd.toml Add Argo CD tool definition using YAML content globs.
kb/kb.go Relax validation to allow YAML extension globs for file-contains patterns.
kb/kb_test.go Add validation tests for YAML-vs-non-YAML content globs.
detect/development_tools_test.go Add regression tests covering new tool signals + fixtures.
detect/detect.go Add bounded reads for glob content inspection; refactor safeReadFile to support limits.
detect/detect_test.go Add regression test asserting glob content reads are bounded.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread knowledge/_shared/argocd.toml Outdated
Comment thread detect/detect.go Outdated

@andrew andrew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

knowledge/_shared/argocd.toml: The file_contains markers are independent substring matches, so unrelated CRDs using kind: Application are reported as Argo CD. I reproduced this with a KubeVela manifest using apiVersion: core.oam.dev/v1beta1; Brief reported Argo CD with high confidence. Please require the argoproj.io API group and an Argo CD resource kind within the same manifest, then add the KubeVela case as a negative regression test.

@abhinavgautam01

Copy link
Copy Markdown
Contributor Author

Thanks, Fixed. I added structured YAML resource detection so the API group and kind must match within the same YAML document. Argo CD and Flux now use it, with negative regressions for KubeVela, Argo Workflows and markers split across documents.

@andrew andrew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address these before merge:

  • detect/filter.go:295 checks only lowercase .yaml and .yml, while the scanner lowercases extensions. A full scan detects Argo CD in manifest.YAML, but brief diff returns no tools. Normalize the extension and add a CLI-level regression test.

  • kb/kb.go:456 now scores 37 for cognitive complexity, above the configured limit of 30. Extract the YAML resource validation into a focused helper and add cases for blank group and kind values.

@abhinavgautam01

Copy link
Copy Markdown
Contributor Author

Fixed both issues. Changed-file extensions are now normalized, with a CLI regression covering manifest.YAML. YAML resource validation was extracted into a focused helper with missing and blank group/kind tests.

@andrew
andrew merged commit 90a8de8 into git-pkgs:main Sep 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add definitions for missing development tools

3 participants