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: an iPhone app judges routines on the device, 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

Records never leave the iPhone. The app signs the result of each closed day and puts it on haburn-relay, and haburn pulls it every hour. komon only reads haburn's database and never writes to production.

DATA SOURCESIPHONERELAYSERVEREXTERNAL iOS Shortcuts NFC tag (wake-up) Apple Health GitHub gym-log · RSS hakaru Keeps records on deviceJudges routinesSigns the result Closes 10:00 next day haburn-relay Nostr relayRules and daily resultsEncrypted to haburn No amounts hourly haburn Pulls and recordsBuys at a thresholdSends gifts via LINE Ledger per recipient Nostr · OTSPublic record of misses LINEOfficial account Friends (recipients) One-time link Payment backend: BitcoinPaid from my own Lightning node over NWC Alby HubVia NWC 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 doorA shortcut records the wake-up in the app. Gym Wi-Fi connections, outings, and Suica payments are recorded the same way and stay on the device.
During the day
hakaruShow what's leftReads steps from Health and commits from GitHub, and shows how many are left. Nothing closes 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 daySigns the number of misses and the rule names, encrypts them to haburn, and puts them on haburn-relay. No amounts; haburn decides those.
Within the hour
haburnPull the result and record the penaltyCurrently ¥100 per miss, up to ¥1,000 a day, added to one recipient in rotation. Rule names marked public go to Nostr, timestamped with OpenTimestamps.
At the threshold
haburnBuy a gift automaticallyTells Alby Hub over NWC to pay a Lightning invoice for 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 the iPhone app, and friends receive gifts through LINE and haburn. Numbers are examples.

14:20●●●
Today 11/12hakaru
TodayRulesResultsSettings
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 · TodayShows how many steps or sessions are left before the day closes
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

An iPhone app. It judges each routine with the records kept on the device, and only the signed result leaves it.

SwiftUIHealthKitApp IntentsNostr
StepsApple Health
Wake-up timeNFC tag at the door
Gym and bodyweightWi-Fi / gym-log
OutingsHome location trigger
Convenience storesSuica payment location
CommitsGitHub contributions page
OSS pull requestsGitHub
Blog postsRSS / Atom
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 call the app's Record action. Records stay on the device and are never sent to a server. The app reads steps and GitHub by itself when it judges.

9:41●●●
Automation
When I leave homeRecord: outing · Run immediately
When I arrive homeRecord: home · Run immediately
When I pay with a transit cardRecord: Suica · Attach location
Joins gym Wi-FiRecord: gym · Run immediately
When a social app opensRecord: morning app · Run immediately
NFC tag at the doorRecord: wake-up · Time of tap
RECORD AN EVENT
Something happensTriggered by location, Wallet, Wi-Fi, apps, time, or NFC
A shortcut runsRuns the app's Record action
Kept on the deviceThe app stores 35 days and sends nothing out
JUDGE A CLOSED DAY
The app wakes upAt set times each morning, and when steps increase
Reads outside sourcesHealth · GitHub · gym-log · RSS
Judges and signsEncrypts the result to haburn and puts it on haburn-relay
  • Health can't be read while the phone is locked, and that looks like 0 steps, so judging waits until it can be read
  • Rules are also kept on haburn-relay, so they come back on a new device
HOW THE 9 ROUTINES ARE RECORDED
6 automatic · No action 2 incidental · NFC tap / workout log 1 manual · Reading

Routines being judged now

Rules are edited in the app and kept on haburn-relay, so changing a threshold needs no app update.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 Read from Apple Health on the device
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 Recorded 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 Read from the GitHub contributions page
Condition
At least 1 GitHub contribution that day
commits.total ≥ 1
Daily
Log at least one bodyweight set
1set or more
Recorded by
Incidental gym-log records read from Nostr
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 Recorded 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 Recorded 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 penalty a dayhaburn records each person and date once, however many times it pulls
Records stay on the deviceOnly the number of misses and the rule names of a closed day leave it, encrypted to haburn
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.

LightningNWCNostrLINE
PURCHASE FLOW
Ledger reaches the threshold→ Alby Hub (NWC)→ 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

Connected through the PWA

  • The person paying penalties signs up in haburn's PWA and sets the amount per miss and the daily cap
  • A link in the PWA opens the iPhone app and connects where results are sent
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 routine 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?

Per-routine results come from the hakaru server, which judged through 2026-11-11. Reading them from the iPhone app's results is still to come.


Next

Making it usable by others

Right now it runs for me alone. I'm rebuilding the iPhone app, haburn, and haburn-relay so other people can use them. The operator never holds users' money, and gifts are paid from each person's own Lightning node.

Build any habitSplit judging into parts (source, counting, condition) so people can pick a template or make their own manual records
Reports from a witnessFor things your own records can't prove, like chores, a family member sends a signed report from the PWA and it counts toward the result
Conditional tokensLock the penalty for a missed day in ecash ahead of time and give it to a friend; the result decides who can open it

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-10-20

The Cashu wallet is removed; payments go from Alby Hub over NWC

2026-11-05

Penalties switch to results signed by the iPhone app

2026-11-12

Judging is removed from the hakaru server; only the iPhone app judges