Planning only: proposal, delta specs, design and tasks. No code yet.
This is the last substantive in-scope box in docs/TBD-migrate-wave.md. Wave 1
removed the brand facet and the sales/comments sorts for want of a model; sales
are derivable from order_items and a brand model is a table plus a column, so
both come back for real.
Decisions recorded in the design:
- brands are reference data in their own table with a nullable products.brand_id
and an ordered replace endpoint, mirroring categories and storefront content
- a "sale" is a unit on an order that reached payment; pending and cancelled
orders do not count, so an abandoned checkout cannot inflate the figure
- sold_count is computed per read rather than stored, so it cannot drift from
the orders that produced it
- the review UI is removed rather than relabelled: the mall attributes invented
comments to named shoppers and shows a "good rate", which a migration that
makes everything else real has no business keeping on screen. Reviews are
recorded as a separate future capability
openspec validate --strict passes and the change is ready to apply.