Phrasing Picks the Recipe
Canopy has one tool and one input: the question. There are no parameters to tune and no tool to choose — the router reads your phrasing and selects the recipe. That makes phrasing the only lever, and it follows two rules.
Rule 1 — name the entity type. Say “the function parseConfig”, “the file
src/auth/session.ts”, “the struct Router”. The type word tells the router which
recipe class you want.
Rule 2 — backtick paths, directories, and symbols. The router uses backticks to
locate entities exactly. `src/lib.rs` is an anchor; “the lib file” is a guess.
Routing itself is deterministic — no LLM, no network, 360/360 on the router’s labelled corpus. A question that follows both rules locks onto a structural recipe. A question that follows neither falls through to the concept fallback, a semantic search over the chunk index. It still answers, but it is the weakest recipe: ranked prose instead of a structural fact.
Good and weak phrasing, per shape
Section titled “Good and weak phrasing, per shape”Find and read code
Section titled “Find and read code”| Shape | Ask | Weak |
|---|---|---|
| Locate | where is the function `processPayment` defined? | find processPayment |
| Extract | show `processPayment` in `src/billing/charge.ts` | print the payment code |
| Explain a file | what does `src/auth/session.ts` do? | explain the session stuff |
| Public surface | public surface of `src/api/client.ts` | what does the API expose? |
| Filtered symbols | list functions defined in `src/net/` | what functions handle networking? |
The weak forms drop the type word, the backticks, or both — so the router has no anchor and falls back to semantic search.
Trace structure
Section titled “Trace structure”| Shape | Ask | Weak |
|---|---|---|
| Dependents / blast radius | what depends on `src/lib/config.ts`? · what calls `parseConfig`? | is config used a lot? |
| Imports | what does `src/server/router.ts` import? | what does the router pull in? |
| Wiring / dead code | is `src/utils/legacy.ts` reachable? | do we still use legacy utils? |
| Import cycles | are there import cycles? | is the dependency structure clean? |
Structure questions are graph queries. Phrased well, the answer is complete by construction — every edge in the index, not whatever a text search happened to hit.
History and safety
Section titled “History and safety”| Shape | Ask | Weak |
|---|---|---|
| Ownership | who last changed `src/billing/invoice.ts`? | who knows the billing code? |
| Test coverage | what tests cover `src/billing/`? | is billing tested? |
| Pre-edit dossier | what should I know before editing `src/core/scheduler.ts`? | is it safe to touch the scheduler? |
Orientation
Section titled “Orientation”| Shape | Ask | Notes |
|---|---|---|
| Architecture | architecture overview | Use verbatim — it is its own shape. |
| Concept fallback | how does retry backoff work? | Legitimate when you cannot name a file or symbol yet. |
The concept fallback is the right first move on an unfamiliar codebase — ask the concept
question, take a file path from the answer, then follow up with a specific shape
(what does `path` do?, what depends on `path`?).
Answer density
Section titled “Answer density”The one remaining density control is the answer format. By default each recipe picks its own preferred density; you can force it:
canopy answer "what depends on `src/lib/config.ts`?" --format standardconcise— the compact answer.standard— fuller answer with citations.
The MCP tool accepts the same format parameter.
When you get “No strong match”
Section titled “When you get “No strong match””Canopy refuses to relay tangential files: if nothing clears the calibrated relevance
floor, it answers No strong match in this repository for …. If you know the thing
exists, sharpen the phrasing — put the symbol or file in backticks and name its kind
(“the function …”, “the file …”). If it still comes back empty, that is a real signal
the entity is not in the indexed repo.
See also
Section titled “See also”- One Tool: canopy_answer — the full shape list and how routing works
- How Canopy Works — the index and the server-side recipe chain
- Reference: MCP Tools — the tool’s input schema