Short write‑ups of problems we hit running a real commerce operation and what we changed in the code because of them. No product announcements; just the reasoning.
The factory counts in units, the shop counts in boxes, and no amount of wishing makes 16 divide by 10. Rather than force one side to surrender, we named the exchange rate, converted at exactly two edges, and taught the system to say "one sealed box and six loose" out loud. Then we let small orders wait at the roadside until something bigger came past going the same way.
A dashboard that makes ordering easy invites dumping. What stops the purchaser ticking everything red and calling it someone else's problem - a hard cap built from measured deliveries, a shared warehouse split fairly, and a rule about never letting anyone edit the number that judges them.
Data can only predict the past. Our stock forecaster leans into that - measure the past honestly (including the days the shelf was empty), then say how wrong you might be.
Stock in aiku is never a number you set; it is the sum of movements you record — purchase, pick, return, transfer, production, found, write‑off, audit. How 88,000 stock items across 45,000 locations stay honest: a location‑stock row per bay, a picking location per item, audits as movements with a delta and a reason, a lock that stops a low count being audited mid‑pick, and the "error" naming rule that keeps a retired SKU from ever being picked again.
Weighted average cost and FIFO computed in one pass over the movement history, a group-level switch that decides which one is "official", and why LIFO is deliberately missing.
The same candle is one thing to the buyer, a box of twelve to the warehouse, and a litre of base to the factory. aiku models that with three corners — the trade unit (the physical thing), the stock (that thing, in this warehouse), the product (that thing, as sold in this shop) — and a number on every edge. Why a fraction is sometimes right and sometimes a bug, and why changing a number on an edge while an order is in flight is the most dangerous edit in the system.