feat(index): default-ignore dependency/build/cache dirs (#407) (#417)

node_modules and other dependency/build/cache dirs were indexed whenever a project lacked a .gitignore excluding them (common in non-git projects), flooding context/search with third-party symbols. Added a built-in default-ignore set spanning every supported language/framework (node_modules, vendor, dist, build, target, .venv, __pycache__, Pods, .next, etc.), applied UNIFORMLY in both the git and non-git enumeration paths — including to tracked files, since committing/vendoring a dependency dir doesn't make it project code. The only opt-in is an explicit .gitignore negation (e.g. !vendor/). First-party-prone names (packages, lib, app, bin, src, deps, env) are deliberately excluded from the list.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Colby Mchenry
2026-05-25 18:15:43 -05:00
committed by GitHub
co-authored by Claude Opus 4.7
parent 4a94696e44
commit 832f9063b1
2 changed files with 98 additions and 3 deletions
+9
View File
@@ -22,6 +22,15 @@ and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
reconciles anything that changed while it wasn't running (e.g. a `git pull` from
the terminal), so the first query reflects the current code instead of a stale
snapshot — rather than waiting for the next live edit.
- **Dependency, build, and cache directories are now excluded by default** —
`node_modules`, `vendor`, `dist`, `build`, `target`, `.venv`, `__pycache__`,
`Pods`, `.next`, and the like across every supported language/framework — so
`context` and `search` reflect your code instead of third-party noise, even in a
project with no `.gitignore` (#407). The defaults apply uniformly, including to
committed files (vendoring a dependency into the repo doesn't make it project
code). To index one anyway, add a `.gitignore` negation (e.g. `!vendor/`).
First-party-prone names like `packages/`, `lib/`, `app/`, and `src/` are never on
the default list.
## [0.9.4] - 2026-05-24