Skip to main content

Text, Structure, Meaning: grep, ast-grep and a Local LLM Classifier

· 18 min read

Three readers looking at the same line of code: one sees letters, one sees a tree, one sees what the line is for

Introduction​

Every codebase eventually needs the same change in many places: a library swap, an API that changed shape, a convention the team agreed on last week. You know the usual options. Find and replace sees only text. Doing it by hand works for ten places and falls apart at three hundred. An AI assistant will happily make all three hundred edits, and then someone has to review each one.

In this blog, we will look at three tools that read code at three different levels. grep reads text. ast-grep reads structure, the syntax tree your editor already builds. A small local model, asked through classif, reads meaning. They are separate tools, each takes the part of the job it can see, and the interesting part is where each one stops.

classif: A Bridge Between Code and Semantic Reasoning

· 22 min read

A bridge between deterministic code and semantic reasoning

Introduction​

In this blog, we will look at how programs make decisions about text, and how that changed once small language models started running on our own machines. Along the way, I will introduce classif, a small command-line tool I built that lets a shell script ask a local model a question and act on the answer.

Seven Ways to Edit Many Lines in Neovim, Scored in Keystrokes

· 11 min read

Cursors sitting at the same spot on every line of a terminal editor

Sooner or later you make the same small edit on line one, then line two, then line three. Neovim has had several ways to avoid that loop for years, and a newer one arrives with 0.13: built-in multicursor. This post walks through each method with a small example, covers multicursor in depth, and ends with a rule of thumb and a keystroke count for nine exercises. Multicursor is available only in nightly builds until Neovim 0.13 ships; every other method works in any Neovim, and in Vim.

The post goes with the video Neovim Multi-Line Editing Overview, Multicursor Included, which plays three of the exercises live.

Paste tmux Scrollback by Typing the Words You Remember

· 9 min read

tmux pane regex picker highlighting an error in scrollback

The text you need next is usually already on your screen. A pod name three commands back, the error string you want to search for, a URL a tool printed, the long flag you typed twenty minutes ago. Getting it into your current prompt means reaching for the mouse, and the mouse gets it wrong: a soft-wrapped line comes back with a newline in the middle, and a newline in a shell paste runs the command. This post covers a tmux plugin that selects the range by the words you remember, shows you the selection in the real pane while you type, and pastes it without submitting it.

Running Work and Personal Claude Code on One Machine

· 8 min read

Two Claude Code accounts on one machine

If you run more than one Claude Code account on a machine (work and personal, two clients, a locked-down login next to a sandbox), you switch between them by hand. Claude Code holds one active login at a time, so forgetting to switch means running the wrong account. This post shows how to make the switch automatic: the right account loads from the directory you are in, with nothing to remember.

A Great Release Isn't Always Right for Your Config: Neovim 0.12

· 5 min read

Neovim 0.12 Migration

Neovim 0.12 landed with a pile of things that used to be plugins: a native plugin manager (vim.pack), a native :restart, stock LSP keymaps, treesitter incremental selection. The release notes read like a checklist of things to rip out of your config.

So I went through mine, one area at a time, asking each the same question: should this move to the 0.12 way of doing it?

Four of the seven came back with some flavor of "no," and that turned out to be the useful part. Three earned a yes and I made the changes. The rest I left alone on purpose. The features are real and they work, but whether your config should adopt them is a different question, and the honest answer was mostly to leave it alone.

Your AI Agent Should Read Your Notes Before Answering

· 11 min read

RAG Architecture

I have 395 notes in Obsidian and ~2,800 memories from past AI sessions. My AI agent knows none of it unless I paste it in manually. And I can only paste what I remember to paste — which defeats the point of having a knowledge store.

So I built a hook that fires before every prompt, searches a unified vector store, and injects the relevant context before the agent thinks. R2R as the RAG backend, pgvector for storage, Ollama for embeddings, all on a homelab Kubernetes cluster. Total latency: under 100ms. Zero tokens consumed in the retrieval path.

The value isn't the search itself. It's what surfaces when you stop choosing what's relevant. Ask about a Kubernetes pattern and a six-month-old Obsidian note appears. Debug a tmux issue and a memory from a previous session shows up with the exact fix. The agent answers from your accumulated knowledge, not just its training data.

Your Platform Already Has AI Users

· 7 min read

Your Platform Already Has AI Users

Platform engineering matured around one thesis: reduce cognitive load for developers. The CNCF Platforms White Paper codified the pattern. Internal developer portals, golden paths, self-service infrastructure — all designed so human teams ship faster without drowning in complexity.

AI agents now consume the same infrastructure. They clone repos, call CI/CD APIs, create pull requests, query issue trackers. But they don't read your Confluence wiki or file support tickets. They parse tool schemas and call structured APIs.

The bottlenecks shift. Humans hit cognitive overload: too many tools, tribal knowledge, context switching. Agents hit context window limits: too many tokens, irrelevant information, unstructured access. Same problem class, different constraint.

The CNCF platform engineering model transfers directly. Here's the mapping, dimension by dimension.

Give Your AI Agents a Brain That Survives a Reboot

· 13 min read

Agent Memory Architecture

AI agents learn things about you as you work. Your coding style, your infrastructure quirks, which tools you prefer, how you name things. That context accumulates across dozens of sessions. But it evaporates when the session ends or when you switch tools. Use Claude Code in the terminal, Cursor in the IDE, and a web-based MCP client on your phone. Three tools, three isolated memory silos. You can share static knowledge with files. But the context that accumulates from your interactions has nowhere to go.

What if the memory layer was separate from the tools entirely? Redis Agent Memory Server does exactly that. It's an open-source memory service that speaks MCP over HTTP. CLI tools (Claude Code, Codex, Gemini CLI), IDE tools (Cursor, Windsurf, Copilot), and any web-based MCP client all connect to the same store. Because the server runs over HTTP, you can expose it beyond the homelab with Cloudflare Tunnels or similar, so tools outside your network connect too. The memory lives on your infrastructure, not theirs.

The server provides two tiers: working memory (session-scoped context that auto-promotes to long-term) and long-term memory (persistent, semantically searchable). It exposes both a REST API and an MCP interface.

I deployed it on my homelab Kubernetes cluster. Four pods, one PVC, zero API costs. Here's how.

What If Your Docker Was Also Your Kubernetes?

· 5 min read

vind

Local Kubernetes development has rough edges. kind and minikube make cluster creation trivial, but common workflows need extra setup.

Exposing a LoadBalancer service means configuring MetalLB or tunneling through ngrok. Testing a new image means running kind load docker-image every iteration.

vind encapsulates these workflows. Kubernetes nodes run as Docker containers sharing the host daemon, so images pull straight from the local cache. A built-in LoadBalancer controller assigns real IPs without additional configuration.