Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

commitment-forge

Commitment-portfolio modeling — open source under MIT.

commitment-forge is Wave 4's second tool. It reads the attribution-forge event stream, computes the measured baseline (the floor of cost across your observed window), models a layered commitment portfolio (bedrock / foundation / elastic / experimental), and recommends per-layer commit purchases with estimated annual savings.

Why a layered portfolio

A flat "commit X%" mandate is a recipe for stranded commits. The disciplined model separates workloads that will exist in 3 years (bedrock, 3-year commitments), stable annual workloads (foundation, 1-year commitments), demand that fluctuates (elastic, no commit — spot/preemptible/serverless does the work), and experiments that may not survive (experimental, no commit, dies cheap).

The same fleet's commitable spend looks different in each layer; the portfolio model surfaces the right commit for the right shape.

Public framework / private config boundary

What Where License
Binary, analyzer, schemas pleme-io — public MIT
Real current_commits, real exclude filters, real layer discounts Org's private repo Proprietary

Install

cargo build --release
./target/release/commitment-forge --help

# via Nix (after publish)
nix run github:pleme-io/commitment-forge -- --help

Usage

# List configured layers
commitment-forge portfolio layers --portfolio portfolio.yaml

# Analyze cost events vs the portfolio
commitment-forge analyze events.jsonl --portfolio portfolio.yaml --bucket 1d

# JSON for embedding in reviews
commitment-forge analyze events.jsonl --portfolio portfolio.yaml --format json

How the baseline is computed

The analyzer's central insight: the spend that's ALWAYS present is the commit-eligible baseline. Everything above that is elastic.

For each bucket (day default), it sums total cost (excluding any dimensions matching exclude_dimensions filters). The minimum bucket total across the observed window is the baseline. That number, divided by bucket-hours, is the steady-state hourly commit-eligible spend.

This is conservative by design — it commits only what's been observed to be present every period.

Portfolio config

layers:
  - id: bedrock
    commit_horizon: 3y
    target_coverage: 0.25
  - id: foundation
    commit_horizon: 1y
    target_coverage: 0.40
  - id: elastic
    commit_horizon: 0s
    target_coverage: 0.0
  - id: experimental
    commit_horizon: 0s
    target_coverage: 0.0

current_commits:
  - layer_id: foundation
    committed_hourly_usd: 1.50
    description: Existing 1-year savings plan

exclude_dimensions:
  - { environment: dev }
  - { lifecycle: ephemeral }

layer_discounts:
  bedrock: 0.55
  foundation: 0.30
  elastic: 0.0
  experimental: 0.0

Output

window 4w (28 buckets of 1d)  baseline = $16.75/hr ($146,730/yr)
current commits: $1.50/hr total

  layer            target_%  target_$/h    curr_$/h     gap_$/h     buy_$/h     ann_savings
  bedrock             25.0%        4.19        0.00       +4.19        4.19      20175.38
  foundation          40.0%        6.70        1.50       +5.20        5.20      13665.60
  elastic              0.0%        0.00        0.00       +0.00        0.00          0.00
  experimental         0.0%        0.00        0.00       +0.00        0.00          0.00

  total recommended annual savings: $33840.97

Roadmap (post-v0.1)

  • Multi-cloud portfolios (one analyzer run per cloud's commit catalog).
  • Time-decayed baseline — weight recent periods more heavily.
  • Expiry-aware recommendations — when a current commit expires, the recommendation should account for re-up.
  • Scenario simulation — simulate subcommand that shows the impact of a proposed commit purchase before buying.
  • Risk-adjusted recommendations — Monte Carlo over baseline variance.

License

MIT — see LICENSE.

About

Commitment-portfolio modeling (bedrock / foundation / elastic / experimental layers). Computes measured baseline from attribution events, recommends per-layer commit purchases with estimated annual savings.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages