From a077121b3936a8a6324e4551a88238e87c453b16 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sat, 13 Dec 2025 12:46:39 +0100 Subject: [PATCH] refactor: switch preprocessing to use delegation tools MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes preprocessing to use get_delegation_tools() instead of get_scoped_tools(). Expert agents now get delegation wrappers (delegate_to_librarian) while core tools are returned directly. This reduces Tatlock's cognitive load from 16+ tools to ~3-5. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/core/preprocessing.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/preprocessing.py b/src/core/preprocessing.py index fd9bdb0..b91253a 100644 --- a/src/core/preprocessing.py +++ b/src/core/preprocessing.py @@ -103,9 +103,11 @@ async def preprocess_request( # Format note for Tatlock (includes conversation context) steward_note = await format_steward_note(recommendation) - # Get scoped tools from household registry + # Get delegation tools from household registry + # Uses agent-as-tool pattern: expert agents get delegation wrappers, + # core tools are returned directly registry = get_household_registry() - scoped_tools = registry.get_scoped_tools( + scoped_tools = registry.get_delegation_tools( recommendation.recommended_capabilities )