Initial commit
This commit is contained in:
@@ -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.
|
||||
Reference in New Issue
Block a user