<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: chiragmangaldev3112</title>
    <description>The latest articles on DEV Community by chiragmangaldev3112 (@chiragmangaldev3112).</description>
    <link>https://dev.to/chiragmangaldev3112</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4131144%2F6eb359b1-e380-4ba4-b76a-77f7684e679e.png</url>
      <title>DEV Community: chiragmangaldev3112</title>
      <link>https://dev.to/chiragmangaldev3112</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chiragmangaldev3112"/>
    <language>en</language>
    <item>
      <title>Torpor — Your Inbox, Summarized While You Sleep (Fully Local)</title>
      <dc:creator>chiragmangaldev3112</dc:creator>
      <pubDate>Fri, 23 Oct 2026 06:49:51 +0000</pubDate>
      <link>https://dev.to/chiragmangaldev3112/torpor-your-inbox-summarized-while-you-sleep-fully-local-17ok</link>
      <guid>https://dev.to/chiragmangaldev3112/torpor-your-inbox-summarized-while-you-sleep-fully-local-17ok</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week3-2026-10-19"&gt;Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Torpor&lt;/strong&gt; — a lazy, fully-local overnight inbox digest. Instead of reading every message that came in overnight, you run one command and torpor reads them for you, using only open-weight models running on your own machine. Named after the energy-saving dormant state that animals — sloths included — drop into when there's no reason to spend effort.&lt;/p&gt;

&lt;p&gt;Point it at a JSON file of messages and it: embeds each one locally, scores it against a handful of "this needs a human" reference phrases by meaning (not keyword matching), splits messages into "needs you" vs. "can wait" using the inbox's own score distribution, and asks a local model to write a genuine 2–3 sentence summary of what actually matters.&lt;/p&gt;

&lt;p&gt;It also has a small local knowledge-bot mode: point it at any folder and ask it a question in plain English, and it'll find the relevant parts and answer with citations — the same local embed-and-answer pipeline, just pointed at files instead of messages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;ollama pull qwen3:8b
&lt;span class="nv"&gt;$ &lt;/span&gt;ollama pull nomic-embed-text
&lt;span class="nv"&gt;$ &lt;/span&gt;npm start

torpor: barely awake. 10 messages to get through, so I&lt;span class="s1"&gt;'ll do it.

While you were asleep: 3 of 10 actually need you. The other 7 can wait.

In short (qwen3:8b, running right here):
Partner NDA requires your signature by Friday'&lt;/span&gt;s kickoff call to avoid delaying
the start date. Overdue invoice &lt;span class="c"&gt;#4471 ($3,200) risks service interruption if&lt;/span&gt;
not paid by end of day. Production deploy failed at 2am due to a database
migration error&lt;span class="p"&gt;;&lt;/span&gt; no one has addressed it yet.

Worth getting up &lt;span class="k"&gt;for&lt;/span&gt;:
  &lt;span class="o"&gt;[&lt;/span&gt;0.64] legal@example.com — NDA needs your signature
  &lt;span class="o"&gt;[&lt;/span&gt;0.59] billing@vendor-example.com — Invoice &lt;span class="c"&gt;#4471 overdue&lt;/span&gt;
  &lt;span class="o"&gt;[&lt;/span&gt;0.58] ops@example.com — Production deploy failing

Can stay asleep &lt;span class="k"&gt;for &lt;/span&gt;these:
  &lt;span class="o"&gt;[&lt;/span&gt;0.57] friend@example.com — lunch next week?
  &lt;span class="o"&gt;[&lt;/span&gt;0.56] priya@example.com — Quarterly numbers due
  &lt;span class="o"&gt;[&lt;/span&gt;0.55] security-alert@example.com — New sign-in detected
  ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That whole run takes a few seconds, on a laptop, offline.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ node src/index.mjs ask src "how does torpor decide which messages need attention?"

Torpor decides which messages need attention by using a scoring system based
on statistical thresholds. The `splitByAttention` function [5] calculates the
mean and standard deviation of attention scores for all messages. It then
sets a threshold at the mean plus 0.5 times the standard deviation...

From:
  [1] index.mjs:97
  [2] index.mjs:65
  [3] digest.mjs:65
  [4] index.mjs:33
  [5] digest.mjs:33
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/chiragmangaldev3112/torpor" rel="noopener noreferrer"&gt;https://github.com/chiragmangaldev3112/torpor&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;Two separate local-AI calls, both through &lt;strong&gt;Ollama&lt;/strong&gt;: &lt;code&gt;nomic-embed-text&lt;/code&gt; for embeddings, &lt;code&gt;qwen3:8b&lt;/code&gt; for the summary. A naive fixed similarity threshold only caught 1 of 3 real urgent messages in testing — cosine similarity on short text clusters tightly — so the "needs you" split uses an adaptive threshold (the inbox's own mean + half a standard deviation) instead of a magic number.&lt;/p&gt;

