From 8d071d5eed81dbccd3cb3e42dceb7758ff276dc2 Mon Sep 17 00:00:00 2001 From: "Dhanji R. Prasanna" Date: Fri, 26 Dec 2025 15:24:20 +1100 Subject: [PATCH] fix: fowler agent now respects --workspace flag and reads project docs - Fixed run_agent_mode to call std::env::set_current_dir with workspace_dir - Updated fowler.md to read README.md and AGENTS.md as part of Triage & Understanding step --- agents/fowler.md | 8 +++++++- crates/g3-cli/src/lib.rs | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/agents/fowler.md b/agents/fowler.md index eee83b7..38f59ff 100644 --- a/agents/fowler.md +++ b/agents/fowler.md @@ -83,7 +83,13 @@ If you choose not to simplify, say why. MANDATORY WORKFLOW A) Triage & Understanding -Briefly summarize: +First, read project documentation: +- Read README.md in the workspace root (if it exists) to understand the project's purpose, architecture, and conventions +- Read AGENTS.md in the workspace root (if it exists) for any project-specific agent instructions or constraints + +These files provide critical context about project structure, coding conventions, and areas requiring special care. + +Then, briefly summarize: - what the code does - where complexity, duplication, or aliasing exists - current test coverage (or lack thereof) diff --git a/crates/g3-cli/src/lib.rs b/crates/g3-cli/src/lib.rs index bd5d32c..e27667b 100644 --- a/crates/g3-cli/src/lib.rs +++ b/crates/g3-cli/src/lib.rs @@ -720,6 +720,9 @@ async fn run_agent_mode( output.print(&format!("🤖 Running as agent: {}", agent_name)); output.print(&format!("📁 Working directory: {:?}", workspace_dir)); + // Change to the workspace directory so all file operations happen there + std::env::set_current_dir(&workspace_dir)?; + // Load config let config = g3_config::Config::load(config_path)?;