Render writes a map as text for a prompt: a header, then the entries in rank order until the budget of tokenBudget tokens (about four characters each, DefaultTokenBudget when it is 0 or less) is reached. A nil map renders as an empty string.
Build scans the repository under opts.Root, keeps the Go source files (not the tests nor the generated files) that declare or import something, ranks them, favouring opts.FocusFiles and opts.FocusSymbols, and returns the map. Cancelling ctx stops the scan.
type Options struct {
Root string TokenBudget int FocusFiles []string FocusSymbols []string}
Options configures a repository map: the directory to map (the working directory when empty), the budget in tokens of the rendered map, and the files and symbols that the ranking should favour.