&lt;p&gt;The whole thing is model-agnostic by design: swap &lt;code&gt;TORPOR_CHAT_MODEL&lt;/code&gt; to run it on a different model entirely, with no code changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It runs with no internet and no API key.&lt;/strong&gt; The whole pipeline — embeddings and the summary — happens on &lt;code&gt;localhost:11434&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your messages never leave your machine.&lt;/strong&gt; An overnight digest is, by definition, a summary of everything you haven't read yet — sending that to someone else's model every night is a real privacy cost a local model avoids entirely.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It's free to run forever.&lt;/strong&gt; No per-token billing on something meant to run every day, unattended.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You can swap the model.&lt;/strong&gt; Nothing here is tied to one vendor — change an env var, use a different model you've pulled.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This idea grew out of a larger assistant platform I'm building separately, where open-weight models aren't a one-off choice — a repository gets searched with local embeddings, a small model can be fine-tuned on someone's own writing through a local LoRA pipeline, and step-by-step task decisions are made by a local model through the same provider-agnostic interface. Torpor builds the first of those — local code search and Q&amp;amp;A — from scratch, and it's real working code in this repo, not just a description: &lt;code&gt;src/codesearch.mjs&lt;/code&gt; chunks any folder, embeds it locally, and answers questions with citations, the same embed-then-chat pattern the inbox digest uses on messages.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Lazy Payoff
&lt;/h2&gt;

&lt;p&gt;Before: open the inbox, scan every message, figure out what's actually urgent. After: run one command, read three sentences, know exactly what needs you — the overdue invoice, the failed deploy, the NDA deadline, not the lunch invite.&lt;/p&gt;

&lt;p&gt;Honest caveat: the attention/FYI split is a simple statistical heuristic, not a trained classifier — it missed a security alert in testing (landed just under the threshold). Good enough for a weekend build, not a production safety net.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Best Use of Gemma&lt;/strong&gt; — Torpor is model-agnostic by design (&lt;code&gt;TORPOR_CHAT_MODEL&lt;/code&gt; env var), and I tested it end-to-end against Google's &lt;a href="https://ollama.com/library/gemma3" rel="noopener noreferrer"&gt;Gemma 3&lt;/a&gt; via Ollama: both the inbox digest and the code-search &lt;code&gt;ask&lt;/code&gt; command work correctly. One honest note — Gemma 3 tends to answer in a numbered list even when asked for short prose, where &lt;code&gt;qwen3:8b&lt;/code&gt; writes flowing sentences; still accurate, just a different style.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>ollama</category>
      <category>opensource</category>
    </item>
    <item>
      <title>I made "verified" mean something for AI agent instructions — here's what that actually took</title>
      <dc:creator>chiragmangaldev3112</dc:creator>
      <pubDate>Fri, 18 Sep 2026 09:52:09 +0000</pubDate>
      <link>https://dev.to/chiragmangaldev3112/i-made-verified-mean-something-for-ai-agent-instructions-heres-what-that-actually-took-2ha8</link>
      <guid>https://dev.to/chiragmangaldev3112/i-made-verified-mean-something-for-ai-agent-instructions-heres-what-that-actually-took-2ha8</guid>
      <description>&lt;p&gt;Every AI coding agent I used — Claude Code, Cursor, GitHub Copilot —&lt;br&gt;
failed in the same few ways. It guessed at an ambiguous request instead&lt;br&gt;
of asking. It graded its own work instead of checking independently. It&lt;br&gt;
forgot a project's conventions the moment a new session started.&lt;/p&gt;

&lt;p&gt;So I wrote the process down: 37 "playbooks" covering bug fixing, feature&lt;br&gt;
development, code/security review, safe database migrations, incident&lt;br&gt;
response, and more. One instruction set, installed once, read natively by&lt;br&gt;
whichever AI tool you're using (15 supported so far).&lt;/p&gt;

&lt;p&gt;That part's a straightforward pitch. What I actually want to write about&lt;br&gt;
is the harder problem underneath it: &lt;strong&gt;once you claim something is&lt;br&gt;
"verified," what does that actually have to mean before the word is worth&lt;br&gt;
anything?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The trap: "verified" as a vibe
&lt;/h2&gt;

&lt;p&gt;Early drafts of some of these playbooks said things like "this was tested&lt;br&gt;
and works." That's not verification — it's a vibe wearing verification's&lt;br&gt;
clothes. It has the &lt;em&gt;shape&lt;/em&gt; of a checked claim without any of the&lt;br&gt;
substance, and it's exactly the kind of self-assessment I was trying to&lt;br&gt;
get an AI agent to stop doing in the first place. If I'm asking an agent&lt;br&gt;
to never trust its own "looks right," I can't ship a project full of my&lt;br&gt;
own unchecked "looks right"s.&lt;/p&gt;

