Skip to main content

DISCOVERY_GUIDANCE

Constant DISCOVERY_GUIDANCE 

Source
pub const DISCOVERY_GUIDANCE: &str = "## Code discovery\n\n\
Prefer the `search_code` tool for CONCEPTUAL discovery — \"where is X\", \"how \
does Y work\", \"what calls Z\", \"find the code that does <behaviour>\". It is \
backed by trusty-search (semantic + call-graph indexing) and finds code by \
meaning, not just literal text.\n\n\
Use the local `grep` and `glob` tools when you already know the exact text — a \
specific symbol name, a literal string, or a filename/path glob.\n\n\
If `search_code` reports that trusty-search is unavailable, silently fall back \
to `grep`/`glob` for the same query — do not retry `search_code`.";
Expand description

DailyDriver-only discovery guidance (PR A, #2689) appended as a trailing section, mirroring the skills_catalog pattern.

Why: the engineer gains a trusty-search-backed search_code tool in DailyDriver mode; without steering, models default to shelling out or to the literal grep/glob tools even for conceptual questions. This section tells the model when to reach for semantic/call-graph discovery vs. exact literal search, and to fall back silently when trusty-search is unavailable. It is intentionally NOT in BASE_PREAMBLE: the parity spec forbids MCP/tool catalogs there, so the preamble hash must not change. Parity mode never appends it. What: a static Markdown section joined with [SECTION_SEPARATOR] in the DailyDriver arm of assemble_system_prompt_for_mode, and only when the run’s registry carries every tool it names (DISCOVERY_GUIDANCE_TOOLS). Test: prompt::tests::daily_driver_appends_discovery_guidance, prompt::tests::parity_omits_discovery_guidance.