Your First Questions
Canopy exposes one tool, and phrasing picks the recipe: a deterministic router reads your question and dispatches it to the right answer path. Two rules get you precise answers every time:
- Name the entity type — “the function”, “the struct”, “the file”.
- Backtick paths and symbols —
`src/auth/session.ts`,`createSession`.
Try these from the CLI (or ask your agent the same things — it makes the identical call):
Find things
Section titled “Find things”canopy answer "where is the function \`createSession\` defined?"canopy answer "show \`RetryPolicy\` in \`src/lib/retry.ts\`"canopy answer "list functions defined in \`src/api/\`"Each returns file:line locations from the AST index — not a pile of grep
hits.
Trace impact (before you touch anything)
Section titled “Trace impact (before you touch anything)”canopy answer "what depends on \`src/payments/checkout.ts\`?"canopy answer "what should I know before editing \`src/core/config.ts\`?"canopy answer "what tests cover \`src/billing/\`?"The dependents answer is the blast radius — every file that imports the one you’re about to change. The pre-edit dossier combines dependents, coverage, and recent history into one answer.
Understand structure
Section titled “Understand structure”canopy answer "architecture overview"canopy answer "what does \`src/auth/session.ts\` do?"canopy answer "public surface of \`src/lib/db.ts\`"canopy answer "are there import cycles?"canopy answer "is \`src/utils/legacy.ts\` dead code?"Ask about history
Section titled “Ask about history”canopy answer "who last changed \`src/api/orders.ts\`?"When phrasing is vague
Section titled “When phrasing is vague”A question with no entity type and no backticks — “how does checkout work?” — falls back to semantic search over the embeddings. It works, but it’s the weakest recipe. If you know what kind of thing you’re asking about, say so: the specific shapes above are faster, cheaper, and more precise.
The habit that pays off
Section titled “The habit that pays off”Before any refactor, ask two questions:
what depends on
the-file-you're-changing?what tests cover
the-file-you're-changing?
Thirty seconds of blast-radius reading prevents the classic agent failure: confidently editing a file that fourteen other modules import, then breaking half of them. Your agent does this automatically once Canopy is wired in — the handshake instructions teach it to check before it edits.
- Concepts: One Tool — canopy_answer — every question shape and how routing works.
- Concepts: Phrasing Picks the Recipe — good/weak phrasing pairs for each shape.