&lt;p&gt;So I went back through every playbook and either found the real evidence&lt;br&gt;
behind every claim, or removed the claim. This is where it got&lt;br&gt;
interesting, because &lt;em&gt;actually running things&lt;/em&gt; — not re-reading code,&lt;br&gt;
not reasoning about it — surfaced real bugs I would never have caught&lt;br&gt;
otherwise:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A sparse-page detection script for scanned PDFs was off-by-one on page
counting. It assumed "N form-feed characters means N+1 pages," but
direct byte-level inspection of a real scanned PDF showed &lt;code&gt;pdftotext&lt;/code&gt;
emits one trailing form-feed &lt;em&gt;per page&lt;/em&gt;, including the last one. The
math only looked right until I actually counted bytes in a real file.&lt;/li&gt;
&lt;li&gt;A file-extension parser detected format from the &lt;em&gt;full path&lt;/em&gt;, not the
filename — so a file sitting in a directory like &lt;code&gt;v2.0/README&lt;/code&gt; (a dot
in the parent directory name, not the file) got misdetected as
extension &lt;code&gt;0/readme&lt;/code&gt; and routed to completely the wrong handler.&lt;/li&gt;
&lt;li&gt;A security hook meant to scan every file-write for leaked credentials
had a matcher that only covered &lt;code&gt;Write&lt;/code&gt; and &lt;code&gt;Edit&lt;/code&gt; tool calls —
&lt;code&gt;MultiEdit&lt;/code&gt; calls bypassed it entirely. Nobody wrote that gap in on
purpose; it just never got exercised until a re-evaluation pass
specifically tried to break it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these were found by review. All of them were found by running&lt;br&gt;
the actual thing against a real case and checking the actual output.&lt;/p&gt;

&lt;h2&gt;
  
  
  Independent review catches what self-review can't — even for an AI
&lt;/h2&gt;

&lt;p&gt;The MultiEdit gap above is the one I want to dwell on, because of &lt;em&gt;how&lt;/em&gt;&lt;br&gt;
it was found. I had a separate pass — same underlying model, zero memory&lt;br&gt;
of why the original hook was built the way it was — re-check the finished&lt;br&gt;
work cold. It didn't know the design history, didn't know what the&lt;br&gt;
original author was trying to protect against. It just tested the actual&lt;br&gt;
behavior against the actual documentation and found they didn't match.&lt;/p&gt;

&lt;p&gt;This is the same reason code review works on human teams: the person who&lt;br&gt;
wrote something is the worst-positioned person to spot what's wrong with&lt;br&gt;
it, because they already have a model in their head of what it's&lt;br&gt;
&lt;em&gt;supposed&lt;/em&gt; to do, and that model quietly overrides what's actually in&lt;br&gt;
front of them. It turns out this holds for an AI agent reviewing its own&lt;br&gt;
prior work too — a fresh pass with no attachment to the original&lt;br&gt;
reasoning catches things a self-review pass structurally can't, not&lt;br&gt;
because it's smarter, but because it isn't carrying the same blind spot.&lt;/p&gt;

&lt;h2&gt;
  
  
  Signing matters more once you think about what the content becomes
&lt;/h2&gt;

&lt;p&gt;The playbooks aren't just documentation — once installed, they become&lt;br&gt;
literal instructions an AI agent with shell access follows. That's a&lt;br&gt;
different threat model than a typical doc site. If the backend serving&lt;br&gt;
this content were ever compromised, a swapped file isn't a broken link,&lt;br&gt;
it's an instruction an agent might actually execute.&lt;/p&gt;

&lt;p&gt;So every release is signed with Ed25519 (&lt;code&gt;ssh-keygen -Y sign/verify&lt;/code&gt;, not&lt;br&gt;
OpenSSL — stock macOS ships LibreSSL, which can't verify Ed25519&lt;br&gt;
signatures at all, confirmed by trying it directly rather than assuming),&lt;br&gt;
and the installer re-hashes every fetched file against a signed manifest&lt;br&gt;
before writing anything. The backend can withhold a release, but it can't&lt;br&gt;
successfully substitute one, because it never holds the private key.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this leaves things
&lt;/h2&gt;

&lt;p&gt;37 playbooks, MIT-licensed, free, no account needed:&lt;br&gt;
&lt;a href="https://github.com/chiragmangaldev3112/agent-playbooks" rel="noopener noreferrer"&gt;https://github.com/chiragmangaldev3112/agent-playbooks&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I don't think "verified" is a box to check once. It's a standing bar&lt;br&gt;
that gets tested every time someone looks at the thing again with fresh&lt;br&gt;
eyes — which is exactly what a second, independent pass is for, and&lt;br&gt;
exactly what found every bug described above.&lt;/p&gt;

&lt;p&gt;Happy to go deeper on any part of this — the signing setup, the&lt;br&gt;
per-tool artifact generation, or the specific bugs — in the comments.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>productivity</category>
      <category>development</category>
    </item>
  </channel>
</rss>
