seasonal-anomaly-detector
v4
● Active in prod
forecasting
anomaly-detection
weather
Skill content · v4
seasonal-anomaly-detector v4SKILL.md · 28 lines · 1.4 KB
Purpose
Forecast weekly demand at SKU-region level and emit early markdown alerts when seasonal demand diverges from baseline.
Procedure
When forecasting weekly demand for SKU-region pairs:
- Compute prior-12-month baseline.
- Compare prior-12 vs prior-24 month YoY shape — flag shape divergence.
- Cross-reference NOAA regional weather forecast deltas.
- Apply seasonal index from regional norms (NRF 2024).
- If forecast deviates from baseline by >40%, flag for review.
- Emit
markdown_alertas soon as YoY shape diverges by >2σ AND weather signal supports (precipitation/temp anomaly).
Inputs (tools the agent must call)
query_sap_sales(sku, region, years=4)— historical salesfetch_noaa_weather(region, weeks_ahead=12)— weather forecast deltasget_inventory_status(sku, store)— current inventory
Outputs
fire_markdown_alert(sku, region, severity, recommended_discount_bp)- Forecast value with confidence interval and citations
— end of skill · retention contract follows below —
Retention contract
What state this skill keeps across turns. Violations are caught by eval case #126 — the agent must re-fetch
weather_signals each turn or the test fails.
regional_norms
Keep across turns within session · invalidate on session end · NRF data is stable per quarter
eval #98
prior_baseline
Keep until SKU context changes · re-compute when forecasting a new SKU-region
eval #97
weather_signals
Re-fetch each turn · do not retain stale · weather updates hourly
eval #126
Recent eval results
Last full run: 12 / 12 passing · 2h ago · 18s
·
All-time best: 12 / 12 (v4)
·
Confidence: high · 0 retention violations