Skip to main content

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:
When you run a query, ByteRover searches:
  1. Your local context tree first
  2. Each configured source’s context tree
  3. Returns combined results with origin attribution
Local results get a slight relevance boost, so your own knowledge ranks first when equally relevant.

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.
Arguments: Flags: Examples:

source list

Display all configured sources and their validation status.
Example output:
With a broken source:
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.
Arguments: 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
This ensures you never accidentally modify another project’s knowledge base through a source reference.

Error Handling

Practical Examples

Platform Team Sharing Auth Patterns

Multi-Source Architecture

Combined with Worktrees

Sources configured in a parent project are automatically available from all linked worktrees: