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 optimizeArchitecture
Rendering diagramβ¦
π 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)
| Primitive | What It Does |
|---|---|
agent.md | Root orchestrator with builderβreviewerβtuner handoffs |
copilot-instructions.md | Inventory domain (demand forecasting, safety stock, promotion effects) |
| 3 agents | Builder (gpt-4o), Reviewer (gpt-4o-mini), Tuner (gpt-4o-mini) |
| 3 skills | Deploy (220+ lines), Evaluate (115+ lines), Tune (235+ lines) |
| 4 prompts | /deploy, /test, /review, /evaluate with agent routing |
Cost Estimate
| Service | Dev/Test | Production | Enterprise |
|---|---|---|---|
| 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)
| Aspect | Play 87 | Play 89 |
|---|---|---|
| Focus | Price optimization | Inventory replenishment |
| Model | Elasticity (priceβdemand) | Demand forecasting (time-series) |
| Output | Optimal price per product | Reorder point + order quantity |
| Promotion | Price point A/B testing | Demand lift + post-promo dip |
π Full documentation Β· π frootai.dev/solution-plays/89-retail-inventory-predictorΒ Β· π¦ FAI Protocol
FAI Manifest
| Field | Value |
|---|---|
| Play | 89-retail-inventory-predictor |
| Version | 1.0.0 |
| Knowledge | T3-Production-Patterns, O5-AI-Infrastructure, F1-GenAI-Foundations |
| WAF Pillars | cost-optimization, reliability, operational-excellence, performance-efficiency |
Last updated on