Feature: Explore agent should use project-specific semantic search tools (pmat query)

Resolved 💬 2 comments Opened Feb 5, 2026 by noahgift Closed Mar 5, 2026

Problem

The Explore agent uses basic Glob/Grep for code search, but many projects have superior semantic search tools configured (e.g., pmat query for Rust projects).

Current Behavior

When exploring a codebase, the Explore agent:

  1. Uses Glob for file pattern matching
  2. Uses Grep for text search
  3. Ignores project-specific semantic search tools

Expected Behavior

The Explore agent should:

  1. Check CLAUDE.md for configured semantic search tools
  2. Use pmat query when available (RAG-powered, quality-annotated results)
  3. Fall back to Glob/Grep when no semantic tools are configured

Example

CLAUDE.md contains:

pmat query "error handling"     # Semantic code search with quality annotations (RAG-powered)

When asked to "find PTX generation bugs", the agent should use:

pmat query "PTX generation bugs" -p /path/to/repo

Instead of:

grep -r "PTX" --include="*.rs"

Benefits

  • pmat query returns TDG scores, complexity metrics, call graphs
  • Results ranked by relevance, not just text matching
  • Cross-repo semantic search via workspace configuration
  • Quality annotations help prioritize which code to investigate

Workaround

Users must manually run pmat query instead of using the Explore agent.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