rlm_repl_context
Package project documentation into Python-ready context for REPL sessions, enabling context-aware code execution with helper functions for exploration and analysis.
Instructions
Bridge between Snipara's context optimization and RLM-Runtime's code execution.
PURPOSE: Package project documentation into a Python-ready format that can be injected into an rlm-runtime REPL session for context-aware code execution.
WORKFLOW:
Call rlm_repl_context to get context_data + setup_code
Use set_repl_context(key='context', value=context_data) to inject data
Use execute_python(setup_code) to load helper functions
Use helpers (peek, grep, find_function, etc.) to explore context
Execute code with full documentation context available
USE CASES:
Implement features with documentation awareness
Debug code with access to related docs
Write tests referencing specifications
Refactor with architecture docs available
Returns context_data (files + sections), setup_code (helper functions), and usage hints.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Optional query to filter context by relevance. If empty, loads files in order within budget. | |
| max_tokens | No | Token budget for file content | |
| include_helpers | No | Include Python helper functions: peek(), grep(), sections(), files(), get_file(), search(), trim(), find_function(), list_imports(), context_summary() | |
| search_mode | No | Search mode when query is provided | hybrid |