plugins/ruflo-cost-tracker/skills/cost-projection/SKILL.md
Forward-looking cost projection that pairs with cost-budget-check:
cost-budget-check answers "have we crossed the line?" — reactivecost-projection answers "when will we cross the line?" — predictivesession-* records from the cost-tracking namespace (same source cost-budget-check uses).capturedAt/startedAt).windowSpend / windowDays.budget-config key set by cost-budget set):
ALREADY REACHED markers for thresholds already exceeded.--window <duration> Measurement window. Nh|Nd|Nw|Nm. Default 7d.
--horizons <csv> Projection horizons. Default 7d,30d,90d,365d.
--format table|json Default table (markdown).
Env: PROJECTION_NAMESPACE override (default cost-tracking), PROJECTION_QUIET=1 (alias for --format json).
| Sessions in window | 3 |
| Window spend | $3.000000 |
| **USD per day** | **$0.428571** |
| All-time spend | $3.000000 across 3 sessions |
## Projected spend (linear extrapolation)
| Horizon | Days | Projected spend |
|---|---:|---:|
| 7d | 7 | $3.0000 |
| 30d | 30 | $12.8571 |
## Budget exhaustion ($20.00 configured)
| Threshold | Target | Remaining | Time at current rate |
|---|---:|---:|---|
| 75% | $15.00 | $12.00 | 28.0 days |
| 90% | $18.00 | $15.00 | 35.0 days |
| 100% | $20.00 | $17.00 | 39.7 days |
cost-projection --format json | jq '.budget.exhaustion[2].daysUntilReached < 7' → fail builds when 100% exhaustion is < 1 week away.Linear extrapolation assumes the current rate holds. The footer reminds operators to re-run after workload shifts. For drift detection over MULTIPLE windows, pair with cost-trend (which already covers benchmark-drift).