Skip to content

feat(agents): add librarian agent for codebase exploration - #32

Merged
amondnet merged 5 commits into
mainfrom
feat/librarian-agent
Dec 19, 2025
Merged

feat(agents): add librarian agent for codebase exploration#32
amondnet merged 5 commits into
mainfrom
feat/librarian-agent

Conversation

@amondnet

Copy link
Copy Markdown
Contributor

Summary

Add specialized librarian agent for exploring open-source repositories and finding implementation evidence with GitHub permalinks.

Changes

  • New agent file: agents/librarian.md - Specialized codebase exploration agent
  • Updated .gitmodules - Added oh-my-opencode reference submodule
  • Updated .gitignore - Added .turbo directory

Features

The librarian agent provides:

  • Request Classification - Categorizes requests as conceptual, implementation, context, or comprehensive
  • Date Awareness - Ensures searches use current year (2025+) to avoid outdated results
  • Parallel Execution Requirements - Defines minimum parallel calls for each request type (3-6+ tools)
  • Permalink Construction - Builds GitHub permalinks with commit SHAs for citations
  • Failure Recovery Strategies - Handles fallback options when tools fail
  • Communication Rules - No tool names, direct answers, mandatory citations

Request Types Supported

Type Trigger Tools
TYPE A: CONCEPTUAL "How do I...", "Best practice for..." context7 + websearch (parallel)
TYPE B: IMPLEMENTATION "How does X implement Y?" gh clone + read + blame
TYPE C: CONTEXT "Why was this changed?", "History of X?" gh issues/prs + git log/blame
TYPE D: COMPREHENSIVE Complex/ambiguous requests ALL tools in parallel

Test Plan

  • Agent correctly classifies different request types
  • Parallel execution requirements are met for each type
  • Citations include GitHub permalinks with commit SHAs
  • Date awareness prevents 2024 results in searches
  • Failure recovery strategies work when tools unavailable

Related Issues

This is foundational work for improved codebase exploration capabilities.

Add specialized librarian agent for exploring open-source repositories and finding implementation evidence with GitHub permalinks. Features include:

- Request classification (conceptual, implementation, context, comprehensive)
- Date awareness for searches (2025+)
- Parallel execution requirements
- Permalink construction for citations
- Failure recovery strategies

Also add oh-my-opencode reference submodule and .turbo directory to .gitignore.
- Add Bash tool to frontmatter (required for gh/git CLI commands)
- Fix description to use YAML multi-line syntax (|) instead of \n
- Update tool references to use correct MCP invocation syntax
- Fix escaped backticks in citation format example
- Expand tool reference table with Read and Grep tools
…text7 to plugin_context7_context7

Update all Context7 MCP tool invocations in the librarian agent to use
the correct server name. Also updates project settings and tasklist.
@amondnet amondnet self-assigned this Dec 19, 2025
Remove session-specific tasklist file from version control.
Resolve conflicts in .gitignore and .please/memory/tasklist.json
@codecov

codecov Bot commented Dec 19, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.94%. Comparing base (fcce37b) to head (08ba167).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #32   +/-   ##
=======================================
  Coverage   47.94%   47.94%           
=======================================
  Files          15       15           
  Lines        3341     3341           
=======================================
  Hits         1602     1602           
  Misses       1739     1739           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@amondnet
amondnet merged commit 9d74066 into main Dec 19, 2025
9 checks passed
@amondnet
amondnet deleted the feat/librarian-agent branch December 19, 2025 03:06
@passionfactory-bot passionfactory-bot Bot mentioned this pull request Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant