Five projects, one rule: don't let the model decide
A tour of what I shipped this fall: repoward, JevPolicy, a rebuilt Brownfield Cartographer, the new Conversion Engine, and YTGrab. Most of them share one idea about where LLM judgment belongs.
On this page
I’ve shipped five projects since the last time I wrote here. Four of them are about AI agents, and looking back, they keep landing on the same design decision: the model can supply judgment, but something deterministic makes the final call. The fifth is a video downloader, which is a different kind of discipline (the kind where you actually have to ship installers).
Here’s what each one does, and why.
repoward: guard the sequence, not the call#
repoward is a GitHub MCP server built around one attack. An agent reads a malicious public issue, then reads a private repository, then posts what it found in a public pull request. Invariant Labs published exactly this against agents using GitHub’s MCP server. Every one of those calls is allowed on its own, so per-tool permissions don’t help. The problem is the sequence.
So repoward tracks what the agent has already read, using facts from GitHub rather than the model’s opinion:
- After reading anything from a private repository, writes to public repositories are denied.
- After reading an issue, PR, or comment from someone outside
OWNER,MEMBER, andCOLLABORATOR, or a CI job log, every write needs human approval.
Pipeline
None of this depends on the model noticing an attack or on scanning text for bad phrases, so rewording or encoding the payload doesn’t get around it. The test suite replays the published attack against real repositories. Approvals are deliberately narrow: one exact call, at one exact commit, usable once, then expired.
It’s alpha, and it hasn’t had an independent security review. It also only sees its own tools. If your agent has a shell or another MCP server, that’s still a way out, and the threat model says so on the first page. It’s on PyPI if you want to try it.
Full write-up: Every call was allowed. The sequence was the attack.
This is the second MCP security project I’ve built, after Safe-Fetch. Both start from the same observation: the tools we wire into agents mostly weren’t built with an attacker in mind.
JevPolicy: code calculates, the model judges, policy decides#
JevPolicy is the same idea turned into a library. LLMs are good at questions like “is this support ticket about billing?” They’re a poor choice for the thing that actually decides what your application does, because you can’t explain, replay, or safely change that decision.
JevPolicy splits the job. The model answers typed questions and returns probabilities. Ordered YAML rules turn those signals into a decision, with an audit trace. If the provider times out or returns garbage, the result is an explicit fallback from the policy, never a silent “allow”.
The part I care most about is changing policies safely:
- Replay. Recorded decisions can be re-run against a new policy without calling the model again.
- Shadow mode. A candidate policy runs on the same live provider response as the real one, and only the real one drives side effects.
- Semantic diff. Rules are matched by ID and reordering is reported separately, because order decides which rule wins.
It’s on npm as @sanoy24/jevpolicy.
Full write-up: Code calculates. The model judges. Policy decides.
Brownfield Cartographer: from summaries to evidence#
The Brownfield Cartographer started as a one-week 10 Academy brief: four LLM-assisted agents that generated onboarding docs for a codebase. It worked, in the sense that it produced plausible documents. But the question I actually wanted answered was “what breaks if I change this?”, and a plausible answer to that question is worse than no answer.
So I rebuilt it as a deterministic engine. It maps dependencies that a language server can’t see, like a table written by a Python job, transformed in SQL, and consumed by a dbt model, and it attaches file-and-line evidence to every result.
cartographer impact models/staging/stg_orders.sql
cartographer lineage customers::first_order
It runs offline, needs no API key, and never executes repository code. When it can’t resolve something (dynamic SQL, computed Airflow task ids, unknown columns), it reports it as unresolved instead of guessing. The same query engine sits behind the CLI, a Python API, a read-only MCP server, and a GitHub Action that comments downstream impact on every pull request. It’s on PyPI.
Full write-up: I deleted the LLM from my codebase analysis tool
Conversion Engine: wording that follows the evidence#
The Conversion Engine also began as a 10 Academy brief, built for one consulting company. The rewrite makes it a general prospecting engine: everything company-specific lives in a playbook, so the same code can sell for anyone.
The core idea is that every signal about a prospect (funding, hiring velocity, layoffs, leadership changes) carries a confidence level, and the email’s wording has to match it. Strong signals get stated. Medium ones get hedged. Weak ones are removed from what the model sees and turned into questions. When the evidence is thin, the classifier abstains and the engine sends a general exploratory email instead of a confident pitch it can’t back up.
It’s also safe by default. Nothing is delivered until live sending is switched on, every draft waits in a review queue for a person, and cold SMS is blocked in code.
The evals are deterministic too. Thirty fictional companies, each with a known brief, and the checks confirm that every number in an email traces back to that brief. No second LLM grades the first. Classification went from 22/30 to 30/30 once segments had to have their core signal, and drafts from both Claude Haiku and Sonnet now pass all 30 cases. Passing means an email is honest and on-voice. It doesn’t mean it’s persuasive, and the README says that too.
Full write-up: An outreach engine that won’t claim more than it knows
YTGrab: the unglamorous part is shipping#
YTGrab is the odd one out: a local video downloader with a clean browser UI. You paste a link, pick the exact quality, and it downloads, with everything running on your own machine. It now handles YouTube, Vimeo, X, Reddit, and Instagram.
The core is one Go program. A small server bound to 127.0.0.1 drives yt-dlp, streams progress to the page, and keeps the queue in SQLite so it survives restarts. Media never passes through the server or the browser.
Most of the work, though, was distribution. Builds for macOS and Linux on Intel and ARM, plus Windows, a checksum-verified install script, a Homebrew tap, a Scoop bucket, and a page that tells you when a new version is out. It’s at v1.23 now. Getting the thing onto someone else’s computer turned out to be a bigger job than writing it.
Full write-up: 23 releases in three weeks: building a local-first video downloader in Go
The common thread#
If I had to compress this fall into one sentence: put the model where its mistakes are cheap, and put deterministic code where they aren’t. repoward enforces flow rules the model can’t argue with. JevPolicy keeps decisions in versioned rules. The Cartographer reports “unresolved” instead of guessing. The Conversion Engine won’t let an email claim more than its evidence supports.
All of it is open source. The project pages have the details, and the code is on GitHub.