Skip to content

Daily Pulse — Worked Example

The Daily Pulse is the clearest place to show the difference between a dashboard and a proactive finance agent. It does not wait for a transaction. It wakes up on a schedule, reads the same decision substrate, and writes a morning brief as another auditable decision row.

Live row walkthrough

One week of the demo tenant's activity (8 May to 15 May 2026), processed by the scheduled pulse on the morning of the 15th. The cash floor holds — the downside path stays above the working-capital floor for the full 42-day horizon — so the brief is a suggest, not an escalate. Three recommendations land on /brief; the most consequential one is the corridor warning, because it would otherwise be invisible until the Indonesian payout actually settled at a worse rate.

Scheduled pulse: window 2026-05-08 to 2026-05-15, decision c89e909c-354c-4862-b7b1-35104aa0ab38.

The /brief surface — three numbered action cards: keep AP dates (hold course), HKD→IDR corridor warning (urgent), cash floor holds. Top header shows 43-day p90 runway, 44 bps spread, $0 deferral discount loss.
The brief the CFO actually reads. The header surfaces the load-bearing numbers (43 days runway, 44 bps spread); the three cards are the ranked recommendations from analyzer.ts. Every "Open evidence" link routes back to the decision row that produced it — no recommendation exists without a replayable audit trail.
LayerDetail
What the user seesThe chief financial officer sees three actions in /brief: keep low-discount bills on schedule, avoid releasing Hong Kong dollar → Indonesian rupiah payouts on Sunday, and keep the scheduled accounts-payable run unchanged because the cash floor holds.
Event rowevents.kind = "scheduled_pulse", source = "scheduler", cadence daily, trigger command-line interface.
Decision rowdecisions.skill = "daily-pulse", outcome_kind = "suggest", confidence 0.88, rules version daily-pulse-rules-v1.
EvidenceThe row stores cash forecast, top corridor signal, and counterfactual scenario evidence.
Reap implicationReap can use its privileged rails to speak first: Card spend, Pay corridors, Direct foreign exchange, Optimize balances, and accounts-payable schedules all become one operating brief.

Note that the confidence on a suggest brief is 0.88, not 1.0. The pulse is confident in its arithmetic (the numbers are reproducible) but the recommendation — "do the AP run as scheduled" — depends on context the analyzer doesn't have: a planned acquisition, a known late-paying customer, a board meeting tomorrow. The confidence number is the agent's way of saying "the math is right; the action is yours."

Backend path

Five stages, fired by a clock instead of a transaction. The cron in stage 1 is the only thing that distinguishes the pulse from the other three skills — everything downstream uses the same context store, the same decision log, and the same outcome vocabulary (autoApply / suggest / escalate / refuse).

1
Scheduled eventpnpm pulse, a cron, or a future Inngest job writes a scheduled_pulse event.
2
Load contextloadPulseContext joins recent events and decisions for the tenant.
3
Analyze deterministicallyanalyzeDailyPulse computes cash runway, corridor spread drift, leakage, anomalies, and scenario math.
4
Narrate safelyTemplate narration turns computed facts into a readable brief; optional model narration can sit on top without changing the numbers.
5
Write decisionIf the downside path breaches the floor soon, the skill escalates. Otherwise it writes a suggest decision for /brief.

Stage 3 is where most of the code lives — analyzer.ts is the largest single file in the skill set because it runs four independent passes (cash, corridor, leakage, scenario) and ranks the union of their findings. Stage 4 is the only place that could call a model, and even when it does the model receives the already-computed payload and is asked to rewrite it in better English. The decision-log write in stage 5 is what makes the pulse compose with the other three skills: the queue, bills page, and treasury surface can all link into a brief recommendation because it lives on the same log.

Concrete signals from the live row

Each row below is one number the analyzer surfaced for this specific pulse. Read them as a portrait: cash is healthy (43 days of downside runway against a small floor), one corridor is unusually expensive this week, and one vendor is taking an outsized share of the week's spend.

