Personal project · 2026

haburn

On days I miss a routine I set for myself, my own money becomes a gift for a friend. Three projects work together: one judges routines from activity logs, one turns penalties into gifts, and one studies which penalties actually raise my completion rate.

hakaru haburn komon Hands off misses Sends records for analysis Revises the settings
Architecture

How the data flows

hakaru passes each missed routine directly to haburn. komon only reads both databases and never writes to production.

DATA SOURCESSERVERSEXTERNAL iOS Shortcuts NFC tag (wake-up) Apple Health Google Calendar GitHub Kaggle hakaru Rolls up daily dataJudges routinesHands off only misses Judges daily 10:00 JST missed tasksonce a day haburn Records in a yen ledgerBuys at a thresholdSends gifts via LINE Ledger per recipient PolygonRecord of misses LINEOfficial account Friend (recipient) One-time link Payment backend: BitcoinPaid with Lightning and Cashu ecash Cashu mintHolds ecash LightningPays invoice QUO Card PayGift code pays komonRead-only

Scroll sideways to see more. Dashed lines are read-only. Logos are trademarks of their respective owners.

One day

From an action to a delivered gift

06:12
hakaruTap the NFC tag by the front doorThe first tap of the day is recorded as the wake-up time. Shortcuts also send gym Wi-Fi connections, outings, and Suica payments.
Every 3 hours
hakaruRe-collect today's dataIt only refreshes GitHub and the calendar. No judging during the day, so no penalty is fixed while there is still time to catch up.
Next day 10:00
hakaruClose and judge the previous dayIf anything was missed, only the task names go to haburn. haburn decides the amount.
Right after
haburnRecord the penalty¥100 per miss, up to ¥1,000 a day, added to one recipient in rotation. Task names marked public are recorded on Polygon.
At ¥1,000
haburnBuy a gift automaticallyPays a Lightning invoice with Cashu ecash to buy QUO Card Pay, after checking the invoice amount.
Minutes later
RecipientA link arrives on LINE; press and hold to openThe link works once and is used up when opened.
Screens

What people see

I check what's left in hakaru, and friends receive gifts through LINE and haburn. Numbers are examples.

14:20●●●
hakaruTue 9/30
To doResultsDataRoutines
DUE TODAY
Wake up by 6:306:12 ✓
Walk 6,000 steps2,140 to go
Bodyweight training1 set to go
DUE LATER
Gym twice a week1 / 2
hakaru · To doShows how many steps or sessions are left before judging
10:04●●●
haburn
Today
A gift has arrivedHere is one QUO Card Pay gift. The link opens only once.
Receive
10:04
LINE · NotificationRecipients need no app and no wallet
10:05●●●
haburn23h left
GIFT ARRIVED

A gift is waiting

It distills only while you hold.
When full, it is shown once.

Hold to distill
haburn · ReceiveHolding fills the flame, then the gift code appears once
18:30●●●
haburnHome
YOUR GIFTQUO Card Pay
NEXT IN LINE
BURN LOG
09-292 burns
Recorded
09-27Gift delivered
Recorded
09-261 burn
Pending

No amounts are shown, only what happened.

haburn · HomeLists events without balances or amounts

01 · Measure

hakaru

Collects activity logs, judges each routine, and passes only the misses to haburn.

iOS Shortcuts
StepsApple Health
Wake-up timeNFC tag at the door
Gym and bodyweightWi-Fi / gym-log
OutingsHome location trigger
Convenience storesSuica payment location
Scheduled timeGoogle Calendar
CommitsGitHub
Competition submissionsKaggle
Recording

Recording is almost fully automatic

Automations in the iPhone Shortcuts app run on events such as leaving home, paying with Suica, or joining the gym's Wi-Fi, and send a record to the hakaru server. Nothing has to be typed into an app. hakaru fetches GitHub and calendar data on its own.

9:41●●●
Automation
When I leave homehakaru outing · Run immediately
When I arrive homehakaru home · Run immediately
When I pay with a transit cardhakaru Suica · Attach location
Joins gym Wi-Fihakaru gym · Run immediately
When a social app openshakaru morning app · Run immediately
Every hourhakaru steps · Total from Health
NFC tag at the doorhakaru wake-up · Time of tap
SENT FROM IPHONE (PUSH)
Something happensTriggered by location, Wallet, Wi-Fi, apps, time, or NFC
A shortcut runsPosts JSON with Get Contents of URL
hakaru receives itPOST /ingest stores it as an observation
FETCHED BY THE SERVER (PULL)
Runs on a scheduleEvery 3 hours and at 10:00 each morning
Collects from APIsGitHub · Google Calendar · Kaggle · gym-log
Rolls up and judgesCombines with pushed data and checks each routine
  • Retries from places without signal are merged into one record by a per-send dedupe key
  • The shortcuts themselves are generated and signed by a script, and update in one tap from the admin screen
HOW THE 9 ROUTINES ARE RECORDED
6 automatic · No action 2 incidental · NFC tap / workout log 1 manual · Reading

Routines being judged now

Rules live in the database, so changing a threshold needs no deploy.No data = missmarks routines where missing data itself means it wasn't done.

