From e3c9760b6b4561b58acc184ce403d0ff2d2fff08 Mon Sep 17 00:00:00 2001 From: Muhammad Ubaid Raza Date: Thu, 12 Feb 2026 23:31:13 +0500 Subject: [PATCH] chore: enforce batch tool calls --- agents/gem-devops.agent.md | 2 +- agents/gem-documentation-writer.agent.md | 2 +- agents/gem-implementer.agent.md | 2 +- agents/gem-orchestrator.agent.md | 2 ++ agents/gem-planner.agent.md | 1 + agents/gem-researcher.agent.md | 1 + agents/gem-reviewer.agent.md | 1 + 7 files changed, 8 insertions(+), 3 deletions(-) diff --git a/agents/gem-devops.agent.md b/agents/gem-devops.agent.md index 25a43caa..bc66f589 100644 --- a/agents/gem-devops.agent.md +++ b/agents/gem-devops.agent.md @@ -38,7 +38,7 @@ Containerization (Docker) and Orchestration (K8s), CI/CD pipeline design and aut - Cleanup: remove orphaned resources - Errors: transient→handle, persistent→escalate - Plaintext secrets → halt and abort -- File edits: Use multi_replace_string_in_file for multiple changes in same file; fall back to replace_string_in_file for single changes only +- Prefer multi_replace_string_in_file for file edits (batch for efficiency) diff --git a/agents/gem-documentation-writer.agent.md b/agents/gem-documentation-writer.agent.md index dd15b2da..73bf803c 100644 --- a/agents/gem-documentation-writer.agent.md +++ b/agents/gem-documentation-writer.agent.md @@ -39,7 +39,7 @@ Technical communication and documentation architecture, API specification (OpenA - Never use TBD/TODO as final documentation - Handle errors: transient→handle, persistent→escalate - Secrets/PII → halt and remove -- File edits: Use multi_replace_string_in_file for multiple changes in same file; fall back to replace_string_in_file for single changes only +- Prefer multi_replace_string_in_file for file edits (batch for efficiency) diff --git a/agents/gem-implementer.agent.md b/agents/gem-implementer.agent.md index 013f42d6..e56dbe30 100644 --- a/agents/gem-implementer.agent.md +++ b/agents/gem-implementer.agent.md @@ -46,7 +46,7 @@ Full-stack implementation and refactoring, Unit and integration testing (TDD/VDD - Test failures → fix all or escalate - Vulnerabilities → fix before handoff - Prefer existing tools/ORM/framework over manual database operations (migrations, seeding, generation) -- File edits: Use multi_replace_string_in_file for multiple changes in same file; fall back to replace_string_in_file for single changes only +- Prefer multi_replace_string_in_file for file edits (batch for efficiency) diff --git a/agents/gem-orchestrator.agent.md b/agents/gem-orchestrator.agent.md index 5fb404ce..7a7da113 100644 --- a/agents/gem-orchestrator.agent.md +++ b/agents/gem-orchestrator.agent.md @@ -44,6 +44,7 @@ gem-researcher, gem-planner, gem-implementer, gem-chrome-tester, gem-devops, gem - Context-efficient file reading: prefer semantic search, file outlines, and targeted line-range reads; limit to 200 lines per read +- Built-in preferred; batch independent calls - CRITICAL: Delegate ALL tasks via runSubagent - NO direct execution - Simple tasks and verifications MUST also be delegated - Max 4 concurrent agents @@ -59,6 +60,7 @@ gem-researcher, gem-planner, gem-implementer, gem-chrome-tester, gem-devops, gem - Memory CREATE: Include citations (file:line) and follow /memories/memory-system-patterns.md format - Memory UPDATE: Refresh timestamp when verifying existing memories - Persist product vision, norms in memories +- Prefer multi_replace_string_in_file for file edits (batch for efficiency) diff --git a/agents/gem-planner.agent.md b/agents/gem-planner.agent.md index 43975895..6831a3f3 100644 --- a/agents/gem-planner.agent.md +++ b/agents/gem-planner.agent.md @@ -64,6 +64,7 @@ System architecture and DAG-based task decomposition, Risk assessment and mitiga - Halt on circular deps, syntax errors - If research confidence low, add open questions - Handle errors: missing research→reject, circular deps→halt, security→halt +- Prefer multi_replace_string_in_file for file edits (batch for efficiency) diff --git a/agents/gem-researcher.agent.md b/agents/gem-researcher.agent.md index 12e199b1..9978b00b 100644 --- a/agents/gem-researcher.agent.md +++ b/agents/gem-researcher.agent.md @@ -63,6 +63,7 @@ Codebase navigation and discovery, Pattern recognition (conventions, architectur - Note testing patterns and existing coverage - Work autonomously to completion - Handle errors: research failure→retry once, tool errors→handle/escalate +- Prefer multi_replace_string_in_file for file edits (batch for efficiency) diff --git a/agents/gem-reviewer.agent.md b/agents/gem-reviewer.agent.md index 29ce561a..ad4847b8 100644 --- a/agents/gem-reviewer.agent.md +++ b/agents/gem-reviewer.agent.md @@ -35,6 +35,7 @@ Security auditing (OWASP, Secrets, PII), Specification compliance and architectu - Tool Activation: Always activate VS Code interaction tools before use (activate_vs_code_interaction) - Context-efficient file reading: prefer semantic search, file outlines, and targeted line-range reads; limit to 200 lines per read +- Built-in preferred; batch independent calls - Use grep_search (Regex) for scanning; list_code_usages for impact - Use tavily_search ONLY for HIGH risk/production tasks - Read-only: No execution/modification