Skip to content
This repository was archived by the owner on Aug 2, 2026. It is now read-only.

Latest commit

 

History

History
76 lines (55 loc) · 2.5 KB

File metadata and controls

76 lines (55 loc) · 2.5 KB

Contributing to Code Intelligence

Thanks for improving Code Intelligence for BB. This project ships a committed server-only plugin artifact, so source changes and release output are reviewed together.

Setup

Requirements:

  • Node.js 22 or newer;
  • npm;
  • BB 0.34 or newer on PATH for the plugin build step.

From a fresh clone:

npm ci && npm run check

npm run check is the required local gate. It verifies Prettier formatting, runs type checking and the Vitest suite, builds the managed-install plugin artifact, copies parser assets, and validates the release artifact. GitHub Actions are intentionally not required for this repository. If it reports that dist/ differs, review and commit the generated artifact before opening a pull request.

To run the same gate before each push, opt in to the managed hook:

npm run install-git-hooks

The installer refuses to replace a pre-existing hook it does not own. Remove the managed hook manually if you no longer want it.

Development workflow

Format all supported source and documentation files before validation:

npm run format

npm run format:check reports formatting drift without modifying files. Generated release output under dist/ and benchmark evidence under bench/results/ are excluded from source formatting.

  1. Create a focused branch from current main.
  2. Change source under src/ or the plugin entrypoint server.ts.
  3. Add or update a focused test under test/ before changing behavior.
  4. Run npm run format, the smallest relevant test, then npm run check.
  5. Review git diff -- dist/. Commit generated dist/ files only when the build changed them; never commit source maps, credentials, local BB data, or node_modules/.
  6. Open a focused pull request using the repository template.

For rapid iteration, run a single test file with:

npm test -- test/instant-grep.test.ts

Pull requests

Keep each pull request to one reviewable outcome. Explain the user-facing effect, state how it was validated, and update documentation whenever tool contracts, install steps, or release behavior change. A maintainer must review and merge pull requests; passing a local gate does not replace review.

Where to ask or report