fix: improve Steward delegation instructions for Librarian
Build and Push / build (release) Successful in 10s

- Update Librarian capability description to highlight CREATE/UPDATE/SEARCH
- Add specific Steward guidelines for wiki creation, updates, and research
- Add dynamic time injection to user prompts for temporal awareness
- Expand domains to include 'create', 'write', 'update'
- Update test to match new capability description

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-11 21:55:17 +01:00
co-authored by Claude Opus 4.5
parent ac2ada89fe
commit 4efa717796
4 changed files with 48 additions and 15 deletions
+7 -2
View File
@@ -21,8 +21,10 @@ LIBRARIAN_CAPABILITY = HouseholdCapability(
role="The Librarian",
category="research",
description=(
"Research assistant providing knowledge search, wiki access, "
"semantic search, and knowledge graph exploration via library-desk API"
"Research and wiki management: can CREATE wiki pages about topics "
"(with automatic HybridRAG research), UPDATE existing pages, "
"SEARCH wiki/knowledge graph/web, and synthesize information. "
"Use for: 'create a page about X', 'update wiki', 'find info on X'"
),
domains=[
"research",
@@ -32,6 +34,9 @@ LIBRARIAN_CAPABILITY = HouseholdCapability(
"documents",
"search",
"synthesis",
"create",
"write",
"update",
],
cost="medium", # Multiple API calls to library-desk
requires_network=True, # Needs library-desk API access
+12 -8
View File
@@ -48,7 +48,7 @@ AVAILABLE HOUSEHOLD CAPABILITIES:
{capabilities_text}
YOUR TASK:
Analyze the user's query and recommend which capabilities are needed.
Analyze the user's query and recommend which capabilities are needed, with specific delegation instructions.
{history_text}
USER QUERY: {query}
@@ -57,18 +57,22 @@ GUIDELINES:
- Be conservative - only recommend truly necessary capabilities
- Simple greetings/chat → no capabilities needed (conversational response only)
- Math/calculations → tatlock_core
- Web searches → tatlock_core
- Quick web searches → tatlock_core
- Time/date queries → tatlock_core
- Wiki creation ("create a page about X", "add X to wiki") → librarian with smart_create
- Wiki updates ("update the page", "add to dossier") → librarian with update
- Research queries ("find info", "what do we know about", "search for") → librarian with hybrid_search
- In-depth research, knowledge synthesis, document lookup → librarian with hybrid_search
- If conversation history is relevant, note which previous turns matter
- Assess complexity: simple (1 tool), moderate (2-3 tools), complex (multiple steps)
- If capabilities are missing, mention what would be needed
RESPOND WITH 2-3 SENTENCES:
1. Which capabilities (if any) are needed and why
2. Complexity assessment (simple/moderate/complex)
3. Any conversation context or missing capabilities
RESPOND WITH 2-4 SENTENCES:
1. Capability needed: name the capability and the specific action (e.g., "librarian to create a wiki page about CI/CD using smart_create")
2. Reason: brief explanation of why this capability handles the request
3. Complexity assessment (simple/moderate/complex)
4. Any relevant conversation context
Use capability names in your response (e.g., "tatlock_core for calculations").
Be specific about what Tatlock should delegate - include the action verb (create, update, search, etc.).
Plain text only - no JSON, no special formatting."""