We Built a CLI That Gets Smarter Every Time You Use It

vektormemory1 pts0 comments

We Built a CLI That Gets Smarter Every Time You Use It | by Vektor Memory | Jun, 2026 | MediumSitemapOpen in appSign up<br>Sign in

Medium Logo

Get app<br>Write

Search

Sign up<br>Sign in

We Built a CLI That Gets Smarter Every Time You Use It

The self-improving prompt engine that learns from your codebase history

Vektor Memory

13 min read·<br>16 hours ago

Listen

Share

Press enter or click to view image in full size

We shipped Via v0.4.0 today another weekend project based on utilizing prompt development in a different method. The headline feature is something we have not seen as a methodology in the AI tooling space currently that we are aware of.<br>Every prompt you run teaches the next one. Every correction gets stored. Every success becomes a reusable pattern. After a month of daily use, the prompts Via generates know more about what works in your codebase than you consciously remember.<br>Here is how we built it, why it works, and what it took to get there.

The Problem With Every Other Prompt Tool<br>The AI coding tool space has a prompt problem. Not a model problem. Not a context window problem. A prompt problem.<br>73% of engineering teams now use AI coding tools daily. The developers pulling ahead are not using better models. They are using better prompts. Specific, structured, historically-informed prompts that give the model enough context to produce quality output on the first try.<br>The problem is that every prompt tool on the market is static. Someone writes a template, ships it, and it never changes. You get the same generic structure whether it is your first day using the tool or your hundredth. The tool has no memory of what worked for you last week, what you tried and abandoned last month, or what your team’s specific patterns look like.<br>The biggest frustration cited by 66% of developers is dealing with AI solutions that are almost right but not quite. The second biggest is that debugging AI-generated code takes longer than debugging code they wrote themselves.<br>Both problems trace back to the same root cause. The AI does not know your codebase. It does not know what you tried before. It does not know what your team considers a good solution. Every session starts from scratch.<br>Via v0.4.0 fixes that.<br>The Research Behind the Design<br>Via prompt did not come from thin air. While building it we found a paper published in March 2026 that described almost exactly what we were trying to build.<br>MemAPO, from a team at Zhejiang University, reconceptualises prompt optimization as generalizable and self-evolving experience accumulation.<br>It maintains a dual-memory mechanism that distills successful reasoning trajectories into reusable strategy templates while organising incorrect generations into structured error patterns that capture recurrent failure modes.<br>Given a new prompt, the framework retrieves both relevant strategies and failure patterns to compose prompts that promote effective reasoning while discouraging known mistakes.<br>That is precisely the architecture Via prompt takes inspiration from. Success patterns on one side, failure patterns on the other, both retrieved to inform the next prompt. MemAPO achieves the best average performance across all datasets while reducing cost by approximately 57.2% compared to the strong baseline TextGrad.<br>The difference between MemAPO and Via prompt is deployment. MemAPO is a research system evaluated on controlled benchmarks. Via prompt is a production CLI that runs locally, requires zero external dependencies at the base tier, integrates with real coding agent workflows, and stores everything on your machine. The research proved the pattern works. Via ships it.<br>The full paper is at arxiv.org/abs/2603.21520 and is worth reading if you want to understand the theoretical foundations behind the approach.

What Via Prompt Actually Does<br>The core idea is simple. Via keeps a local history of every prompt you generate, every outcome you record, and every constraint you add. When you ask for a new prompt, it retrieves the most relevant past patterns and injects them into the generated prompt before you see it.<br>The terminal output looks like this:<br>┌─ VIA PROMPT ENGINE ───────────────────────────<br>│ Confidence High 🟢 (12 past tasks, 91% success rate)<br>│ + Context injected:<br>│ + "add JWT authentication to the Express API..." → success<br>│ + "implement token refresh middleware..." → success<br>│ - AVOID injected:<br>│ ⚠ never use Passport.js [global]<br>│ ⚠ avoid localStorage for auth tokens [global]<br>└───────────────────────────────────────────────[Generated Prompt — ready for Claude / Codex / Gemini]## SYSTEM<br>You are implementing a feature. Match the existing architecture<br>and code style exactly. No new dependencies unless explicitly<br>requested.## GOAL<br>implement OAuth login for the API## PATTERNS THAT WORKED<br>- Task: "add JWT authentication to the Express API" → succeeded<br>- Task: "implement token refresh middleware" → succeeded## AVOID<br>- never use Passport.js (reason: tried and abandoned, too complex)<br>-...

prompt patterns problem from success tool

Related Articles