Daily
Wake up by 6:30
6:30wake-up deadline
Recorded by
Incidental NFC tag at the door
Condition
First tap of the day is at or before 6:30. Taps before 4:00 don't count as waking up.
sleep.wake_at ≤ 390No data = miss
Daily
Walk 6,000 steps
6,000steps or more
Recorded by
Auto Sent hourly from Apple Health
Condition
Total steps for the day are 6,000 or more
activity.steps ≥ 6000
Daily
No social or video apps in the morning
0opens
Recorded by
Auto Sent when a listed app opens
Condition
Social and video apps opened 0 times in the morning
app.morning_launch ≤ 0
Daily
Read every day
1or more
Recorded by
Manual Run a shortcut after reading
Condition
At least one reading record that day
reading.count ≥ 1No data = miss
Daily
Commit every day
1commit or more
Recorded by
Auto Fetched from the GitHub API
Condition
At least 1 GitHub contribution that day
commits.total ≥ 1
Daily
Log at least one bodyweight set
1set or more
Recorded by
Incidental Fetched from the gym-log app
Condition
At least one set saved under bodyweight in gym-log
bodyweight.sets ≥ 1
Last 7 days · Judged Sun
Gym twice a week
2/ week
Recorded by
Auto Sent on gym Wi-Fi connection
Condition
On Sunday, 2 or more gym visits in the last 7 days
gym.visits ≥ 2
Last 7 days · Judged Sun
Convenience stores 3 days a week at most
3days / week max
Recorded by
Auto Sent when paying with a transit card
Condition
On Sunday, 3 or fewer days with a convenience store payment in the last 7 days
payment.convenience.days ≤ 3
Judged month-end
Get one OSS contribution accepted a month
1/ month
Recorded by
Auto Fetched from GitHub
Condition
At month-end, at least 1 PR accepted by an external OSS project that month
oss.merged_prs ≥ 1Weight ×3
A failed collection is not a missDays without data are left out of judging
One handoff a dayBoth hakaru and haburn keep dates unique, so duplicates are blocked twice
No contents are storedOnly counts and times are kept, never event titles or payment details
Dates use Japan timeSplitting days in UTC would shift wake-up and sleep by one day

02 · Give

haburn

Turns penalties for missed tasks into gift codes and sends them to friends on LINE.

Cashu ecashLightningLINE
PURCHASE FLOW
Ledger ¥1,000→ Cashu ecash→ Lightning payment→ QUO Card Pay→ Sent via LINE

What improved from the predecessor

  • The predecessor sent JPYC on Polygon, so recipients had to set up their own wallets
  • With haburn, recipients just get a link on LINE. QUO Card Pay works in the browser without signing up for an app

Safeguards before money moves

  • Each payment has two caps: a fixed limit in sats and a limit derived from the yen amount
  • The invoice amount is checked against the catalog price before paying
  • If an order's outcome is unknown, there is no repayment or auto-refund; the supplier is asked for its status
No visible balanceIt never looks like an account you can withdraw from
Redemption is automatic onlyIt runs on the operator's threshold; users can't choose the timing
Invite onlyOnly people the operator knows can sign up

03 · Review

komon

Compares hakaru's results with haburn's penalties to find which penalties raise the completion rate.

Penalty per miss100 yen
Daily cap1,000 yen
Routine weight× 1 default
Publishing missesOpt-in per routine
Did the completion rate change after penalties started?
Do I give up on days that hit the daily cap?
Is a miss more likely the day after a miss?
Does publishing misses raise the rate more than a bigger penalty?
EXPERIMENT B1 · 84 DAYS FROM 2026-09-29

Certain penalty vs. lottery penalty

Two conditions with the same expected value are randomly assigned day by day. Below: 10 days, each with 3 misses.

Certain¥300 every time
300
300
300
300
300
300
300
300
300
300
Lottery10% chance of ¥3,000
3,000
Both total ¥3,000 over 10 days Assignment uses HMAC; the secret's hash was published at the start At 21:00 I get told only the next day's condition
BACKGROUND · PROSPECT THEORY

Why could the same expected value make a difference?

For someone who decides on expected value alone, the two B1 conditions are identical. If the completion rates still differ, the difference comes from how money is perceived. Kahneman and Tversky's prospect theory describes that distortion with two curves.

① Losses feel less per yen as they grow

Gain Loss Felt value ¥300 ¥3,000 10× the amount hurts about 7.6×

A loss feels stronger than a gain of the same size (loss aversion), but the pain per yen shrinks as the amount grows. On this effect alone, a large, rare penalty feels small, so the certain penalty should raise the completion rate more.

② Small probabilities feel larger

10% → about 17% 0 .1 1 Actual probability Felt weight Dashed = unbiased

People overweight small probabilities (probability weighting), which is one explanation for why people buy lottery tickets and insurance. On this effect alone, a 10% penalty feels heavier than it is, so the lottery penalty should raise the completion rate more.

COMBINING BOTH (WITH THE COMMONLY CITED ESTIMATES α=0.88, λ=2.25, γ=0.69)
Certain
0.30
Lottery
0.38

Relative felt pain. With these estimates, probability weighting outweighs diminishing sensitivity, so the lottery feels heavier. My own curves are unknown, so the experiment tests it.

IF LOTTERY > CERTAINProbability weighting dominatesRare but large penalties are worth designing in
IF CERTAIN > LOTTERYDiminishing sensitivity dominatesLarge, rare penalties feel small; small, certain ones work better
IF NO DIFFERENCEOnly the expected value mattersPenalties can be designed by expected value alone, regardless of their distribution

I didn't compare ¥100 with ¥300 because standard economics also predicts that a larger penalty raises the completion rate, so it can't test prospect theory.


So far

Timeline

2026-08-15

haburn works end to end on real data, from judging to receiving

2026-08-21

hakaru starts judging only (no penalties)

2026-08-30

Handoff from hakaru to haburn turned on; penalties start being recorded

2026-09-29

komon starts experiment B1 (in progress)