This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
When someone dies, their family inherits a ghost: accounts nobody can find, subscriptions that keep billing, a laptop no one can unlock, thousands of photos on a drive no one knew existed. Almost nobody leaves a map.
Afterlight is that map. It is a local-first digital estate planner. A language model running on your own laptop interviews you, one plain question at a time, and turns your answers into a letter of instruction for the people you love: where things are, who to call, what to cancel, what you want. The letter is encrypted, and the key is split into five printable cards. Any three unlock it. Nothing ever touches a server.
I took "ghost in the machine" literally, and kindly. DΓa de los Muertos is about keeping the dead present through memory and care. Afterlight is the practical side of that: the last thing you do so that your family's grief is not also a scavenger hunt. It is not a chatbot that impersonates the dead. It never pretends to be anyone.
What it does:
- Interviews you. A local model asks natural follow-ups, but a state machine decides which topics are covered, so a small model stays on track.
- Refuses secrets. If you paste a password, card number, or seed phrase, a guard blocks it before it reaches the model or the disk. The letter says where things are ("password manager, emergency kit in the blue folder"), never what they are.
- Writes the letter from facts. Every fact comes from a validated record, not from model free text. The model only helps with personal messages, and you approve everything before sealing.
-
Seals with open standards.
ageencryption, with the key split by SLIP-39 into 5 cards, any 3 of which unlock it. -
Recovers without me. The result opens with the stock
agetool, so the family does not need Afterlight at all. I confirmed this: recovery opens with the stockagebinary, no Afterlight code involved.
Demo
Code
hendrahend
/
afterlight
Afterlight: a local-first digital estate planner
Afterlight π―οΈ
Local-first digital estate planner β built for DEV Hacktoberfest "Ghost in the Machine" (Oct 26β31, 2026).
Afterlight interviews you about your digital life, turns the answers into a plain-letter of instruction for your family, encrypts it with age, and splits the key with SLIP-39 into 5 printable cards. Any 3 of them unlock the letter. Nothing leaves your machine.
Why open
This data is too sensitive for a cloud API β a local model is a requirement, not a preference. The output must stay readable with standard tools (age + any SLIP-39 implementation) even if this project disappears. The model is swappable through config.
Three reasons open matters here:
- No cloud. Your answers about accounts, devices, and wishes never touch a remote server. The local LLM never sends anything outward.
-
Interoperable output.
estate.ageis a standardagefile. The share cards are SLIP-39 mnemonics. Anyoneβ¦
How I Built It
The central design choice is a hard split between what the model does and what plain code does.
Purple boxes are where the open-weight model works. Everything else is plain, testable code.
The model: gemma3:4b (2.5 GB), served through Ollama on a Windows laptop with no GPU. The backend speaks an OpenAI-compatible API, and the model name lives in a config file, not in the code. I compared one model β gemma3:4b produced valid JSON on 5 of 5 answers at about 18 tokens/s, which was enough to move forward without a GPU.
The interview: a state machine owns the checklist (accounts, money, devices, people, wishes). The model rephrases each question naturally and extracts answers into a JSON schema using constrained output. Pydantic validates the result. If the model fails, static fallback questions keep the interview going. A small model plus a strict scaffold turned out to be more reliable than a big model improvising.
The guard: regex and entropy checks (Luhn for card numbers, seed-phrase patterns, high-entropy tokens) run on every answer before it goes anywhere.
The seal: a random 128-bit secret becomes the age passphrase, and the same secret is split with SLIP-39 (shamir-mnemonic, Trezor's reference implementation) into 3-of-5 word shares with checksums, printed as cards with a QR code. A RECOVERY.txt in the package explains, in plain language, how to open everything with only age and any SLIP-39 tool.
Recover flow diagram coming once I capture the screenshots.
Recovery needs no model at all, only open tools.
Tests: 163 tests. Seal and recover round-trip for every 3-of-5 combination, fail correctly with only 2 shares, catch a single checksum typo in a share word, reject guard samples (API keys, card numbers, seed phrases), and a test fails on any non-loopback network connection.
I wrote the spec first in AGENTS.md and built the code with opencode following it. I decided the architecture and the hard rules up front (local-first, no plaintext on disk, guard every answer, no non-loopback network); the agent implemented to that plan rather than inventing its own.
Why Does Open Innovation Matter?
Privacy is the precondition, not a feature. This is the most sensitive data a person owns: accounts, money, family, wishes. With a closed API, every answer in the interview would travel to someone else's server. With an open-weight model on my own laptop, nothing leaves. You do not have to take my word for it: the demo runs with Wi-Fi off, and the test suite fails if the code opens a non-local connection.
This must outlive me. A digital legacy tool that depends on a company is a promise that expires when the company does. Afterlight's output uses open standards with independent implementations, age and SLIP-39. In thirty years, your family needs a copy of age and the instructions in RECOVERY.txt. They do not need this project, and they do not need me.
The model is swappable. Changing the model is one line of config. That is what lets the same tool run on a modest laptop today and on whatever small model is best next year.
It costs nothing to run, which matters for something people should do once and not pay a subscription to keep safe.
The honest tradeoff: a small local model is not as capable as a frontier model, so it cannot be trusted to improvise. That pushed me to give it a narrow job inside a deterministic structure, and I think the tool is safer for it.
The Spirit of It
The first time I ran the interview on my own life, the questions were simple but the answers were not. "Where are your accounts?" β I could answer that. "Who should get the photo drive no one else knows about?" β I had to decide, and deciding meant admitting there was something to decide. The guard is the moment I respect most: I pasted a real-looking API key into the test on purpose, and it refused to seal. It would rather be a pain in the moment than a secret leaked in a letter. And when three cards opened the letter and two did not, the 3-of-5 math stopped being a theorem and became a promise I could actually keep for my family.


Top comments (0)