WFDASH-WEBAPP/docs/superpowers
Dave 4babb893f4 docs(spec): giellie stock quantity update
Giellie can already reach stock_items, but only through ad-hoc
list+adjust loops: a signed delta instead of an absolute count, no
batch call, fuzzy SKU picks the model cannot see are wrong, and
stock_items.adjust throws the actor away so the ledger row has no
attribution.

Adds a stock_items.set_quantities MCP tool that resolves each pasted
line (exact SKU, then description fuzzy), computes the delta, and
writes through updateStockItemsQuantities so the ledger is audited
against the signed-in user. Also mirrors price_list.stock_qty, which
price-list-service.ts documents as a denormalised snapshot of
current_qty.

The live data makes this matter: 522 of the 4,083 sellable items carry
a negative tracked quantity and 2,901 sit at zero. That drift is by
design - the till oversells on purpose (pos-service.ts:603) and is
corrected at the next stocktake, which is what this feature is.

Nothing blocks on low stock. One service flag (allowNegativeQty)
lifts the non-negative floor for the agent's writes only, leaving the
/stock page untouched.
2026-11-05 06:46:19 +02:00
..
plans feat: add item supplier payments and approvals queue 2026-11-03 01:27:07 +02:00
smoke-tests docs(item-history): add manual smoke-test checklist for 4 env-var modes 2026-07-29 15:16:40 +02:00
specs docs(spec): giellie stock quantity update 2026-11-05 06:46:19 +02:00