docs(agents): point at the repairs spec — the repair flow is not in the code
This commit is contained in:
parent
e56cf01fdf
commit
7e8dcc74db
1 changed files with 28 additions and 0 deletions
28
AGENTS.md
28
AGENTS.md
|
|
@ -339,6 +339,34 @@ The preview popup is REUSED, not rebuilt: the service emits
|
|||
`SearchPreviewDialog` (`src/app/(app)/search/search-preview.tsx`), so
|
||||
the manager sees the same quick-overview the desk sees on /search.
|
||||
|
||||
# Repairs (`/repairs`) — the machine-repair job, and the phone app planned for it
|
||||
|
||||
The job runs: customer reports a broken machine → we collect it → the
|
||||
repairs person books it in (photos, serial number, whose machine it is,
|
||||
what the customer says is wrong, what the supplier must look at) → the
|
||||
driver carries the printed request to the supplier → the supplier keeps a
|
||||
copy, signs one and hands it back → supplier quote uploaded → customer
|
||||
quote → customer order → the buyer approves the order or rejects it and
|
||||
collects the machine back unrepaired.
|
||||
|
||||
**That flow is not in the code.** It came from the operator on 2026-11-05.
|
||||
Design: `docs/superpowers/specs/2026-11-05-repairs-app-design.md`. The
|
||||
planned phone app lives at `/repairs-app`, not built yet.
|
||||
|
||||
- Status vocabulary `new → assessing → quoted → approved → in_progress →
|
||||
completed` (+ `cancelled`) is guarded by `ALLOWED_TRANSITIONS` in
|
||||
`src/lib/server/repairs-service.ts`. The **labels are duplicated in
|
||||
three places** — `repairs/page.tsx`, `repairs/[id]/page.tsx` and the
|
||||
PDF map in `repairs-service.ts` — with three different sets of words.
|
||||
Don't add a fourth; the spec consolidates them into
|
||||
`src/lib/repair-status.ts`.
|
||||
- `repairs.order` and `orders.is_repair_order` **exist and are never
|
||||
written**. The order ↔ repair match is designed but not built.
|
||||
- A Repair Request is a **paper document for the supplier**, not a
|
||||
delivery note. Repairs do not flow through the customer-DN pipeline.
|
||||
- `createCustomerQuoteFromRepair` refuses to overwrite an existing
|
||||
`customer_quote` link unless `replace: true` is passed.
|
||||
|
||||
# The POS counter never sells at R0
|
||||
|
||||
The POS (`/api/v1/pos/catalog`) lists `stock_items` matching
|
||||
|
|
|
|||
Loading…
Reference in a new issue