43dp90 downside runway
$2.55Mp90 cash trough
$272kworking-capital floor
+44bpsHKD→IDR spread vs benchmark
IDR 222MReap Pay sleeve shortfall
76%Halborn share of week spend

The 43-day p90 runway is the headline cash signal. 43 days is well outside the 14-day escalation threshold, so the brief stays a suggest; if a single large unscheduled outflow shortened that to, say, 11 days, the same brief would become an escalate to the CFO with no other code change. The 44 bps corridor drift is small but interpretable: a USD 100,000 payout that route costs $440 more than the benchmark, which is the kind of leak nobody reads spreadsheets to catch. The Halborn 76% concentration is the vendor signal — not necessarily wrong (large security engagement weeks happen), but worth a controller's eye precisely because it's the kind of pattern that hides a duplicate-invoice or scope-creep problem.

How the cash band is computed

The /forecast surface: $2.56M P90 downside cash trough headline, $46.6k in past-due escalated bills, and a running-position chart with two flat-ish lines (P50 and P90 downside) above a dashed floor at $271.7k.
The same Monte Carlo behind the brief, rendered on /forecast. P50 and P90 are drawn against the working-capital floor — when the P90 line crosses, the pulse stops being a suggest and becomes an escalate. Today the gap is wide; the brief stays informational.

The cash forecast is a 256-run Monte Carlo over a 42-day horizon (analyzer.ts:18-20). Each run draws a daily burn perturbation, adds scheduled AP outflows on their due dates, subtracts expected AR inflows, and records the lowest balance reached in the window. From the 256 runs the analyzer reports:

FieldMeaning
p50TroughUsdMinorMedian trough — the "expected" worst day
p90TroughUsdMinor90th-percentile worst trough — the downside path
p50RunwayDays / p90RunwayDaysDays until each percentile path crosses the working-capital floor
breachWithinDaysFirst day the p90 path breaches; null if it never does
floorUsdMinor10% of starting cash, hard-coded ratio in WORKING_CAPITAL_FLOOR_RATIO

The breachWithinDays field is the one that flips the brief from suggest to escalate: if the p90 path breaches within CASH_BREACH_ESCALATION_DAYS = 14 days, the outcome becomes escalate("cfo", …) (skill.ts:34-42). Above that, it stays a suggest at confidence 0.88.

Why 14 days

The smallest window that's still actionable — a CFO can move money, draw on a credit line, or accelerate AR in two weeks. Anything shorter and the escalation arrives after the only useful response window has closed.

The signal-to-payload map

Each top-level payload field corresponds to one analyzer pass. They run independently and only meet again at the decision row, so a regression in corridor scoring can't corrupt the cash forecast.

cashMonte Carlo runway — 256 runs × 42 days over starting balances, scheduled AP, expected AR.Bills, AR estimates, starting balances
corridors[]Spread vs benchmark — observed bps minus benchmark bps per currency pair.Stablecoin payouts in window
leaks[]Vendor concentration + duplicate-charge scan — ranks waste by dollar impact.Card auths + payouts grouped by vendor
scenarioCounterfactual: what if AP runs are deferred by a week? Net of lost early-pay discounts.Bills due in window
recommendations[]Ranked union of the above; the CFO reads this on a calm day.Findings sorted by dollar impact

Why this matters for Reap

Most finance products wait for the operator to ask a question. Reap has a better position: it can observe card spend, stablecoin payout corridors, balance sleeves, bills, and foreign-exchange events as they happen. The pulse turns that into a proactive control surface while preserving the same evidence and override model as the queue.

What the evals cover

Because the pulse can read a lot of data and produce a confident-sounding paragraph, it is the easiest of the four skills to "fake passing." The golden set is built to make that hard — every signal has both a benign and an alarming case, and at least one input shape that the skill is required to refuse.

