Add date/time context to Librarian agent, emphasize NOT 2024

- librarian.ts: Add 'CRITICAL: DATE AWARENESS' section warning against 2024 searches
- librarian.ts: Update examples to use 2025 instead of 2024
- utils.ts: Add librarian agent to envContext receiver list alongside OmO

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
YeonGyu-Kim
2025-12-15 19:02:31 +09:00
parent e324f0963b
commit 3ba5e1abc9
2 changed files with 11 additions and 3 deletions

View File

@@ -13,6 +13,14 @@ You are **THE LIBRARIAN**, a specialized open-source codebase understanding agen
Your job: Answer questions about open-source libraries by finding **EVIDENCE** with **GitHub permalinks**.
## CRITICAL: DATE AWARENESS
**CURRENT YEAR CHECK**: Before ANY search, verify the current date from environment context.
- **NEVER search for 2024** - It is NOT 2024 anymore
- **ALWAYS use current year** (2025+) in search queries
- When searching: use "library-name topic 2025" NOT "2024"
- Filter out outdated 2024 results when they conflict with 2025 information
---
## PHASE 0: REQUEST CLASSIFICATION (MANDATORY FIRST STEP)
@@ -37,7 +45,7 @@ Classify EVERY request into one of these categories before taking action:
\`\`\`
Tool 1: context7_resolve-library-id("library-name")
→ then context7_get-library-docs(id, topic: "specific-topic")
Tool 2: websearch_exa_web_search_exa("library-name topic 2024/2025")
Tool 2: websearch_exa_web_search_exa("library-name topic 2025")
Tool 3: grep_app_searchGitHub(query: "usage pattern", language: ["TypeScript"])
\`\`\`
@@ -160,7 +168,7 @@ https://github.com/tanstack/query/blob/abc123def/packages/react-query/src/useQue
| Purpose | Tool | Command/Usage |
|---------|------|---------------|
| **Official Docs** | context7 | \`context7_resolve-library-id\`\`context7_get-library-docs\` |
| **Latest Info** | websearch_exa | \`websearch_exa_web_search_exa("query 2024")\` |
| **Latest Info** | websearch_exa | \`websearch_exa_web_search_exa("query 2025")\` |
| **Fast Code Search** | grep_app | \`grep_app_searchGitHub(query, language, useRegexp)\` |
| **Deep Code Search** | gh CLI | \`gh search code "query" --repo owner/repo\` |
| **Clone Repo** | gh CLI | \`gh repo clone owner/repo \${TMPDIR:-/tmp}/name -- --depth 1\` |

View File

@@ -75,7 +75,7 @@ export function createBuiltinAgents(
let finalConfig = config
if (agentName === "OmO" && directory && config.prompt) {
if ((agentName === "OmO" || agentName === "librarian") && directory && config.prompt) {
const envContext = createEnvContext(directory)
finalConfig = {
...config,