# Roadmap

Build in this order. Each step is one PR and passes the four gates.

## M0 — Scaffold and run

- [ ] Scaffold `ezyorder` (webhooks, i18n), commit, copy `.ai/` and `.claude/agents/`
- [ ] `.env.local` filled from the portal; `pnpm dev` signs in as admin and viewer (mock OIDC)
- [ ] Rename app name / title in `messages/*.json` (`app_name` → "EzyOrder")
- [ ] Check the activity catalog through MCP; resolve the open questions in `context.md`

**Done when:** `/orders` lists the activity's orders on recette; `/health` and `/ready` answer.

## M1 — Order entry

- [ ] Extend the reference push form to multi-line orders (lines editor)
- [ ] Fields required by the activity's composed `order.created` schema
- [ ] Rehearse → Push flow, Problem display, link to the created order

**Done when:** an admin creates a multi-line order on recette and sees it in `/orders/$key`;
a viewer cannot reach or call the push.

## M2 — Receipt notice entry

- [ ] `src/server/procurement-push.ts` + tests (see `workflows.md`)
- [ ] `/procurements/new` form: supplier, planned date, fulfilment location, lines
- [ ] Optional: SKU picker backed by `listProductVariant`

**Done when:** an admin announces a receipt on recette and it appears in `/procurements/$key`.

## M3 — Receipt notice reads

- [ ] `/procurements` list with filters (reference, supplier, planned date)
- [ ] `/procurements/$key` detail with timeline and related entities

## M4 — Deliveries

- [ ] Handlers for `order.created`, `procurement.created`, `receipt.confirmed`
      (idempotent; what they do is to be decided — notification, local status, …)
- [ ] Webhook registered on recette; deliveries visible in the feed

## M5 — Ship

- [ ] Docker image built in CI; `docker compose --profile app` against a real OIDC issuer
- [ ] Optional `deployment-helm`; secrets via `existingSecret`
- [ ] Prod values for `EZYFLOW_API_URL` / `EZYFLOW_TOKEN_URL` obtained from Ezytail (never guessed)
