Files
formulation/docs/agent-handoff.md
T
2026-08-14 18:24:33 -05:00

1.7 KiB

Agent handoff

Repository state

Development happens on dev; master is the deployable integration branch. Use Node.js 22 or newer and install dependencies with npm ci.

SQLite is the canonical writable store. YAML in culinary/ is portable seed and interchange data, not the live editing surface. Application and automated edits should use validated domain functions and transactions rather than unrestricted SQL or direct YAML changes.

Start from the committed seed data

npm ci
npm run db:reset
npm run dev:app

db:reset deletes the local database before importing culinary/. Do not run it when a newer SQLite database has been transferred from another installation.

Transfer the latest application data

The runtime database and its backups live under var/, which is intentionally ignored by Git. A clone therefore contains the application and portable seed, but not necessarily the latest recipe edits.

To hand off the current live state, create a consistent SQLite backup separately from Git:

npm run db:backup -- /safe/transfer/recipe-book.sqlite

Place the transferred file at var/recipe-book.sqlite on the receiving machine. The backup command uses SQLite's online backup API, includes committed WAL data, and refuses to overwrite an existing destination.

Validate a change

scripts/validate-content
npm run check:app
npm test
npm run build:app
git diff --check

The application supports a read-only deployment with FORMULATION_READ_ONLY=true. Ingredient bulk parsing additionally accepts FORMULATION_OLLAMA_URL and FORMULATION_INGREDIENT_PARSER_MODEL; USDA imports read USDA_FDC_API_KEY from the environment.