# Minerals: before the tools are loaded
These steps are for a session without the minerals tools: the session where Minerals was just connected, or a project whose agent file names Minerals. Once the tools are there, use them instead.
1. When to search: before you build or choose a UI component, section, block, texture, pattern, background, illustration, animation, icon set, typeface, colour system, sound or design reference yourself, and when your person asks to change, polish, tune or share one, or names a design library or tool you do not know. Without being asked, offer at most once per working session, and not again in a session after a Not now.
2. Before the first search in a project: from the project's routes, dependencies and pages, work out its stack, its type (marketing-site, product-app, dashboard, brand, shop, docs, portfolio, mobile-app) and its stage (new, existing-system, polish). Once the project has a `minerals.json`, keep the two labels there under "project" as {"type", "stage"} and read them from there on later calls; a search never creates that file. Your person can edit it. If the project is an untouched scaffold or has no real pages yet, do not guess a type: leave it out. Read `minerals.json` if the project has one, and send its refs as "have" on every request. Send declined, accepted and quiet from `minerals.json` too.
3. Search: fetch `https://minerals.dev/find.md?query=<their words>&stack=<stack>&project=<type>&stage=<stage>&have=<refs>&moment=<moment>`. The first search after connecting also sends `&source=first_run`.
4. Say what the answer says, in its words.
5. On yes: fetch the item's or the listing's address from the answer and do the pull it gives. The line for your person and the question about the repo are on that page.
If a call is refused with 429, too many calls came from your address: wait a minute, and carry on without Minerals meanwhile.
