What Are Sources?
Sources let you reference curated knowledge from other ByteRover projects. When you add a source, its context tree becomes searchable alongside your own — without copying any data. Results are attributed to their origin so you always know where knowledge came from. This is useful when:- Platform teams share auth patterns, infrastructure conventions, or API guidelines
- Shared libraries document their conventions for downstream consumers
- Design systems provide component guidelines to frontend teams
- Cross-team collaboration requires visibility into each other’s curated knowledge
How It Works
Sources are declarative, one-way references stored in your project’s.brv/sources.json. Nothing is written to the target project — it doesn’t even know you’ve referenced it.
sources.json structure:
- Your local context tree first
- Each configured source’s context tree
- Returns combined results with origin attribution
Commands
All source commands are available as both CLI commands and TUI slash commands.source add
Add a read-only knowledge source from another ByteRover project.
- CLI
- TUI
Flags:
Examples:
source list
Display all configured sources and their validation status.
- CLI
- TUI
Broken sources (where the target’s
.brv/ has been deleted) are excluded from search results but remain in the configuration until you explicitly remove them. This prevents silent data loss.source remove
Remove a knowledge source reference. Only deletes the local reference — the target project is untouched.
- CLI
- TUI
Examples:
Search Integration
When you query a project with sources configured, results include origin information:Origin Attribution
Each result is prefixed with its origin:Relevance Ranking
- Local results get a slight score boost when relevance is similar
- Results from all sources are merged and ranked together
- The most relevant result wins regardless of origin
Write Protection
Sources are strictly read-only. ByteRover enforces write guards at the tool level:- Attempting to curate into a shared source fails with:
Cannot write to shared source — sources are read-only. - All mutation tools (
write_file,curate) check file paths against source paths before allowing writes - Protection is fail-closed: if context can’t be determined, writes are blocked