-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Feature Description
Add user-configurable (on/off) context pre-population mechanism which would automatically provide contents of the files most related to the user's request.
Problem Statement
This is to avoid unnecessary round trips, save request pool allowance and actually decrease context pollution by avoiding some nonproductive contents in the early stage.
Proposed Solution
Call external agent like Claude Code, Qwen-CLI, Gemini-CLI, Droid, OpenCode, Codex and instruct it to find most relevant files and provide their filenames and snippets of the most relevant parts of those files. Agent will use it's own dedicated context and generate output which we can inject back to the original user request to enhance it to avoid unnecessary round trips.
Use Cases
Describe specific scenarios where this feature would be valuable:
- Any problem which requires analysis of multiple files in the codebase before taking further actions
Alternative Solutions
Not analyzed
Implementation Ideas
Add new config param to gate the state of this new feature. It should be configurable via CLI param, env vars and config file. Leverage existing config param value recognition mechanism we already have in place for this.
Also let the user to configure the full command we should use to spawn that agent (ie cli name + params + prompt to execute in headless mode). This way we could handle literally any agent without the need to implement separate handlers for different agents.
We should provide user with example commands (with prompts) for the most popular coding agents and put this info in README.md
If enabled and this is the first request of a new session - spawn in the background a new external CLI-based agent and instruct it to find the most relevant files in the project related to the user's problem, provide their filenames and the most relevant code snippets from those files (with line numbers).
Once we get reply from that agent we aughent user-submitted prompt with such information. The rest of the flow remains the same. So this is one-off action only executed at the very start of each new session only when this feature is active.