Curation Operations
When you curate context (via/curate or brv curate), ByteRover’s agent decides how to modify the context tree using five operations:
| Operation | What It Does |
|---|---|
| ADD | Creates a new knowledge file. Auto-generates context.md overviews at the domain, topic, and subtopic levels if they don’t already exist. |
| UPDATE | Modifies an existing knowledge file. Resets recency to 1.0 and increases importance by +5. |
| UPSERT | Creates the file if it doesn’t exist, updates it if it does — a single operation without needing to check first. |
| MERGE | Combines a source file into a target file. Merges content sections (Raw Concept, Narrative, Facts), takes the higher scoring metadata from each, then deletes the source. |
| DELETE | Removes a specific knowledge file, or an entire folder if no file title is specified. |
Folder Packing
Use the-d/--folder flag to curate an entire directory at once:
- 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.
Facts Extraction
During curation, the agent extracts structured facts from your content. Each fact captures a specific, verifiable statement:personal, project, preference, convention, team, or environment. When files are merged, facts are deduplicated by statement text to avoid repetition.
Summary Generation
After each curation completes, ByteRover automatically regenerates hierarchical summaries up the directory tree. Every directory that contains or is an ancestor of a changed file gets an updated_index.md.
For example, curating a file at authentication/jwt-implementation/refresh_token_rotation.md triggers summary regeneration at:
authentication/jwt-implementation/_index.mdauthentication/_index.md_index.md(root)
_index.md is a condensed synthesis of its directory’s knowledge — broader summaries cover more ground with less detail, narrower ones go deeper. If a directory becomes empty (all files deleted), its stale _index.md is removed automatically.
Summary generation uses a three-tier escalation strategy: a standard pass, an aggressive compression pass, and a deterministic fallback if the LLM is unavailable. The result is always written — curation never blocks on summary failure.