Skip to Content
Solution PlaysPlay 89: Play 89 — Retail Inventory Predictor 📦

Play 89 — Retail Inventory Predictor 📦

AI demand forecasting — SKU-level prediction, dynamic safety stock, promotion modeling, automated replenishment, stockout prevention.

Build a retail inventory prediction system. LightGBM forecasts demand per SKU × store with promotion/weather/event features, dynamic safety stock adapts to demand variability, Croston handles slow movers, and event-driven replenishment triggers purchase orders before stockout.

Quick Start

cd solution-plays/89-retail-inventory-predictor az deployment group create -g $RG -f infra/main.bicep -p infra/parameters.json code . # Use @builder to implement, @reviewer to audit, @tuner to optimize

Architecture

📐 Full architecture details

Pre-Tuned Defaults

  • Forecast: LightGBM · 14-day horizon · daily updates · 20+ features · Croston for slow movers
  • Safety Stock: Dynamic · z-score based · 95% service level default · category overrides
  • Promotions: 5 promo types with lift + post-promo dip · cannibalization modeling
  • Reorder: Event-driven · per-supplier lead time · 20% promo buffer · emergency supplier

DevKit (AI-Assisted Development)

PrimitiveWhat It Does
agent.mdRoot orchestrator with builder→reviewer→tuner handoffs
copilot-instructions.mdInventory domain (demand forecasting, safety stock, promotion effects)
3 agentsBuilder (gpt-4o), Reviewer (gpt-4o-mini), Tuner (gpt-4o-mini)
3 skillsDeploy (220+ lines), Evaluate (115+ lines), Tune (235+ lines)
4 prompts/deploy, /test, /review, /evaluate with agent routing

Cost Estimate

ServiceDev/TestProductionEnterprise
Azure OpenAI$25 (PAYG)$300 (PAYG)$1,100 (PTU Reserved)
Azure Machine Learning$15 (Basic)$350 (Standard)$1,000 (Standard GPU)
Cosmos DB$3 (Serverless)$120 (2000 RU/s)$450 (8000 RU/s)
Azure Event Hubs$12 (Basic)$150 (Standard)$600 (Premium)
Azure Functions$0 (Consumption)$180 (Premium EP2)$450 (Premium EP3)
Container Apps$10 (Consumption)$150 (Dedicated)$400 (Dedicated HA)
Key Vault$1 (Standard)$5 (Standard)$15 (Premium HSM)
Application Insights$0 (Free)$35 (Pay-per-GB)$120 (Pay-per-GB)
Total$66/mo$1,290/mo$4,135/mo

💰 Full cost breakdown

vs. Play 87 (Dynamic Pricing Engine)

AspectPlay 87Play 89
FocusPrice optimizationInventory replenishment
ModelElasticity (price↔demand)Demand forecasting (time-series)
OutputOptimal price per productReorder point + order quantity
PromotionPrice point A/B testingDemand lift + post-promo dip

📖 Full documentation · 🌐 frootai.dev/solution-plays/89-retail-inventory-predictor  · 📦 FAI Protocol

FAI Manifest

FieldValue
Play89-retail-inventory-predictor
Version1.0.0
KnowledgeT3-Production-Patterns, O5-AI-Infrastructure, F1-GenAI-Foundations
WAF Pillarscost-optimization, reliability, operational-excellence, performance-efficiency
Last updated on