# AGENTS.md — SmartPantry App Repo

Guidance for AI agents working in this repository.

## What this repo is

This is the **new, FreshVibe-compliant SmartPantry**. Generated from a Recipe
Book. Replaces the legacy Firebase-based SmartPantry that lived at
`avidtech6/Smart-Pantry` (deleted 2026-07-03, replaced by this repo).

## What to do here

1. **Read `recipe-book/` first.** It's the source of truth. The `app/` folder
   is rendered from it. Never edit `app/` directly — re-render from the
   Recipe Book.

2. **The de-Google'd source is at `/workspace/smartpantry-defirebased-archive/smartpantry-defirebased.html`**.
   That file is the working reference until the new app is proven to match.
   Don't delete it.

3. **Build artifacts go in `app/`**. Recipe Book contents go in `recipe-book/`.
   Tests go in `tests/`. Documentation goes in `docs/`. Everything else needs
   a justification.

## What NOT to do

- **Don't add Firebase, Firestore, or any external service.** The whole point
  of the rebuild is no external dependencies. localStorage and IndexedDB only.
- **Don't depend on FreshVibe Studio.** The app must run standalone.
- **Don't bypass the Recipe Book.** Per FWV v8, every change goes through
  the Recipe Book. Edit the Recipe Book, re-render, commit.
- **Don't lose the user's data.** Per doctrine, the original data is never
  lost. The new app reads the de-Google'd source's data format if possible.

## Layout reference

```
recipe-book/
  pantry/             # module 1: pantry inventory
  shopping/           # module 2: shopping list
  recipes/            # module 3: recipes
  mealplan/           # module 4: meal planning
  manage/             # module 5: household / settings
  landing/            # module 6: home / landing page
  app-pact/           # rules
  app-dna/            # identity + lineage
  app-trace-atlas/    # UI ↔ behaviour mapping

app/
  index.html          # rendered home
  manifest.json
  assets/

tests/
  visual-match.test.js
  feature-parity.test.js
  data-roundtrip.test.js
```

## Lanes

This repo is owned by **🟢 fvre** (the Recipe Engine driver). If you need
FreshVibe Studio chrome work, route to 🟣 chrome. If you need Card
substrate work, route to 🟠 cards. Don't do cross-lane work uninvited.

## Provenance

- Built by: Mavis (🟢 fvre)
- Started: 2026-07-03
- Source: `/workspace/smartpantry-defirebased-archive/smartpantry-defirebased.html`
- Doctrine: `avidtech6/freshvibestudio/pact/freshvibe-way-v8/`