This is a submission for the Hacktoberfest Open-Source AI Challenge: Slow and Steady.
What I Built
Sleepy Coder is a local coding assistant for the small, boring problems that pile up in side projects: the duplicate <h1>, the image without alt, the console.log you forgot, the TODO from three weeks ago.
You point it at a folder on your computer and it:
-
Finds tasks with rules (no AI, instant, reliable): SEO issues like a duplicate
<h1>or a missing<title>and meta description, accessibility issues like images withoutaltor icon links without text, leftoverconsole.log, TODO/FIXME comments, and a missing README, LICENSE or tests. - Asks Gemma for ideas about anything the rules can't see. These are clearly labelled AI idea · verify it.
- Shows you How to fix each task: the exact file and line (with an Open in VS Code button), and Gemma's explanation with suggested code.
- Checks your fix. You change the code yourself, press I fixed it — check again, and the same rule that found the problem runs again. If it's gone, the task moves to Done.
The lazy part: I don't have to remember what's wrong in each project or hunt for it. Sleepy Coder does the looking and the explaining; I only do the one-minute fix.
The real moment I knew it was useful: I ran it on my CSS backgrounds gallery (an Astro site) and it reported two <h1> on the home page. I had no idea. The second one was inside a modal that simulates a website to preview each background, and the rule found it by following the Astro imports from the page into the component. It also knew the real title was the one in the hero and told me to leave that one alone.
Demo
In the video: I open my CSS backgrounds gallery, press Find tasks, approve the duplicate <h1>, open How to fix (exact line + Gemma's guide), fix it in VS Code, and press check again: the task moves to Done.
Code
💤 Sleepy Coder
Let your code sleep. We'll handle the boring stuff.
Sleepy Coder is a local coding assistant that looks through your repositories for small
boring problems — a duplicate <h1>, an image without alt, a forgotten console.log, a TODO
you never got back to — and shows you exactly where each one is and how to fix it.
It runs on your machine with a local model through Ollama No cloud, no paid APIs, and it never changes your files: you make the fix, Sleepy Coder checks it.
Built for the Hacktoberfest Slow and Steady challenge.
What it finds
With rules (fast, no AI, reliable):
-
SEO: duplicate
<h1>on a page (it follows Astro layouts and components), missing<title>, missing<meta name="description"> -
Accessibility: images without
alt, links without readable text,<html>withoutlang - Code: TODO / FIXME / HACK comments, leftover…
How I Built It
- Gemma 3 4B (open weights) running locally through Ollama. Everything AI goes through it: task ideas and fix guides.
-
Astro with React islands and plain CSS for the dashboard, and Fastify for a small API that only listens on
127.0.0.1. -
SQLite (Node's built-in
node:sqlite) to remember repositories, tasks and guides. - Vitest for the tests, in a pnpm monorepo.
The rules and the model each do the part they're good at:
- Rules find where. They read the files and know exactly which line has the problem, so the location is always right.
-
Gemma explains how. It gets the numbered lines around the problem plus a hint from the rule (for example, "keep the
<h1>inHero.astro"), and returns an explanation, steps and suggested code as structured JSON. I validate everything it sends back. - For AI ideas, Gemma checks itself. Before writing a guide, it reads the real file and has to say whether the problem actually exists. Once it told me all my SEO descriptions were empty strings… they weren't. Now it can answer "this does not apply", and the app offers to discard the task.
What I tried first (and why it doesn't fix things for you)
My first plan was the "sleepy" dream: approve a task, and an agent makes the change on its own Git branch while you rest. I built it carefully: an isolated git worktree on a sleepy/… branch, a sandbox so it could only touch files inside that copy, protected files it couldn't edit, your own test script before and after, and a check that the problem was really gone before committing.
The safety side worked. It never broke anything. But the edits themselves, with a 4B model on a laptop, kept failing in new ways:
- asked to add
alttext, it reformatted a file instead; - asked to rewrite a file, it dropped half of it;
- asked for small search-and-replace edits, it "quoted" code from memory that wasn't actually in the file.
Each time my checks rejected the change, so the result was safe but useless: "Failed", over and over. What Gemma did get right every time was understanding the problem and explaining the fix. So I changed the design to match that: rules find the line, Gemma explains, I edit, the rule checks. The agent is still in the code as an experimental option for bigger models, but it's off by default.
It was hard to let go of the "it fixes everything while you sleep" idea. I think the result is more honest, and more useful.
Why Does Open Innovation Matter?
-
My code never leaves my machine. Sleepy Coder reads whole repositories: unfinished projects, class assignments, things I haven't published. With a closed API I'd be uploading all of that to someone else's server just to be told I forgot an
alt. - It costs nothing to run. No API key and no bill per request. You can scan as often as you want, which matters for a tool whose whole point is to be used casually.
- It works offline once the model is downloaded.
-
The model is swappable. Sleepy Coder uses Gemma by default, but if you already have another model in Ollama it will use that, and one environment variable (
SLEEPY_MODEL=…) picks a specific one. Nobody is locked into a provider. - I could see the limits and design around them. Because the model runs locally and I can test it as much as I like, I found out exactly where a small model is reliable and where it isn't, and built the app on the reliable part. That experiment is the main lesson of the project.
The Lazy Payoff
- On my CSS backgrounds gallery it found a duplicate
<h1>I didn't know about, told me which file to change and which one to keep, and confirmed the fix with one click. - Instead of opening every file to look for leftovers, one click on Find tasks lists them with the exact line, and Check again moves each to Done once it's fixed.
- Sleepy Coder never changes my files, so I can run it on any project without worrying about it.
Prize Categories
Gemma: the whole project runs on Gemma 3 4B locally through Ollama.
Thanks for reading! I'm a second-year web development student, and this is my third local-AI project in this Hacktoberfest, after a walk journal and a menu translator. This one taught me the most about where a small model shines and where it doesn't. If you try it on your own projects and it flags something silly, tell me: every false positive becomes a new test.
Top comments (0)