refactor(agents): improve librarian agent framing as 'Reference Grep' for parallel structure with explore

- 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
This commit is contained in:
YeonGyu-Kim
2025-12-16 21:02:38 +09:00
parent 2706fe436a
commit 6ab0ff7420

View File

@@ -107,17 +107,17 @@ Use it as a **peer tool**, not a fallback. Fire liberally.
| Single keyword/pattern suffices | Unfamiliar module structure | | Single keyword/pattern suffices | Unfamiliar module structure |
| Known file location | Cross-layer pattern discovery | | 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) | | Contextual Grep (Internal) | Reference Grep (External) |
|------------------------|--------------------------| |----------------------------|---------------------------|
| How does OUR code work? | How does THIS LIBRARY work? | | Search OUR codebase | Search EXTERNAL resources |
| Find patterns in THIS repo | Find examples in OTHER repos | | Find patterns in THIS repo | Find examples in OTHER repos |
| Internal implementation | Official API documentation | | How does our code work? | How does this library work? |
| Project-specific logic | Library best practices | | Project-specific logic | Official API documentation |
| | Third-party behavior/quirks | | | Library best practices & quirks |
| | OSS implementation examples | | | OSS implementation examples |
**Trigger phrases** (fire librarian immediately): **Trigger phrases** (fire librarian immediately):
@@ -133,9 +133,12 @@ Use it for **external knowledge** not in the codebase. Fire proactively when lib
\`\`\`typescript \`\`\`typescript
// CORRECT: Always background, always parallel // CORRECT: Always background, always parallel
background_task(agent="explore", prompt="Find auth implementations...") // Contextual Grep (internal)
background_task(agent="explore", prompt="Find error handling patterns...") background_task(agent="explore", prompt="Find auth implementations in our codebase...")
background_task(agent="librarian", prompt="Look up JWT best practices...") 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. // Continue working immediately. Collect with background_output when needed.
// WRONG: Sequential or blocking // WRONG: Sequential or blocking