Smith::Mentions
@path in a prompt pulls the file into the first request.
Without it the model spends a full provider roundtrip on read_file to
reach a path the user already named โ and guesses at paths when it gets
them wrong. The @path stays in the text so the sentence still reads;
the content is appended below it.
Kept out of Skills::Catalog on purpose: expanding skills and reading files
are different jobs, and expand_prompt is already dense enough.
Constants
@ only counts at the start of a word, which is what keeps
foo@bar.com from being read as a mention. Either a quoted path โ for
spaces โ or a run of non-whitespace.
How much of a file to look at when deciding whether it is text.
A path is rarely the last thing in a sentence, so trailing sentence punctuation is not part of it. A trailing slash is: it is what marks a directory listing.