# Implementation Plan: 001-weather-cli **Tech Stack**: Python 3.12+, `httpx` (HTTP client), `argparse` or `click` (CLI), `pytest` (Testing). ## 1. Research - **API Choice**: Use `openweathermap.org` (reputable, simple). - **Client**: `httpx` for async-capable HTTP requests. - **Contract**: Expected JSON response structure from OpenWeather API current weather endpoint. ## 2. Design - **Entities**: `CityWeather` dataclass (temp, condition, unit). - **Contract**: `WeatherService` interface. - **CLI Interface**: `fetch-weather --city [CITY] --units [metric|imperial]`. ## 3. Constitution Check - **Article II: Test-First**: Plan includes `pytest` for all units and services. - **Article V: Library-First**: Logic resides in `weather_fetcher/core.py`, CLI is a wrapper in `weather_fetcher/cli.py`. ## 4. Integration Scenarios - [ ] `WEATHER_API_KEY` set → Fetch weather for "London" → Success. - [ ] `WEATHER_API_KEY` missing → Fetch weather → Error message. - [ ] Invalid city "Asdfghjkl" → Error message.