Dev.to AI 🤖 Ai 👁 0 📖 4 min read

Sloth Nap: two lines in the morning, instead of the chores you keep skipping

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady What I Built Sloth Nap is for the evening you do not want to deal with the pile. You drop a chore table and a couple

Sloth Nap: two lines in the morning, instead of the chores you keep skipping

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady

What I Built

Sloth Nap is for the evening you do not want to deal with the pile. You drop a chore table and a couple of notes into a folder. It ranks which tasks you are likely to skip again, finds the one sentence in the notes that actually has a date, looks up the question you were avoiding, and leaves two lines for the morning.

On the sample pile, those lines are the receipts and a one-sentence reply to the landlord. Together they are about 55 minutes. The plants, the dentist, and the downloads folder can wait. Nothing is deleted. Copying the notes into an archive folder stays pending until a person approves it, and a second approval does not copy them again.

The person who gets to be lazier is whoever keeps reopening the same three tasks and the same lease PDF. The nap does that pass once.

Demo

Do file the receipts and reply to the landlord. Those are the chores you keep skipping.

The only sentence that matters: the lease renewal notice is due on November 2. Leave sort the downloads folder and book the dentist for later. Filing online is $30. Showing up in person is $45 and a morning.

npm install
npm test
npm run nap

out/morning-brief.md is the result. npm run nap -- --approve copies the notes once. npm start serves those two lines on port 3000.

Code

MIT, on GitHub: zakkycrypt01/sloth-nap

Sloth Nap

An overnight chore agent for the Hacktoberfest Week 3 challenge. You drop the tasks you keep avoiding into inbox/. It ranks what you will skip, pulls the one date buried in the notes, looks up the question you did not want to search, and leaves two lines in out/morning-brief.md.

On the sample inbox that is the receipts and the landlord reply: about 55 minutes. Archiving the notes waits until you approve it.

Run it

npm install
npm test
npm run nap

npm start serves the brief at http://localhost:3000. Add --approve to copy the notes into out/archived. Add --slow if you want a pause between steps.

The sample run does not call a hosted model. If Ollama is running with gemma2:2b, the two lines come from Gemma. Otherwise a template writes them from the same facts, and the brief says model: template.

…

The project is a new repo started during this challenge window. The commit on master is ddc4f5e.

inbox/                  sample chores, lease note, question
src/mastra/             Mastra agent, forecast tool, LibSQL memory
src/nap/                brief, approval ledger, pile search, partner clients
src/temporal/           durable nap: activities, then a signal wait
python/tabpfn_forecast.py
python/tinker_eval.py
arduino/sloth_nap/      UNO Q sketch
render.yaml
deploy/digitalocean-app.yaml
.github/workflows/overnight-nap.yml

The archive path is the one I want a judge to look at. The intent is written as submitted before the copy, then confirmed after. A retry that finds confirmed returns without copying. A retry that finds submitted (the copy timed out) does not guess.

How I Built It

The open piece at the center is Mastra, an open-source TypeScript agent harness. The agent is sloth-nap. Its tool, forecast-skips, fits a small logistic model on age, minutes, dread, and how many of the last four attempts were skipped. Memory is LibSQL. GDS K S's Mastra walkthrough is the shape I used: an agent, a Zod tool, and memory.

Gemma writes the two lines. The client posts to Ollama /api/chat with gemma2:2b.

Two other posts decided the approval design. Takashi Obara's Temporal write-up is why the archive is a signal wait in src/temporal/workflows.ts rather than a poll. The retry essay is why the idempotency key is stored before the copy. A commenter on that essay, Abhinav Sharma, points out that a key does nothing if the far side ignores it. Here the far side is this process, so the ledger is the far side.

The workflow runs the nap, then waits on the approval signal. python/tinker_eval.py trains the same kind of classifier: 0.85 on the holdout against a majority-class baseline of 0.80. python/tabpfn_forecast.py is the TabPFN path for that same ranking.

Why Does Open Innovation Matter?

The notes in this project are a lease date and a dread score. The ranker and Gemma run on the machine, so the pile stays in the folder. Swapping the model is a name, not a new vendor. Mastra keeps the tool and the memory in an open harness.

The Lazy Payoff

Chore Minutes What the nap did
File the receipts 40 Do this
Reply to the landlord 15 Do this, before November 2
Sort the downloads folder 25 Leave it
Book the dentist 10 Leave it
Water the plants 5 Leave it
Renew the library card 8 Leave it

About 55 minutes of the chores the model thinks you will skip. The other 48 minutes are the ones you already do. Filing the small claim online is $30. Showing up in person is $45 and a morning.

Prize Categories

Best Use of Mastra. The forecast tool, the agent, and LibSQL memory are what rank the chores. The tests construct the agent and the nap calls the tool.

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.