# MySafePetFood catalogue operations

## Data model

Google Sheets is the editorial source, not a secret store. Publish only a clean `PublishedCatalogue` tab as CSV. Keep bot working notes and reviewer comments in a separate non-published sheet. A visitor downloads the public catalogue, so it must not contain private data.

One row = one product formula for one country and one pet type. The matching key is `country:id`. Preserve IDs across edits; create a new ID when a distinct formula or SKU is introduced. Size variants with identical country-specific labels can share a formula record; retailer links must point to that formula. A redesign or old stock can have a different formula: document it and verify the current product.

Required CSV columns:
`id,brand,recipe,pet,country,life_stages,format,ingredients,ingredients_complete,ambiguity_reviewed,source_url,availability_url,checked_at,reviewed_by,status,amazon_url,walmart_url`

Values are case-sensitive. Booleans are `true` or `false`. Status must be `approved` to appear. Use `draft`, `needs_review`, or `retired` otherwise. `pet`: dog/cat. `country`: CA/US. `format`: wet/dry. `life_stages`: growth/adult/senior, pipe-separated where evidenced. Senior is a manufacturer category; never infer it from an arbitrary age. Growth must be supported by the exact nutritional adequacy statement. Large-breed growth restrictions must be checked outside this simple finder; it does not claim breed-specific suitability.

The client does not automatically scrape manufacturers. It fetches a configured, public CSV on page load. Sheets publication caching and browser CORS behaviour can delay or block updates. Validate the CSV, then set `dist/config.json` > `catalogue_csv_url` and deploy for site-wide use. The catalogue page's local overrides affect one browser only. Never treat it as a secure admin dashboard.

## Bot research prompt (Grok or other research agent)

You are gathering product facts for MySafePetFood. Research official manufacturer product pages and country-specific manufacturer labels first. Use retailers as local availability evidence and as secondary label cross-checks. Do not infer ingredient absence from the recipe title, front-of-pack claims, a `limited ingredient` category, or the first few listed ingredients. Do not infer Canadian availability from a US listing or brand distribution alone.

For each candidate food:
1. Capture the exact product name, species, wet/dry format, country, full ingredient declaration including all parenthetical subingredients, nutritional adequacy statement, manufacturer URL, dated label evidence, local retailer URL, and country-specific Amazon/Walmart product URLs if found.
2. Preserve exact ingredients. Do not abbreviate, rewrite, silently remove additives, or substitute an old cached formula. Flag conflicting labels and ambiguous flavours or animal sources for review.
3. Put all new/changed candidates in `DraftQueue` with `status=draft`, `ingredients_complete=false`, `ambiguity_reviewed=false`, and blank `reviewed_by`. Never mark your own research approved. Do not modify the published catalogue automatically.
4. Never invent availability, stock, price, affiliate IDs, product URLs, review dates, or nutritional suitability. If a fact is unavailable, leave it blank and flag the row. Capture a retrieval date in private research notes, not as a human approval date.
5. Deduplicate by species, country and exact formula, retaining stable IDs. Send changed ingredient hashes, removed products and label conflicts into `ChangesForReview`. Keep the previous published record until a reviewer updates or retires it; retire stale approvals after 90 days.

Recommended private working columns: retrieved_at, country_label_url, label_snapshot_url, ingredients_hash, nutritional_statement, large_breed_growth_notes, ambiguity_notes, change_summary, reviewer_notes. They are not consumed by the current client.

## Human approval

- Confirm full ingredients against the current manufacturer label for that country.
- Verify nutritional adequacy and stage; do not publish complementary foods or toppers as complete meals.
- Check a local listing for the exact formula. Verify country domains on shopping links. A listing is evidence of market presence, not a live stock guarantee.
- Record review date `YYYY-MM-DD` and a non-personal reviewer alias. Set both completion flags true only after checks. Set status approved last.
- Approvals expire after 90 days. Future dates, unknown stages/formats, duplicates, incomplete rows and wrong-country retailer links are held out.
- Mark all duplicate rows for review, including the first occurrence. Import validation rejects the complete duplicate key group.

## Matching policy

Exact matches keep country, pet, stage and food format fixed. Any selected ingredient alias in the complete ingredient text is a conflict. Chicken fat is excluded when chicken is selected; no assumption about tolerated purified oils. Fish includes named fish and fish oils. Unspecified poultry is handled conservatively for poultry exclusions. Custom exclusions check the exact normalized phrase only and do not promise derivative coverage.

Unspecified flavours, meat/animal ingredients and relevant unidentified fish species hold a record out of exact matches and closest comparisons when exclusions are active. Human review cannot override this runtime ambiguity check. Unclear sources need manufacturer clarification before recommendations can be useful.

No exact matches: show up to six candidates with the fewest conflicts, explicitly labelled `contains excluded ingredients`, and list every selected conflict. These are comparisons, never safe alternatives. If all candidates are uncertain, show no comparisons. Do not relax country, stage or food type silently.

The engine is conservative and not exhaustive. It cannot establish medical suitability or detect cross-contact and undeclared ingredients. Its alias list requires ongoing editorial maintenance. Website labels must not claim guaranteed allergy safety.

## Initial catalogue growth plan

Begin with high-demand limited-ingredient lines, then mainstream foods, country by country. Suggested research targets include Natural Balance, Wellness, Instinct, Blue Buffalo, Purina, Hill's, Royal Canin, ACANA, ORIJEN, GO! Solutions, NOW FRESH, Open Farm, FirstMate, NutriSource, CANIDAE, Merrick, Weruva and Tiki Cat. This is a research target list, not a verified availability statement. Vet/prescription diets require additional rules and are not in the initial catalogue.

Batch work by brand + country + species. Start with 100 fully reviewed formulas before growing to 1,000+, rather than publishing a large incomplete ingredient dump. Maintain a change log and queue weekly label checks. No bot or scheduled automation has been connected by this website build.

## Monetization

Use country-specific programme-approved Amazon/Walmart URLs in the optional retailer fields. Never invent an affiliate tracking ID. Retailer search URLs are acceptable as a temporary fallback but should be marked and checked by editors; exact product URLs are preferred. Do not add paid scoring factors to the organic matching engine.

The reserved ad slot currently serves no ads and makes no network calls to ad providers. Integrating a real ad network, analytics or email marketing requires provider setup and accurate privacy/consent behaviour. Sponsored content must be labelled and separate from food matches.

## Photo credits

Editorial pet photographs sourced from Unsplash:
- https://images.unsplash.com/photo-1543466835-00a7907e9de1
- https://images.unsplash.com/photo-1514888286974-6c03e2ca1dba

No photograph represents a product endorsement.
