feat(shopping-list): add --pantry and --ignore-pantry flags#340
Conversation
Adds spec for --pantry and --ignore-pantry flags on the shopping-list command, mirroring the existing --aisle handling.
When --pantry is passed explicitly, surface read failures as errors instead of silently warning and producing an unfiltered list. Auto- discovered pantry paths still fall through silently, since absence is expected. Also remove the docs/superpowers/ planning artifacts that were inadvertently committed with the feature. Co-authored-by: Claude <noreply@anthropic.com>
Code Review — feat(shopping-list): add --pantry and --ignore-pantry flagsOverviewThis PR adds two new flags to What works well
Issues and suggestionsMinor:
|
Summary
--pantry <path>tocook shopping-list, mirroring the existing--aisle <path>. Overrides the auto-discovered pantry file.--ignore-pantryboolean flag that skips pantry loading and subtraction entirely.--ignore-pantrywins (no file I/O on the explicit path).Test plan
cargo fmt,cargo clippy --all-targets -- -D warnings,cargo buildall cleancook shopping-list --base-path ./seed "Salads/Caprese.cook"subtracts pantry items (fresh basil,olive oil) as before--ignore-pantry: pantry-only ingredients reappear at full recipe quantities--pantry /tmp/test-pantry.conf: custom file overrides auto-discovery (only items in the custom file are subtracted)--ignore-pantry --pantry /does/not/exist.conf: succeeds, no read attempt, same output as--ignore-pantryalonecook shopping-list --helpshows both new flags