charlieviettq/awesome-agent-skill / .claude/skills/algo-sc-bullwhip
"algo-sc-bullwhip"
Verified"Analyze and mitigate the bullwhip effect where demand variability amplifies upstream in supply chains. Use this skill when the user needs to diagnose order variability amplification, quantify the bullwhip ratio, or implement dampening strategies — even if they say 'why are our orders so volatile', 'supply chain variability', or 'demand amplification problem'.".
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.4 KB |
| examples/sample_scenario.md | markdown | 5.6 KB |
| references/bullwhip-model.md | markdown | 7.7 KB |
| references/information-sharing.md | markdown | 11.6 KB |
references/information-sharing.md
View on GitHub# Information Sharing Strategies for Bullwhip Dampening
Information asymmetry is the root enabler of the bullwhip effect. Each tier forecasts demand independently, using only its own order signals rather than true consumer demand. Sharing downstream data upstream collapses this information gap — but does not eliminate amplification entirely.
---
## Why Information Sharing Works: The Variance Math
The classic Lee-Padmanabhan-Whang result (1997) shows that when a retailer uses a simple moving average (MA) of order-up-to policy, the bullwhip ratio contributed by demand signal processing alone is:
```
BWR_DSP = Var(orders) / Var(demand)
= 1 + (2L/p) + (2L²/p²)
```
Where:
- `L` = replenishment lead time (periods)
- `p` = moving average window length (periods)
**Key insight:** The ratio depends only on `L/p`. Longer lead times inflate BWR; longer averaging windows dampen it — but both are limited by operational constraints.
When the retailer shares **Point-of-Sale (POS) demand data** directly with the upstream tier:
```
BWR_with_POS = 1 + (2L_info/p) + (2L_info²/p²)
```
Where `L_info` = information lead time (typically 0–1 day with EDI/API), replacing the physical replenishment lead time `L` in the forecasting step.
**Worked example:**
- Physical lead time L = 4 weeks
- Moving average window p = 8 weeks
- Demand CV = 0.10
Without POS sharing:
```
BWR = 1 + (2×4/8) + (2×16/64) = 1 + 1.0 + 0.5 = 2.5
Orders CV = 0.10 × √2.5 = 0.158
```
With POS sharing (L_info = 0):
```
BWR = 1 + 0 + 0 = 1.0
```
In practice, L_info ≈ 1 day, not zero. But even at L_info = 0.14 weeks:
```
BWR ≈ 1 + (0.035) + (0.0006) ≈ 1.04
```
**POS sharing nearly eliminates the demand-signal-processing component of bullwhip**, reducing it from 2.5× to ~1.04×. The remaining amplification comes from batch ordering and lead-time variability — not from forecasting lag.
---
## The Three Tiers of Information Sharing
Ranked by implementation complexity and bullwhip-dampening power:
### Tier 1: POS Data Sharing
**What:** Retailer transmits daily sell-through data to distributor and manufacturer.
**Mechanism:** Upstream tiers forecast from actual consumer demand, not from retailer order patterns. Eliminates demand signal processing amplification.
**Dampening effect:** Eliminates BWR_DSP component entirely (see math above). Does NOT eliminate batch-ordering or shortage-gaming components.
**Implementation requirements:**
- EDI or API integration between retailer POS system and supplier ERP
- Agreed data format (SKU, UPC, daily/weekly units)
- Data latency SLA (typically T+1 day)
**Cost:** Low-moderate. Primarily IT integration. Main barrier is competitive sensitivity — retailers may resist sharing sales data with suppliers.
**When it fails:** If the upstream supplier still uses batch ordering (e.g., weekly purchase orders), POS data sharing reduces forecast error but doesn't eliminate the order-batching amplification. BWR from batching is roughly:
```
BWR_batching ≈ 1 + (Q/2μ)² [for batch size Q, mean demand μ per period]
```
This is unaffected by information sharing alone.
---
### Tier 2: Inventory Position Sharing
**What:** All tiers share current inventory-on-hand, on-order quantities, and stockout events in real time.
**Mechanism:** Upstream tiers can see downstream inventory depletion before it triggers an order. They can pre-position stock, reducing the reactive order spike.
**Additional dampening beyond POS:** Upstream can distinguish "retailer ordered because they're stocking out" from "retailer ordered for cycle replenishment." This reduces emergency order spikes.
**Decision rule for upstream tier with inventory visibility:**
```
IF (downstream_inventory < safety_stock_threshold) AND (no_order_received):
→ Pre-ship or stage inventory proactively
IF (downstream_inventory > 1.5 × target_inventory) AND (order_received):
→ Flag as potentially inflated order; hold or partial-fulfill pending review
```
**Implementation requirements:**
- Real-time WMS/ERP integration across tiers
- Agreed inventory metrics (what counts as "on-hand" vs. "in-transit")
- Trust: suppliers see retailer inventory levels, which reveals competitive positioning data
---
### Tier 3: CPFR (Collaborative Planning, Forecasting, and Replenishment)
**What:** Structured process where retailer and supplier jointly create a single demand forecast and replenishment plan, resolving exceptions collaboratively.
**CPFR process (VICS standard, 8 steps):**
```
1. Front-end agreement — define collaboration scope, metrics, escalation rules
2. Joint business plan — align on promotions, seasonality, product launches
3. Sales forecast creation — retailer generates baseline
4. Sales forecast collaboration — supplier reviews, flags exceptions
5. Order forecast creation — convert to order plan with lead time adjustments
6. Order forecast collaboration — both parties resolve exceptions
7. Order generation — execute agreed orders
8. Exception management — ongoing monitoring against agreed thresholds
```
**Exception thresholds (typical):**
| Metric | Exception trigger |
|--------|------------------|
| Forecast vs. actual variance | > ±20% for 2 consecutive weeks |
| Order forecast vs. sales forecast | > ±15% (signals emerging bullwhip) |
| Fill rate | < 95% for priority SKUs |
| Days of supply | < 2 weeks or > 8 weeks |
**Bullwhip impact:** CPFR addresses all four root causes simultaneously:
- Demand signal processing → joint forecast eliminates independent forecasting
- Order batching → synchronized order calendar reduces MOQ-driven batching
- Price fluctuations → promotional calendar is shared in advance; no surprise forward buying
- Shortage gaming → committed allocation quantities eliminate incentive to inflate
**CPFR is the only mechanism that systematically addresses shortage gaming.**
---
## Shortage Gaming: Why Information Sharing Alone Is Insufficient
When supply is tight, rational buyers inflate orders to secure allocation. When supply recovers, mass cancellations follow. This dynamic is NOT solved by POS data sharing or inventory visibility alone — buyers game the system regardless of what data is shared.
**The only structural fix for shortage gaming:**
```
Proportional Allocation Rule:
Allocation_i = min(Order_i, k × historical_demand_i)
where k is a system-wide fill ratio
```
This removes the incentive to inflate: a buyer who orders 200% of their historical demand gets no more than a buyer who orders 100%.
**Committed-quantity contracts** reinforce this: buyers lock in a quantity forecast 4–8 weeks ahead. Changes within the lead time window are penalized. This forces honest demand signaling.
**Implementation note:** Committed-quantity contracts require the supplier to offer a price or service-level incentive for commitment. Without it, buyers prefer flexibility over commitment.
---
## VMI (Vendor-Managed Inventory): Information Sharing as Control Transfer
VMI is the extreme case: the supplier takes over replenishment decisions entirely, using the retailer's inventory and sales data.
**Under VMI:**
- Retailer shares POS data and inventory levels daily
- Supplier sets order quantities and timing
- Retailer loses order autonomy but gains: reduced stockouts, lower ordering cost, no bullwhip from their side
**BWR under VMI:** Theoretically approaches 1.0 at the retailer→supplier interface, because there are no longer two independent forecasters — only one (the supplier).
**VMI decision criteria:**
| Condition | VMI suitable? |
|-----------|--------------|
| High-velocity, stable SKUs | Yes |
| Supplier has better demand visibility than retailer | Yes |
| Supplier has capacity to manage many retailer locations | Required |
| Product is highly promotional | Caution — promotions need joint planning |
| Retailer has competitive sensitivity about sales data | Barrier |
| Multiple suppliers competing for same shelf space | No — conflict of interest |
**VMI does NOT eliminate bullwhip if:** the supplier uses batch ordering internally to fulfill VMI replenishments. The bullwhip shifts upstream (from retailer→distributor to distributor→manufacturer). Full VMI value requires synchronized replenishment across all tiers.
---
## Choosing the Right Strategy: Decision Framework
```
Step 1: Identify dominant root cause from SKILL.md Phase 2 analysis
→ If BWR driven primarily by demand_signal_processing (contribution_pct > 40%):
Start with POS data sharing (Tier 1). Fastest ROI.
→ If BWR driven primarily by order_batching (contribution_pct > 40%):
POS sharing helps little. Address MOQ negotiation, order frequency.
Consider VMI to remove batch-ordering incentive.
→ If BWR driven by price_fluctuations:
CPFR with promotional calendar sharing. Eliminate surprise promotions.
Investigate everyday-low-pricing (EDLP) vs. Hi-Lo pricing strategy.
→ If BWR driven by shortage_gaming:
Implement proportional allocation + committed-quantity contracts.
Information sharing without allocation rule changes is insufficient.
Step 2: Assess relationship maturity
Low trust / transactional → POS sharing only (low exposure)
Medium trust / established → Inventory position sharing
High trust / strategic partnership → CPFR or VMI
Step 3: Estimate residual BWR after intervention
POS sharing eliminates BWR_DSP component.
Compute remaining: BWR_remaining = BWR_batch × BWR_shortage_gaming
If BWR_remaining > 1.5, additional structural interventions needed.
```
---
## Quantifying the Value of Information Sharing
For a cost-benefit analysis, estimate inventory savings from bullwhip reduction:
**Safety stock reduction:**
```
SS = z × σ_demand × √L
Where σ_demand is the standard deviation of demand observed by upstream tier.
Without POS sharing: upstream observes σ_orders (inflated by bullwhip)
With POS sharing: upstream observes σ_consumer_demand (true)
Safety stock reduction = z × (σ_orders - σ_consumer_demand) × √L
Inventory savings ($/year) = SS_reduction × unit_cost × holding_rate
```
**Worked example:**
- Lead time L = 4 weeks
- σ_orders = 320 units/week (from bullwhip)
- σ_consumer_demand = 180 units/week (true)
- z = 1.65 (95% service level)
- Unit cost = $50, holding rate = 25%/year
```
SS_reduction = 1.65 × (320 - 180) × √4 = 1.65 × 140 × 2 = 462 units
Annual savings = 462 × $50 × 0.25 = $5,775 per SKU per upstream tier
```
Scale across SKUs and tiers to size the business case for IT integration investment.
---
## Failure Modes to Watch
**Selective sharing:** Retailers share aggregate data but withhold SKU-level or store-level detail. Upstream forecasts improve modestly but not enough to eliminate bullwhip at the SKU level where stockouts occur.
**Latency kills value:** POS data shared weekly is nearly as bad as no sharing for fast-moving items. Sharing must be daily (T+1) minimum; near-real-time for high-velocity SKUs.
**Gaming the shared data:** Buyers may manipulate reported inventory levels to secure more replenishment. Audit trails and supplier-side inventory sensing (via IoT or cycle counts) are the countermeasure.
**Misaligned incentives:** A distribution center manager measured on fill rate will still batch orders to reduce ordering frequency, regardless of POS data availability. Structural incentive alignment must accompany information sharing programs.
**Trust decay:** CPFR and VMI require sustained bilateral commitment. When a supplier misses a fill-rate target, the retailer reverts to safety-stock inflation and order batching — undoing years of collaboration. SLAs with explicit penalties and remediation steps are essential.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |