Remove automatic README loading from context window

README.md is no longer auto-loaded into the LLM context at startup.
This saves ~4,600 tokens per session while AGENTS.md and memory.md
still provide all critical information for code tasks.

Changes:
- Delete read_project_readme() function
- Remove readme_content parameter from combine_project_content()
- Rename extract_readme_heading() -> extract_project_heading()
- Rename Agent constructors: *_with_readme_* -> *_with_project_context_*
- Update context preservation to only check for Agent Configuration
- Remove has_readme field from LoadedContent
- Update all tests to use new markers and function names

The LLM can still read README.md on-demand via read_file when needed.
This commit is contained in:
Dhanji R. Prasanna
2026-01-29 11:07:41 +11:00
parent 05d253ee2a
commit 7bfb9efa19
16 changed files with 113 additions and 174 deletions

View File

@@ -357,7 +357,7 @@ pub async fn call_refinement_llm_with_tools(
project.enter_workspace()?;
// Create agent - not autonomous mode, just regular agent with tools
let mut agent = Agent::new_with_readme_and_quiet(
let mut agent = Agent::new_with_project_context_and_quiet(
planner_config,
ui_writer,
Some(system_prompt),

View File

@@ -608,7 +608,7 @@ pub async fn run_coach_player_loop(
let player_config = g3_config.for_player()?;
let ui_writer = llm::PlannerUiWriter::new();
let mut player_agent = Agent::new_autonomous_with_readme_and_quiet(
let mut player_agent = Agent::new_autonomous_with_project_context_and_quiet(
player_config,
ui_writer,
None,
@@ -666,7 +666,7 @@ pub async fn run_coach_player_loop(
let coach_config = g3_config.for_coach()?;
let coach_ui_writer = llm::PlannerUiWriter::new();
let mut coach_agent = Agent::new_autonomous_with_readme_and_quiet(
let mut coach_agent = Agent::new_autonomous_with_project_context_and_quiet(
coach_config,
coach_ui_writer,
None,