VB Project Planning

<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.

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. The slack row turns red and capacity-plan:overdrawn fires when slack crosses zero.

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 re-renders automatically when a slotted child's data-capacity-cost changes.

Attributes

AttributeValuesDefaultDescription
data-bind-trianglestringID of a sibling <iron-triangle> to read capacityPoints from
data-bind-qualitystringID of a sibling <quality-target> to read criticalSum 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.

Accessibility

The ledger is read as labelled rows so the capacity / quality / features / slack breakdown is available without relying on the bar colors alone. Bars adopt VB theme tokens (--color-text, --color-interactive, --color-success, --color-error) so they auto-adapt across light, dark, and brand themes while preserving contrast; the overdrawn state is conveyed by the slack value going negative, not by color alone.

Related

  • <iron-triangle> — supplies capacityPoints via data-bind-triangle.
  • <quality-target> — supplies the Critical-weight sum via data-bind-quality.
  • <work-item> — the slotted feature element whose data-capacity-cost the plan sums.
  • <requirement-card> — displays a single quality decision the plan accounts for.