This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady
What I Built
LeaveNote is for the moment you stop coding mid-task. You paste your git diff plus one line about what you were doing, and it writes the handover note: what changed, what's unfinished, the first thing to do tomorrow, and what to watch out for - leftover TODOs and debug lines included.
Rebuilding your own context the next morning is the most boring part of coding. LeaveNote captures it before you close the laptop, so tomorrow-you reads one note and starts. That is the laziness this week asked for.
Demo
Live: https://leavenote-app.netlify.app
The AI needs WebGPU (a recent Chrome or Edge on a device with a supported GPU). Devices without it get an honest message and a manual template - never a fake demo. The model downloads once (a few hundred MB) and then stays cached in the browser.
Note: the live demo currently serves the first version, where the model writes all four sections. The v2 redesign described below is on a pull request and the demo updates when it lands.
Screenshots
The current live demo (v1), on desktop and on a phone:
The v2 code on PR #1 (not merged yet - its prompt is validated against the real model weights on CPU, but it has not run in a browser end-to-end):
Code
Repo: https://github.com/Sanny1921/leavenote - the v2 rework is on PR #1: https://github.com/Sanny1921/leavenote/pull/1
The whole app is one index.html plus a two-line WebLLM worker. The heart of v2 is this split:
// The app, not the AI, finds the facts in your diff.
function todosOf(files){
const out=[];
for(const f of files)for(const l of f.added){
if(/\b(TODO|FIXME|HACK|XXX)\b/.test(l))out.push(f.name+': '+l);
}
return out;
}
// UNFINISHED and WATCH OUT are built from these, never from the model.
// The model only phrases CHANGED and a suggested TOMORROW first step.
How I Built It
The AI is Qwen2.5-0.5B-Instruct (Apache 2.0) running fully in the browser through WebLLM (Apache 2.0). No server, no API key, no account, no analytics. Your code never leaves your device.
The first version asked the small model to read a raw diff and write all four sections. It failed the way small models do: it once reported a leftover TODO as done. A bigger model might fix that, but I wanted to keep the download at a few hundred MB, so I shrank the model's job instead:
- Plain JavaScript parses the diff first: file names, added and removed line counts,
TODO/FIXMEmarkers,console.loganddebuggerlines. - The UNFINISHED and WATCH OUT sections are built from that direct reading: they quote recognized markers (TODO/FIXME, console.log, debugger) verbatim instead of letting the model paraphrase them. The parser only recognizes those markers, so unmarked half-done work can still slip past it - the note is a memory aid, not a guarantee.
- The model only writes the two lines it handles well: a plain-English summary of what changed, and a suggested first step for tomorrow, phrased from the facts it is handed.
- Checks reject malformed answers and "nothing to do" replies when TODO flags exist. Each line falls back to the parsed version if needed, and the note's footer says exactly which lines are AI-written and which are parsed.
I validated the prompt pipeline against the real Qwen2.5-0.5B-Instruct weights on CPU: 3 out of 3 test diffs produced the required two-line format. The in-browser inference path (WebLLM on WebGPU) is unchanged from the first version, which ran on my phone.
Why Does Open Innovation Matter?
The whole point of LeaveNote is that your code stays yours. A closed API means pasting your private repo's diff onto someone else's server and trusting their retention policy. Because the model is open-weight and runs locally, the diff never leaves the device - no account, no logs, nothing to leak. It costs nothing to run, works offline after the first download, and anyone can swap Qwen2.5 for another open model by changing one constant.
The Lazy Payoff
Five to ten minutes of "wait, what was I doing?" saved every time you pick a project back up, and fewer debug lines surviving into the next session because the note calls them out.



Top comments (0)