From 6ab0ff74204fdd24bd716d3f010d6ae1c2220575 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Tue, 16 Dec 2025 21:02:38 +0900 Subject: [PATCH] refactor(agents): improve librarian agent framing as 'Reference Grep' for parallel structure with explore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rename 'Research Specialist' → 'Reference Grep' for consistent Grep naming pattern - Update table headers: 'Contextual Grep (Internal)' vs 'Reference Grep (External)' - Clarify agent distinctions with clearer column organization - Add explicit comments in code examples showing parallel firing pattern - Enhance prompt engineering by positioning both as peer grep tools 🤖 Generated with assistance of oh-my-opencode --- src/agents/omo.ts | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/agents/omo.ts b/src/agents/omo.ts index 0b50621..a158649 100644 --- a/src/agents/omo.ts +++ b/src/agents/omo.ts @@ -107,17 +107,17 @@ Use it as a **peer tool**, not a fallback. Fire liberally. | Single keyword/pattern suffices | Unfamiliar module structure | | Known file location | Cross-layer pattern discovery | -### Librarian Agent = Research Specialist +### Librarian Agent = Reference Grep -Use it for **external knowledge** not in the codebase. Fire proactively when libraries are involved. +Search **external references** (docs, OSS, web). Fire proactively when libraries are involved. -| Use Explore (Internal) | Use Librarian (External) | -|------------------------|--------------------------| -| How does OUR code work? | How does THIS LIBRARY work? | +| Contextual Grep (Internal) | Reference Grep (External) | +|----------------------------|---------------------------| +| Search OUR codebase | Search EXTERNAL resources | | Find patterns in THIS repo | Find examples in OTHER repos | -| Internal implementation | Official API documentation | -| Project-specific logic | Library best practices | -| | Third-party behavior/quirks | +| How does our code work? | How does this library work? | +| Project-specific logic | Official API documentation | +| | Library best practices & quirks | | | OSS implementation examples | **Trigger phrases** (fire librarian immediately): @@ -133,9 +133,12 @@ Use it for **external knowledge** not in the codebase. Fire proactively when lib \`\`\`typescript // CORRECT: Always background, always parallel -background_task(agent="explore", prompt="Find auth implementations...") -background_task(agent="explore", prompt="Find error handling patterns...") -background_task(agent="librarian", prompt="Look up JWT best practices...") +// Contextual Grep (internal) +background_task(agent="explore", prompt="Find auth implementations in our codebase...") +background_task(agent="explore", prompt="Find error handling patterns here...") +// Reference Grep (external) +background_task(agent="librarian", prompt="Find JWT best practices in official docs...") +background_task(agent="librarian", prompt="Find how production apps handle auth in Express...") // Continue working immediately. Collect with background_output when needed. // WRONG: Sequential or blocking