# Bike Tour Constraint Planner CLI

## PURPOSE
Turn the spoken trip brief from the video into a reproducible command-line plan. In the clip the user stacks constraints at conversational speed: autumn, Frankfurt to Warsaw, 60 km a day, under 60 € per night, always with breakfast, via the Masurian region and Märkische Schweiz, with Szczecin as a stopover. This CLI accepts those constraints as flags and emits a day-by-day itinerary table you can export.

## WHY THIS MATTERS
The transcript's whole point is that the voice model holds several goals at once and reasons over them ("Okay. Now several thoughts at once."). A constraint planner is the deterministic, testable core behind that behaviour: given hard limits, produce a feasible stage plan. Students see how multi-constraint reasoning looks when written down as code instead of hidden in a prompt.

## HOW TO BUILD
1. Define the CLI surface with `Click`: `--from`, `--to`, `--km-per-day`, `--max-eur-per-night`, `--breakfast`, and repeatable `--via`.
2. Load the corridor towns (Frankfurt, Märkische Schweiz, Masurian region, Szczecin, Warsaw) into a `pandas` DataFrame with cumulative distance.
3. Slice the route into daily stages that never exceed `km-per-day`, forcing stops at required `--via` towns.
4. Filter overnight stays by budget and breakfast, then print and optionally `--out` a CSV.
Key snippet:

```python
def build_stages(route, km_per_day):
    stages, day, acc = [], 1, 0.0
    for seg in route:
        if acc + seg["km"] > km_per_day and acc > 0:
            day, acc = day + 1, 0.0
        acc += seg["km"]
        stages.append({**seg, "day": day})
    return stages
```

## WHEN TO USE IN PRODUCTION
Use it for self-guided tour products, logistics load planning, delivery route segmentation and any "fit this into units of a day with a budget cap" job. Do NOT use it when the user wants open-ended brainstorming or when there is no numeric constraint at all — that is a job for the voice model, not a deterministic planner.

## HOW IT HELPS STUDENTS
They practise Click command design, Pandas table shaping, greedy partitioning algorithms, and separating a numeric solver from an LLM layer. The result is a tool another service can call as a function.

## STARTER CODE
`starter/main.py` defines the Click command, a small corridor table, the stage-slicing function and a budget check, with `# TODO` markers where live distance and price lookups belong.