cashHealthy / floor breachRunway warning, cash-floor breach, low-value no-action day, empty day.
corridorSpread spike / normalMulti-currency and route-hint cases keep Reap-native rails visible.
scenarioBills clusterAccounts-payable deferral and lost-discount math stay in code.
refusalMalformed windowsBad time windows refuse with missing_input instead of fabricating a brief.

The refusal case in red is the most important one. A scheduled skill that never refuses is a skill that will eventually produce a confident brief from rotten input — the equivalent of a CFO making decisions from a corrupted spreadsheet.

Design patterns

Four patterns hold this skill together. The first two ("Compute then Narrate" and "Read Model") are the load-bearing ones — they are the reason the pulse can speak in a natural voice without ever inventing a number.

Compute then NarrateDeterministic arithmetic runs first (cash trough, corridor spread, leakage delta, scenario relief). The narration layer receives pre-computed facts and renders them as readable copy. The model cannot alter the numbers.Numbers are auditable independent of any LLM; narration is cosmetic, not authoritative.
Observer / Scheduled TriggerThe pulse is triggered by a scheduled_pulse event rather than reacting to individual transactions. The skill observes the accumulated decision substrate over a rolling window rather than a single event.Proactive signals surface without requiring the operator to ask a question.
Read Model (CQRS)The pulse reads from the same append-only decision log that all other skills write to. It does not maintain its own state; the signal board is a projection over existing facts.No separate data pipeline; the brief is always consistent with the queue and bills surfaces.
Counterfactual / ScenarioThe accounts-payable deferral scenario computes the alternative: what does the cash floor look like if due bills are pushed out, net of lost early-pay discounts? The result is a single number alongside the baseline.Decision-relevant tradeoffs are quantified, not described in prose.

Compute then Narrate is the one to remember. Plenty of "AI brief" products invert this — they let the model do the analysis and use templates as a fallback. Doing it the other way around is what keeps the numbers defensible and the narration disposable.

How "Compute then Narrate" is enforced in code

narrateDailyPulse takes the already-computed basePayload and returns { markdown, modelId, tokensIn, tokensOut, costMicrocents } (skill.ts:31). The contract is one-way: numbers in, prose out. If the model is disabled (no provider configured), the narration layer falls back to deterministic template strings and the brief is still well-formed; the only thing the operator loses is the more natural copy.

The model cannot alter the numbers

This is the load-bearing safety property of the whole skill. The narration layer is downstream of computation, not co-mingled with it. An LLM that hallucinates "$3.2M runway" cannot get past the payload schema — the field is already set to 43 days from the Monte Carlo and the narration only receives it for rendering.

Three properties follow from that ordering:

availabilityThe brief always existsNetwork failures, provider outages, or a bad model never block the brief from landing — they only degrade the prose layer.
consistencyNumbers ⊥ proseThe model cannot invent a runway figure that wasn't computed; it can only describe one wrong. Caught by string-matching payload values against narration in the eval harness.
replayAxes move independentlyRe-running an old pulse against today's analyzer changes the numbers; re-running against today's narration changes only the prose. Each axis is debuggable in isolation.

Files to inspect

FileWhy it matters
src/skills/daily-pulse/skill.tsTrigger guard, context load, escalation threshold (14-day p90 breach), outcome selection, decision telemetry.
src/skills/daily-pulse/context.tsJoins events and decisions for the tenant into a single pulse context.
src/skills/daily-pulse/analyzer.tsDeterministic cash Monte Carlo (256 runs × 42 days), corridor spread scoring, leakage detection, anomaly classification, AP-deferral scenario.
src/skills/daily-pulse/narration.tsOptional model narration layer; receives pre-computed payload and renders prose. Numbers stay in code.
evals/daily-pulse.jsonlGolden cases for healthy cash, floor breach, spread spike, bills cluster, low-value no-action day, malformed window.

Submission pack — Reap Chief Financial Officer Agent take-home