Files
2026-08-19 11:03:16 +02:00

34 lines
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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.