Vanilla Breeze

capacity-plan

Compact ledger that ties iron-triangle capacity, quality-target spend, and slotted work-item costs into a stacked-bar plan view.

Overview

The <capacity-plan> stitches the planning chain together visibly. It reads three numbers — capacity from a paired <iron-triangle>, quality spend from a paired <quality-target>, and feature spend from slotted elements with data-capacity-cost — and renders a four-row ledger with proportional bars: capacity vs quality vs features vs slack.

It's the answer to "where did my capacity go?" Without it, the chain is implicit; with it, the math is the first thing the team sees on the requirements page.

Live demo

Edit the iron-triangle inputs to grow capacity. Pick quality priorities to spend it. The ledger rebalances live; the slack row turns red when overdrawn.

The arithmetic

Plain subtraction:

When capacityPoints is unbounded (no triangle bound and no data-capacity-points on the target), slack is reported as ∞ and the bar visualization scales against actual spend.

Two ways to supply feature spend

The component sums any descendant element with data-capacity-cost="N". Authors typically slot <work-item> children:

For server-rendered planning surfaces or programmatic flows, set featureSum directly:

Property override wins over slot inference. Mutation observation: changes to slotted children's data-capacity-cost trigger a re-render automatically.

Attributes

AttributeTypeDescription
data-bind-trianglestringID of a sibling <iron-triangle> to read capacity from.
data-bind-qualitystringID of a sibling <quality-target> to read critical sum from.

Properties & events

MemberDescription
capacityPoints (R)Live capacity from the bound triangle (or Infinity if absent).
qualitySum (R)Live critical sum from the bound quality target (or 0).
featureSum (R/W)Sum of data-capacity-cost across descendants, or an explicit number set by the host.
slack (R)Computed: capacity − quality − features.
capacity-plan:overdrawn (event)Edge-triggered when slack crosses zero.

Theme tokens

TokenDefaultPurpose
--capacity-plan-max32remMax inline-size of the ledger container.
Bar colorsVB theme tokens (--color-text, --color-interactive, --color-success, --color-error)Auto-adapt across light/dark and brand themes.