Skip to main content

How tasks are costed

The formula

manaCost=relativeCost×durationmin×personalCoefficient×axisFactor×0.5\text{manaCost} = \text{relativeCost} \times \text{duration}_{\min} \times \text{personalCoefficient} \times \text{axisFactor} \times 0.5
VariableDescription
relativeCostEffort relative to user baseline
durationMinutesTask duration
personalCoefficientCondition severity multiplier
axisFactorDaily variation multiplier from check-in
0.5Normalization constant

Where relative cost comes from

For template tasks: relativeCost=max(baseMET1.0, 0.1)\text{relativeCost} = \max(\text{baseMET} - 1.0,\ 0.1) For user-created tasks: impliedCoefficient=0.8×1.8(rating1)\text{impliedCoefficient} = 0.8 \times 1.8^{(\text{rating} - 1)} impliedRelativeCost=impliedCoefficientpersonalCoefficient\text{impliedRelativeCost} = \frac{\text{impliedCoefficient}}{\text{personalCoefficient}}
Personal auto-calibration starts only after a task reaches 10 lifetime completions.

Relative-cost auto-calibration (runtime)

At end-of-day compute, Canthus may adjust relativeCost using completion behavior from completed local days.
  • Calibration runs only for days before the current query day.
  • Updates are deterministic and idempotent per (taskId, calibratedForLocalDay, policyVersion).
  • A task needs at least 10 lifetime completions before any automatic update is allowed.
  • Update strength scales with recent 28-day completion count using a saturating curve.
  • Conservative bounds apply:
    • per-day delta cap for temporal tasks
    • stricter per-day delta cap for timingType=none
    • absolute relativeCost clamp window
  • timingType=none tasks are included with lower influence weight to prevent always-available tasks from dominating learning.

Physical vs cognitive split

Each task has body/mind weights (e.g. vacuuming 0.90/0.10, form-filling 0.15/0.85). This controls how much body and mind check-in values contribute to axis factor for that task.

Partial completion

When an occurrence has partialCompletionFraction, displayed cost uses the remaining work only:
remainingFraction = 1 - partialCompletionFraction
displayedManaCost = fullManaCost x remainingFraction
Partial completion does not write completed spend by itself. Daily spend is recorded when the occurrence is completed, using the completion event payload for that local day. If the remaining work is deferred, the same occurrence remains active and the remaining fraction travels with it.

Example: brushing teeth

Healthy person, neutral day: 1.0×2min×1.0×1.0×0.5=1.0mana1.0 \times 2\,\text{min} \times 1.0 \times 1.0 \times 0.5 = \mathbf{1.0\,\text{mana}} Moderate ME/CFS profile (coefficient 2.6), neutral day: 1.0×2min×2.6×1.0×0.5=2.6mana1.0 \times 2\,\text{min} \times 2.6 \times 1.0 \times 0.5 = \mathbf{2.6\,\text{mana}} Same task and duration, but 2.6x cost due to condition severity.

Axis factor (daily variation)

