Skip to main content

Curate context to your context tree

This guide walks you through curating context to your context tree. curate can both be executed by you via /curate in the REPL or by your coding agent (in your prompt to your coding agent, simply mention ByteRover and it will then run brv curate accordingly). When you provide context, ByteRover autonomously detects domains, searches for duplicates, organizes hierarchically, and prevents duplication using intelligent processing. Let’s use this example context:

The Easier Way - Let Your Coding Agent Work with Us

The context tree evolves with your project. Your coding agent can intelligently update existing knowledge. To update context, copy this prompt and paste it into your coding agent’s chat (e.g., Cursor, Claude Code, etc.):
Your coding agent will then start working on the task and run curation with ByteRover accordingly.

Curate via the REPL or CLI

ByteRover automatically categorizes and organizes your context. It detects domains, searches for duplicates, and places content intelligently using semantic understanding. Run the command with your context:
Example output:
How Autonomous Mode Works:
  1. Domain Detection: Analyzes your input and detects relevant domains (code_style, testing, structure, etc.) using semantic understanding—not keyword matching.
  2. Search Existing Knowledge: Searches your context tree for related existing knowledge to prevent duplication.
  3. Decide Create or Update: Determines whether to create a new topic or update an existing one.
  4. Hierarchical Organization: Structures content into the appropriate hierarchy: domain → topic → (optional) subtopic.
  5. Add Relations: Identifies and creates explicit @domain/topic relations to connect related knowledge, building a navigable knowledge graph.
For a deeper look at curation operations, folder packing, and facts extraction, see How Curation Works.

File Reference

You can include files from your codebase when curating. In the REPL, use the @ syntax to reference files. On the CLI, use the -f/--files flag.
Your coding agent will execute:
Constraints:
  • Maximum 5 file references per curation
  • Supported types: text/code files, images, PDFs, and Office documents (.docx, .xlsx, .pptx)
  • Paths are relative to project root

Folder Curation

Curate an entire directory at once. ByteRover packs the folder into a structured representation and analyzes its contents. On the CLI, use the -d/--folder flag. In the REPL, use @ with a folder path.
Copy this prompt and paste it into your coding agent’s chat:
Your coding agent will execute:
Curating multiple folders in a single brv curate call (e.g. brv curate -d src/auth -d src/api) counts as one operation against your usage, not one per folder.
Supported file types:
  • Code — TypeScript, JavaScript, Python, Go, Rust, Ruby, Java, C/C++, and 30+ other languages
  • Config & data — JSON, YAML, TOML, XML, .env files
  • Documentation — Markdown, MDX, RST, plain text
  • PDFs — Automatic text extraction (up to 50 pages)
  • Office files — Word (.docx), Excel (.xlsx), PowerPoint (.pptx)
The folder pack respects .gitignore patterns and skips binary files automatically. For technical details on folder packing, see How Curation Works.

Facts Extraction

During curation, ByteRover automatically extracts structured facts from your content. Each fact captures a specific, verifiable statement and is categorized by type: Facts are stored in the ## Facts section of each knowledge file in the context tree:
When files are merged during curation, facts are deduplicated by statement text to avoid repetition. For more details, see How Curation Works.

Customize Your Intention

The power of the CLI is its flexibility—autonomous mode adapts to how you want to organize your knowledge. For example: Copy this prompt and paste it into your coding agent’s chat:
Your coding agent will execute the command, and ByteRover will intelligently divide your content into separate, focused topics—making it easier to reference specific parts later.

You’re in Control of Your Context

You decide exactly how your context is organized. Autonomous mode is flexible and follows your lead.

Breaking Context Into Smaller Pieces

Want granular organization? Copy this prompt and paste it into your coding agent’s chat:
ByteRover will divide content into separate topics, each with clear scope.

Keeping Context Together

Prefer cohesive organization? Copy this prompt and paste it into your coding agent’s chat:
ByteRover will create a single, comprehensive topic instead of multiple smaller ones.

Summarizing Before Storing

Have lots of detail but want condensed knowledge? Copy this prompt and paste it into your coding agent’s chat:
ByteRover extracts essential information, keeping your context tree focused and concise.

Mix and Match

Combine approaches! Some contexts broken down, others kept whole, some summarized. ByteRover adapts to your workflow—you’re always in the driver’s seat. ByteRover follows your instructions for granularity and organization style, ensuring your context tree matches your team’s preferences.