Initial commit

This commit is contained in:
2026-08-19 11:03:16 +02:00
commit e8c8224b05
35 changed files with 1806 additions and 0 deletions
@@ -0,0 +1,33 @@
# Implementation Plan: 001-pantry-meal-planner
*Created: 2026-08-18*
Turn the spec into concrete technical decisions. Stay minimal: prefer the
simplest structure that satisfies the spec, and justify anything that isn't.
## Technical Context
- Language: Python 3 (stdlib only)
- Dependencies: none at runtime; pytest for tests
- Storage: two JSON files in the project dir — pantry.json, recipes.json
(starter set written on first run)
- Testing: pytest, TDD; planner logic tested against handwritten pantries
## Structure
```
pantry_planner/
planner.py # pantry CRUD, plan generation, shopping list derivation
cli.py # argparse: pantry add/remove/list, plan, shoplist
recipes.json # bundled starter set (10 recipes)
tests/test_planner.py
```
## Decisions
- D1: Greedy day-by-day plan generation with stock simulation — because R2 only
demands feasibility, not optimality; rejected: constraint solver (overkill).
- D2: JSON files over SQLite — because two flat collections with <1k entries
need no queries; rejected: SQLite (adds schema/migration weight).
- D3: Shopping list = sum(plan needs) stock, clamped at 0 per item (R3) —
computed on demand, never stored; rejected: persisting derived data.