effectiveRating=wbody×body+wmind×mind\text{effectiveRating} = w_{\text{body}} \times \text{body} + w_{\text{mind}} \times \text{mind} axisFactor=1.0+(3.0effectiveRating)×s,s={0.25if effectiveRating<30.10otherwise\text{axisFactor} = 1.0 + (3.0 - \text{effectiveRating}) \times s,\quad s = \begin{cases} 0.25 & \text{if } \text{effectiveRating} < 3 \\ 0.10 & \text{otherwise} \end{cases}
Asymmetry is deliberate: bad days raise costs aggressively; good days lower costs conservatively.
Check-in stateAxis factorCost effect
All 1s~1.50+50%
All 2s~1.25+25%
All 3s1.00no adjustment
All 4s~0.90-10%
All 5s~0.80-20%
For non-full check-ins: Tier 2 maps identically, Tier 3 dampens yesterday’s axis factor by x 0.9, Tier 4 defaults to 1.0.

Personal coefficient (condition severity)

SeverityCoefficientTypical pool
Healthy~1.0100-130
Mild~1.550-80
Moderate~2.0-3.025-50
Severe~3.5-5.08-20
Initial calibration: personalCoefficient=weightedAverage(impliedCoefficients, taskWeights)\text{personalCoefficient} = \text{weightedAverage}(\text{impliedCoefficients},\ \text{taskWeights}) If task difficulty calibration ratings are unavailable, the system falls back to a starting bias based on the user’s selected conditions and severity level. See Onboarding fallback calculation for details. Ongoing adaptation: baselineSpend=task.manaCosttask.axisFactor\text{baselineSpend} = \sum \frac{\text{task.manaCost}}{\text{task.axisFactor}} dailyRatio=baselineSpendallocatedMana,coefficientEwma=αdailyRatio+(1α)coefficientEwma\text{dailyRatio} = \frac{\text{baselineSpend}}{\text{allocatedMana}}, \qquad \text{coefficientEwma} = \alpha \cdot \text{dailyRatio} + (1 - \alpha) \cdot \text{coefficientEwma}
Axis factor is stripped before coefficient learning so rough days do not masquerade as long-term severity changes.

Mana pool (daily budget)

Stable pool design

The pool does not directly follow today’s check-in. Daily variation flows through task costs (axis factor), not pool size.
This avoids circular shrinkage loops where low check-ins both reduce pool and increase costs.

Pool calculation

poolEwmat=αspendt+(1α)poolEwmat1\text{poolEwma}_t = \alpha \cdot \text{spend}_t + (1 - \alpha) \cdot \text{poolEwma}_{t-1} dailyPool=poolEwma×bias,bias=0.80+confidence×0.17\text{dailyPool} = \text{poolEwma} \times \text{bias}, \qquad \text{bias} = 0.80 + \text{confidence} \times 0.17
VariableValueNotes
alpha0.15 normal, 0.35 fastFast mode on regime shift
bias0.80-0.97Conservative margin tied to confidence

Runtime persistence contract (implemented)

  • Daily pool learning reads completion events by local day identity (completedLocalDay) and updates a versioned calibration snapshot.
  • Baseline learning prefers baselineCostAtCompletion from the event payload.
  • Pool/coefficient learning normalizes completion spend to baseline cost (avoids axis-factor double counting).
  • Replay dayTypeSet.opportunityWeight scales effective calibration learning alpha for that day.
  • Active replay PEM state pauses coefficient learning for that day (effective alpha 0).
  • Replay taskRecoveryWeightUpdated can override task recovery multiplier during deterministic pricing.
  • Task-cost learning emits taskCostCalibrated events with previous/new relative cost, day identity, policy version, and sample-strength metadata.
  • Deterministic fallback order when baseline cost is missing:
    • derive from manaCostAtCompletion / axisFactorAtCompletion when axis factor exists
    • otherwise fall back to manaCostAtCompletion
    • otherwise use deterministic historical fallback
  • Calibration snapshots are upserted by (day, algorithmVersion) after successful compute/update orchestration (engine remains pure/read-only).

Confidence model

EventConfidence effect
Tier 1 day+0.03
Tier 2 day+0.02
Tier 3-4 day+0.01
PEM detected-0.30
Sustained underperformance-0.05/day
Regime shift-0.50
ConfidenceBias
0.00.80
0.50.885
1.00.97

Absence and return behavior

Absence does not decay confidence. After 7+ days away, return runs a 3-check-in recovery modifier (0.85 then 0.95 then restore).

Severity-level intuition

SeverityCoefficientTypical poolManageable day often looks like
Healthy1.0100-130hygiene + admin + outing + exercise
Mild1.550-80hygiene + light cooking + one outing
Moderate2.625-50essentials + one meaningful activity
Severe4.08-20essentials + basic hygiene + limited upright time