The Test Script That Keeps the Vibes Honest
  • Home
  • blog
  • The Test Script That Keeps the Vibes Honest
By Stephen Turner profile image Stephen Turner
4 min read

The Test Script That Keeps the Vibes Honest

TL;DR

AI-assisted development can produce working-looking code quickly, but confidence does not come from speed. It comes from repeatable verification. A script like npm run verify:verifier-regression turns testing into a habit: it checks whether the verifier still classifies the same scenarios correctly after new prompts, refactors, cleanup, or architecture changes. In vibe-coded projects, this is not optional cleanup. It is how you stop momentum from becoming drift.


One of the easiest mistakes in AI-assisted development is believing the hard part is getting code to exist.

With AI and vibe coding, that gap has collapsed. You can describe a feature, generate a scaffold, wire an integration, refactor a module, and get something running much faster than before. But that creates a different problem.

AI can create momentum faster than it creates confidence.

That is why testing scripts matter. Not vague testing. Not “I clicked around, and it seemed fine.” Not “the model said it fixed the issue.” I mean explicit, repeatable, named scripts that turn verification into part of the workflow.

For me, one of those commands is:

npm run verify:verifier-regression

That command may look small, but the idea behind it is important. It represents a shift from “does this code look right?” to “does this system still behave the way we said it should behave?”

An npm script is more than a convenience shortcut. It is a contract. It says: before I trust this change, this exact verification path must still pass. I do not need to remember the whole checklist each time. The repo carries the checklist for me.

That matters even more in vibe-coded projects because the codebase can drift quickly. One prompt adds a feature. Another prompt patches a bug. A third prompt rewrites a helper because the model thinks it found a cleaner abstraction. Each individual change may look reasonable. After a few rounds, you may no longer know whether the product still matches the original intent.

Regression testing is how you catch that drift.

The “verifier” part is especially important. In AI-assisted systems, the verifier is not just checking code style or whether a function returns something. It is often checking whether the system can safely do what it claims it can do.

In a project like GePT-AI Studio, that matters because the product is not just a chat interface. It is a desktop AI platform with agents, MCP servers, plugins, skills, local and SaaS model paths, enterprise integrations, permissions, credentials, and runtime dependencies. A verifier in that kind of system has to answer practical questions: Is the required runtime available? Is the MCP server reachable? Is the plugin authenticated? Is the Teams integration allowed to send this message? Is the user missing a permission? Is the failure recoverable? Can the system explain what went wrong?

Those checks are product behavior.

If the verifier changes accidentally, the product changes. If a missing credential used to trigger a clear readiness warning but now results in a generic failure, that is a regression. If an unavailable MCP server used to block an agent workflow before execution, but now lets the workflow start and fail halfway through, that is a regression. If the Teams plugin used to distinguish among “user not found,” “missing Graph permission,” and “token expired,” but now collapses them all into “integration failed,” that is a regression.

The code may still compile. The UI may still render. The demo may still work. But the product became less trustworthy.

That is the value of npm run verify:verifier-regression. It protects the verifier's behavior. It ensures the system still classifies known cases correctly, reports the right failure types, preserves the expected schema, and gives the user or operator a useful path forward.

In practice, I want this kind of script to run after any meaningful AI-assisted change: after a refactor, after cleanup, after an instruction-set expansion, after a GAP analysis fix, before merging, and before declaring a phase complete. Especially before trusting a model-generated rewrite that “simplified” something.

The exact implementation can vary. The script might run TypeScript fixtures, compare outputs against saved baselines, execute scenario files, or validate JSON schemas, severity levels, diagnostic messages, and recovery actions.

The mechanics matter, but the discipline matters more.

The script should answer a few basic questions: Does the verifier still recognize every scenario it recognized before? Does it still separate acceptable, blocked, degraded, and failed states? Does it still produce actionable messages instead of vague errors? Did a refactor change behavior intentionally or accidentally?

That last point is important. Regression tests are not there to freeze the product forever. They are there to make behavior changes explicit. Sometimes the test should fail because the expected behavior changed. That is fine. But the failure forces the conversation: did we mean to change this, or did the change sneak in?

Testing scripts also reduce decision fatigue. Without them, every review becomes a custom investigation. What should I check? Which cases matter? Did I remember the edge case from last week? Did the AI modify a path I forgot about?

With a script, the command becomes an operational checklist. It encodes lessons from failures, bugs, confusing setup paths, plugin edge cases, and product decisions that shouldn't live only in my head.

The future of vibe coding is not just better prompts. It is better verification loops. Prompts create output. Tests preserve intent. Scripts make that preservation repeatable.

So when I add a command like npm run verify:verifier-regression, I am not adding bureaucracy. I am adding a guardrail around speed.

Because moving fast is useful. Moving fast while knowing what still works is engineering.

By Stephen Turner profile image Stephen Turner
Updated on
blog Vibe Code