Skip to main content
Version: Classic 2.1.0

Building Context

The key to good AI responses is giving the right context - not too much, not too little. RepoPrompt Classic Edition gives you precise control over what context your AI sees.

Multi-Root Workspaces​

RepoPrompt supports opening multiple root folders in a single workspace. All features work across roots:

  • Cross-project context: Select files from your codebase and a third-party library to evaluate integration
  • Code + docs: Work with your code and documentation site together to improve docs
  • Monorepos: Navigate related packages, shared libraries, and services in one view
  • Context Builder: Discovers relevant files across all roots automatically

Add roots via File → Add Folder to Workspace or drag folders onto the app.

Selection Modes (Classic Edition)​

Every file can be included in one of three ways, giving you fine-grained control over token usage:

ModeWhat's IncludedToken ImpactBest For
FullComplete file contentHighestFiles you're actively editing
SlicesSpecific line rangesMediumLarge files where only part matters
CodemapFunction/type signatures onlyLowest (~10x smaller)Reference files, APIs, dependencies

Switching Modes (Classic Edition)​

  • Click a file to select it (Full mode by default)
  • Right-click for mode options: show as Full or Codemap ("Show as API only")
  • Files marked with + in the tree have codemaps available

Selected Files Panel (Classic Edition)​

The selected files panel shows your current selection with token counts. Use the controls to manage your context:

  • Sort: Order by Name (A-Z, Z-A) or Tokens (Low-High, High-Low)
  • Gear menu: View Mode, Collapse All Folders, Clear All Line Slices, Clear File Selection
  • Per-file actions: Right-click to switch modes or clear slices on individual files

Using Slices (Classic Edition)​

Slices let you include only specific line ranges from a file. Slices are created through MCP-connected agents:

  • Context Builder: Automatically creates slices when curating context—it reads files and extracts only the relevant sections to fit your token budget
  • MCP Agents: Any agent connected via MCP can use the manage_selection tool to create slices with specific line ranges and descriptions

When a file has slices, you'll see the line range (e.g., "L1-107") and a scissors icon. You can clear slices via right-click or the gear menu's "Clear All Line Slices" option.

Codemaps (Classic Edition)​

Codemaps extract the "shape" of your code - function signatures, class definitions, type declarations - without implementation details. This gives AI structural understanding at 10x fewer tokens.

What Codemaps Include​

  • Function and method signatures (names, parameters, return types)
  • Class and struct definitions
  • Type aliases and interfaces
  • Protocol/interface declarations
  • Important constants and enums

Supported Languages​

Codemaps are powered by tree-sitter and support:

Swift, JavaScript, TypeScript, Python, C, C++, C#, Rust, Go, Java, Dart, PHP

Codemap Modes (Classic Edition)​

ModeBehaviorWhen to Use
NoneNo codemaps includedWhen you don't need structural context
Auto (Default)Intelligently selects relevant definitionsMost use cases - balanced and smart
CompleteAll definitions from scanned filesArchitectural understanding, full API overview

Auto-Codemap Management (Classic Edition)​

When you select files in Full or Slices mode, RepoPrompt automatically adds codemaps for related files:

  • Dependencies and imports get codemap context
  • Related types and protocols are included
  • You get structural context without manually selecting every file

Manual codemap operations (promote/demote) disable auto-management for that session.

tip

Architecture Tip: For architectural questions, try Complete codemaps with no full files selected. This gives AI a bird's-eye view of your entire codebase structure at minimal token cost.

File Tree (Classic Edition)​

The file tree helps AI understand your project structure and navigate relationships between files.

Tree Options​

OptionWhat It ShowsTokens
AutoBalanced tree, trimmed if neededLow-Medium
FullComplete directory structureHigher
SelectedOnly selected files and parentsLowest
NoneNo file treeZero

Codemap Markers (Classic Edition)​

Files with available codemaps show a + marker in the tree. This helps AI know which files have structural information available.

Presets​

Presets save and restore your complete context configuration - file selection, prompt, and app settings - in one click.

What Presets Store​

  • File selection: Which files are selected and in what mode
  • Prompt content: Your instruction text
  • Copy format: How the prompt is formatted for export
  • App settings: File tree mode, codemap mode, etc.

Built-in Presets​

PresetPurpose
StandardClean formatting for any AI (ChatGPT, Claude, etc.)
Pro EditXML format for structured changes - paste response back to apply
PlanOptimized for architectural planning and design discussions

Stored Prompts (Classic Edition)​

Save frequently-used instructions separately from presets. Stored prompts are reusable text snippets you can inject into any context.

Creating Stored Prompts​

  1. Write your instruction in the prompt area
  2. Click the prompt menu → "Save Prompt"
  3. Name it (e.g., "Code Review Guidelines", "Refactoring Instructions")

Using Stored Prompts​

  • Access from the prompt dropdown menu
  • Click to insert into current prompt
  • Combine multiple stored prompts as needed

Token Management​

The token counter shows your current context size. Different models have different limits:

ModelContext WindowNotes
GPT-5.4272K–1M tokensCodex standard: 272K. API: 1M+. ChatGPT: 30k (Plus) / 60k (Pro). GPT-5.5 is Codex CLI-only (Low/High) or ChatGPT Pro web (Pro); it is not an API model.
Claude 4.5200K tokensClaude Code & Desktop. 1M via API at higher rates
Gemini 3.0 Preview200K tokensStandard pricing. 1M+ at higher pricing tiers

Token Reduction Strategies​

If you're hitting token limits:

  • Use codemaps: Switch reference files from Full to Codemap mode
  • Use slices: Include only relevant sections of large files
  • Be selective: Remove files that aren't essential for the task
  • Simplify tree: Use "Selected" tree mode instead of "Full"
  • Consider Gemini: For massive contexts, Gemini's 1M+ tokens helps

Context Builder (Classic Edition)​

Let AI select your context automatically. The Context Builder explores your codebase and recommends files based on your task.

How It Works​

  1. Describe what you're trying to accomplish
  2. Context Builder analyzes your codebase structure
  3. Files are selected and organized by relevance
  4. Review the selection, then use it for Chat or Compose

Best Results​

  • Be specific about your task ("Add dark mode to settings page")
  • Works best with CLI Providers (Claude Code or Codex) connected
  • Results include both files and a generated prompt summarizing context
  • You can refine the selection after it runs
  • For Codex users, the Context Builder default is GPT-5.5 Low for repeated discovery and explore passes. Use GPT-5.5 High (Codex CLI) for heavier planning, review, or pair work after discovery.

Workflow Integration (Classic Edition)​

Context Builder works great as the first step in complex workflows:

  1. Run Context Builder with your task description
  2. Review and adjust the file selection
  3. Use Compose to get a plan from a powerful model
  4. Use Chat with Pro Edit to implement the plan

Video Tutorials​

See context building in action:

What is RepoPrompt for? — Building Context documentation illustration What is RepoPrompt for? Interactive prompt anatomy demo at repoprompt.com/prompt-anatomy

Context Builder 2.0 — Building Context documentation illustration Context Builder 2.0 AI-powered context selection with CLI Providers (Codex, Claude, Gemini)

Accelerate Agent Orientation — Building Context documentation illustration Accelerate Agent Orientation Bootstrap agents with rich context, skip the research phase