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.):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:- Domain Detection: Analyzes your input and detects relevant domains (code_style, testing, structure, etc.) using semantic understanding—not keyword matching.
- Search Existing Knowledge: Searches your context tree for related existing knowledge to prevent duplication.
- Decide Create or Update: Determines whether to create a new topic or update an existing one.
- Hierarchical Organization: Structures content into the appropriate hierarchy: domain → topic → (optional) subtopic.
- Add Relations: Identifies and creates explicit
@domain/topicrelations to connect related knowledge, building a navigable knowledge graph.
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.
- Via Coding Agent
- CLI
- REPL
Your coding agent will execute:
- 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.
- Via Coding Agent
- CLI
- REPL
Copy this prompt and paste it into your coding agent’s chat:Your coding agent will execute:
- Code — TypeScript, JavaScript, Python, Go, Rust, Ruby, Java, C/C++, and 30+ other languages
- Config & data — JSON, YAML, TOML, XML,
.envfiles - Documentation — Markdown, MDX, RST, plain text
- PDFs — Automatic text extraction (up to 50 pages)
- Office files — Word (.docx), Excel (.xlsx), PowerPoint (.pptx)
.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:| Category | Example |
|---|---|
convention | ”Access tokens are signed with RS256 algorithm” |
project | ”Token pairs are stored in the database for revocation tracking” |
environment | ”Team uses PostgreSQL 15 for all persistence” |
personal | ”Prefers functional components over class components” |
preference | ”Use 2-space indentation for all TypeScript files” |
team | ”Code reviews require 2 approvals before merge” |
other | ”The project was started in January 2024” |
## Facts section of each knowledge file in the context tree: