Thanks to visit codestin.com
Credit goes to docs.byterover.dev

Skip to main content
This workflow helps you onboard existing documentation files (1-3 files) into your context tree. Perfect for READMEs, specs, or any markdown files already in your codebase. For bulk extraction from your entire codebase, see Bootstrap from Codebase.

Prerequisites

  • ByteRover CLI installed and authenticated (/login)
  • Project initialized (/init)
  • Existing markdown file(s) with documentation or context

Step 1: Identify Your Context Source

You likely have existing documentation in your codebase: README.md, ARCHITECTURE.md, SECURITY.md, or similar files containing valuable context. For this example, we’ll use a security.md file:
Security Best Practices:
Never commit .env files - Add to .gitignore
Use strong secrets - Minimum 32 characters for JWT secrets
Rotate secrets regularly - Especially in production
Use secret management - AWS Secrets Manager, HashiCorp Vault
Validate on startup - Fail fast if configuration is wrong

Step 2: Curate to Context Tree

You can curate context using either your coding agent or manually in the REPL.
Copy this prompt and paste it into your coding agent’s chat (e.g., Cursor, Claude Code, etc.):
> use brv curate to intelligently organize content from security.md
Your coding agent will read the file and execute:
brv curate "Security Best Practices:
Never commit .env files - Add to .gitignore
Use strong secrets - Minimum 32 characters for JWT secrets
Rotate secrets regularly - Especially in production
Use secret management - AWS Secrets Manager, HashiCorp Vault
Validate on startup - Fail fast if configuration is wrong"
ByteRover automatically analyzes the content and organizes it into the context tree, detecting relevant domains (likely compliance or code_style) and creating an appropriate topic structure.

Step 3: Review Changes

Before pushing, verify what was added:
# In the REPL:
/status
This shows all added topics and subtopics in your context tree, allowing you to review the organization before syncing to remote.

Step 4: Push to Remote

Sync your context to the remote space:
# In the REPL:
/push
Check the ByteRover web application to confirm the context has been stored.

Step 5: Query to Verify

Test that your context is retrievable using either your coding agent or manually in the REPL.
Copy this prompt and paste it into your coding agent’s chat:
> query the context tree for security best practices using brv query
Your coding agent will execute:
brv query "security best practices"
ByteRover will search intelligently, follow relations between topics, and synthesize an answer from your context tree.

What Happened Behind the Scenes

  1. Curate Command: Whether via your coding agent (brv curate) or manually (/curate), ByteRover processed the content from your file.
  2. Intelligent Curation: ByteRover automatically detected relevant domains, organized content hierarchically, and created context.md files in .brv/context-tree/.
  3. Review & Push: You verified the organization with /status and synced to remote with /push.
  4. Agentic Search: Whether via your coding agent (brv query) or manually (/query), ByteRover reasoned about your question and retrieved relevant context with citations.

Curating Multiple Files

For 2-3 related files, reference them together using either method.
Copy this prompt and paste it into your coding agent’s chat:
> read README.md, AUTH.md then use brv curate to add context about the authentication implementation
Your coding agent will read both files and execute brv curate with their combined context.
ByteRover will organize everything into the appropriate domains and topics.

Next Steps