biagiojs

Business weights

biagiojs doesn't ask "how do we render faster?" but "what should hit the wire first to maximize business outcomes?"

Every component declares weights (0–1) and costs (numeric). The framework computes priority automatically.

Weight table

WeightWhat it controls
conversionOrder in HTML source — high-converting content arrives first
seoSEO-critical content, SCRT metric
interactionUser interaction probability → hydration
cpuRender cost (1–10)
networkKB transferred for asset preload

Reference values

Don't invent random numbers. Use this guide:

Component typeconversionseointeraction
Hero / headline0.8–0.91.00.1–0.2
Primary CTA1.00.30.8–0.9
Price / offer0.90.80.1
Article body0.41.00.05
Navigation0.20.30.4
Chat widget (300 KB)0.050.10.03
Footer0.050.10.02

Formulas

Rendering:priority = businessValue / (cpuCost + 0.5 × memoryCost)

Hydration:priority = interaction × businessValue × cpuAvailability

Network:priority = businessValue / networkCost_KB

businessValue is a weighted combination of conversion and seo.

Concrete example

A 300 KB chat widget with conversion="0.05" and interaction="0.03":

  • Hydration priority: 0.03 × 0.05 = 0.0015 → below lazy threshold (0.05)
  • Result: static HTML, zero JavaScript shipped

A CTA with conversion="1" and interaction="0.85":

  • Priority: 0.85 × 1.0 = 0.85eager (hydrates right after paint)

Optimizer and field data

Put JSON in reports/ (CrUX, analytics, heatmap) and each build recalibrates interactionProbability and hydration thresholds from real data.

biagio pull-vitals https://yoursite.com .

Golden rule

Static is the desired default. Every hydrate must justify a real interaction.

Try the interactive playground on the homepage — move the sliders and watch the plan update live.