Skip to content

Vibe Engineering Without Losing Control

Core Concept LearningAugust 14, 20268 min read

An agent can turn a small ticket into a working patch quickly. It can also turn an ambiguous ticket into a convincing pile of changes that nobody can explain. The engineering problem is therefore not speed alone; it is preserving a visible chain from intent to evidence to ownership.

This guide uses one payments-api task—add an idempotency key to POST /payments—to build that chain. You will see where project rules, permissions, checkpoints, autonomous loops, external tools, reusable instruction packs, and pull-request review fit. For the underlying agent loop, see How Claude Code Works; for the external-tool boundary, see MCP and Plugins. The examples use Claude Code terminology and are current as of August 2026; exact flags and plugin behavior can change, so pin the CLI and check its local reference before automating it.

Accountable agent workflow from intent to reviewed change
Accountable agent workflow from intent to reviewed change

Vibe engineering is a control problem, not a typing contest

Vibe engineering is a useful name for working at the speed of an agent: describe an outcome, let the tool explore and edit, then steer it with feedback. Simon Willison’s writing on agentic engineering makes the important accountability point: the person who deploys the result still owns the consequences. More generated code increases the value of tests, review, and an inspectable trail; it does not remove them.

For payments-api, the contract is more precise than “make payments safer”: accept Idempotency-Key, persist the first successful result by key, return the same result for a retry, and reject a reused key with a different request body. That contract gives the agent room to choose an implementation while giving the reviewer something falsifiable to check. The goal is a short feedback loop with a hard definition of done.

Choose the control surface that matches the risk
SurfaceWhat it controlsEvidence it should produce
PromptImmediate intent and scopePlan and assumptions
Project rulesEvery session’s boundariesConsistent commands and conventions
Tests / CIMachine-checkable behaviorPassing checks and failure cases
Git / PRDurable ownership and reviewDiff, history, approval, merge

Quick reference

  • Treat generated code as a proposal until tests and review establish evidence.
  • State the input, expected output, failure behavior, and out-of-scope work before delegating.
  • Measure speed as time to an accepted change, not time to the first plausible diff.
  • Keep a human accountable for the product decision and the merge decision.

Remember this

Agent speed is valuable only when every fast path ends in an observable acceptance check.

CLAUDE.md and YOLO modes define the execution boundary

A CLAUDE.md file is an always-on project instruction surface: it can tell an agent how to run tests, which directories are generated, what the API conventions are, and when it must stop for approval. Keep it operational and versioned. A rule such as “run npm test before reporting success” is stronger than a style wish because it names a checkable action.

Permission flags change who approves tool calls; they do not make an agent correct. --dangerously-skip-permissions (often called YOLO mode) removes interactive friction, so it belongs only inside a disposable, least-privileged environment with no production credentials. A repository rule can still require a diff review and a clean test run, but it cannot undo a destructive command after the fact. Separate the speed of execution from the blast radius of execution.

Permission and verification are separate controls
Permission and verification are separate controls

Quick reference

  • Put commands, forbidden paths, secrets guidance, and definition-of-done checks in project rules.
  • Use normal approval prompts when the agent can reach personal files, production systems, or irreversible APIs.
  • If using YOLO mode, isolate the workspace, cap network access, and mount only disposable credentials.
  • Test the rules by asking the agent to explain them before it edits the target feature.

Remember this

Permissions answer ‘may this tool call run?’; tests and review answer ‘should this result ship?’

Checkpoints are fast undo; Git is the durable source of truth

Agent interfaces often offer checkpoints or rewind: a convenient way to return the workspace to an earlier state during exploration. Use them like a local scratchpad. They are useful when the agent edits the wrong files, changes direction, or needs a clean retry, but they are tied to the tool’s session and may not capture the team’s review context.

Git records the durable engineering story: named commits, branch ancestry, authorship, review comments, CI status, and the exact change that was merged. Before asking the agent to implement payments-api, create a branch and capture a clean baseline. Commit coherent milestones—contract, implementation, tests—so a reviewer can bisect or revert without reconstructing an ephemeral session.

Checkpoint versus Git: exploration and durable history
Checkpoint versus Git: exploration and durable history

Quick reference

  • Use checkpoints for rapid local experimentation and Git commits for recoverable project history.
  • Inspect git status and git diff --stat before and after each autonomous phase.
  • Never treat an uncommitted workspace as the only backup of a valuable change.
  • A good commit names one verifiable state, not every file the agent happened to touch.

Remember this

Rewind helps you explore; Git lets the team prove, review, reproduce, and undo the result.

Ralph loops automate feedback; MCP supplies bounded context

A Ralph loop is an autonomous iterate-until-done pattern associated with Geoffrey Huntley and popularized by the Wiggum-style workflow: give the agent a task, run checks, feed the result back, and stop when the acceptance condition passes. The loop is only as good as its stop condition. “Keep improving” can run forever; “the idempotency test passes, TypeScript is clean, and the diff touches only the payments module” is finite and inspectable.

MCP—the Model Context Protocol—connects an agent to external tools and resources such as issue trackers, GitHub, documentation, or a read-only database. It extends the agent’s reach, so it also extends the trust boundary. Give a Jira tool permission to read the ticket before giving it mutation rights; give a database tool a read-only identity; log which external facts informed the patch. MCP is a contract for tool access, not a guarantee that the tool’s data is current or safe.

Bounded Ralph loop with least-privilege MCP context
Bounded Ralph loop with least-privilege MCP context

Quick reference

  • Define a loop budget: maximum iterations, time, tool calls, and changed paths.
  • Make checks deterministic and return actionable failures instead of prose-only feedback.
  • Start MCP integrations read-only; add write access only for an explicit workflow step.
  • Record source IDs and timestamps when external systems provide requirements or evidence.

Remember this

Autonomy needs a bounded evaluator; connected context needs least privilege and provenance.

Skills and plugins package repeatable engineering judgment

A skill is an on-demand instruction pack for a focused task: for example, a database-migration review that explains the checks, files, and failure modes to inspect. A plugin is a shareable bundle that can distribute several skills, commands, hooks, agents, or MCP connections. Start with a small plugin when multiple repositories need the same workflow; keep project-specific policy in the repository so it remains visible beside the code.

The official feature-dev plugin illustrates the pattern with a seven-phase workflow: discovery, codebase exploration, clarification, architecture, implementation, review, and summary. That sequence is useful because it puts uncertainty before editing and review after editing. It is not a substitute for a team’s approval policy: a plugin can suggest a process, while the repository and CI enforce the acceptance boundary.

Quick reference

  • Use skills for narrow, reusable judgment; use plugins for distribution and composition.
  • Version plugins and review their tool permissions like application dependencies.
  • Keep instructions progressive: load the small core first and detailed references only when needed.
  • Add a skill only after a repeated failure or review comment shows a real pattern worth encoding.

Remember this

Package repeated decisions, but keep ownership, policy, and enforcement close to the project.

The accountable path: ticket → agent → checks → PR

A ticket-to-PR workflow is where the pieces meet. Jira provides the request and acceptance criteria; the agent reads the repository rules, explores the code, and proposes a plan; MCP can fetch the ticket or post status; skills can run the project’s review routine; Git records the implementation; CI and a human reviewer decide whether the change is acceptable. The important boundary is that “agent finished” and “PR approved” are different states.

For the payments-api example, the intentional failure is a retry with the same idempotency key but a different amount. The service should reject it, the test should demonstrate that rejection, and the PR should show the test. If the loop reports success without that case, the failure is not an agent personality problem—it is an incomplete acceptance contract. Fix the contract or the evaluator, then rerun from a clean checkpoint.

Ticket to pull request: the agent supplies evidence, humans accept the change
Ticket to pull request: the agent supplies evidence, humans accept the change

Quick reference

  • Copy the ticket ID into the branch and PR so intent remains traceable.
  • Require the PR to state changed behavior, tests run, known limitations, and external tools used.
  • Let CI enforce format, type checks, unit tests, security checks, and changed-path rules.
  • Reserve human review for product correctness, security boundaries, and trade-offs automation cannot establish.

Remember this

The PR is the handoff boundary: the agent supplies evidence, while humans accept responsibility for merging.

Practice: run one bounded agent loop

Create a disposable branch in a small repository and ask your agent to implement the payments-api contract. Give it a short CLAUDE.md with the test command and forbidden paths. Start without YOLO permissions. If you use MCP, connect only a read-only issue or documentation tool. The starter prompt should name the exact endpoint, expected retry behavior, intentional mismatched-body failure, and the command that proves success.

After the agent proposes a plan, create a checkpoint and a Git commit before implementation. Let the loop run for at most three iterations. Then inspect the diff yourself. Deliberately break the idempotency test or remove the acceptance criterion from the prompt. The expected symptom is either a failing check or an incomplete PR description; recovery means restoring the contract, rerunning the checks, and recording the evidence.

Quick reference

  • Expected success: the new tests pass and the diff is limited to the payment flow and its tests.
  • Intentional failure: the mismatched-body case fails or is absent.
  • Recovery: restore the explicit contract, fix the implementation or test, and rerun from the checkpoint.
  • Pass criterion: a reviewer can trace ticket → diff → test output → PR decision without trusting the transcript alone.

Remember this

A loop passes only when its acceptance test, failure case, recovery, and final diff are all visible.

Key takeaway

Vibe engineering works when it is treated as controlled delegation. Project rules narrow the agent’s interpretation, permissions narrow its reach, checkpoints make exploration cheap, Git preserves the durable record, Ralph loops turn tests into feedback, MCP adds bounded context, and skills or plugins encode repeatable judgment. The final unit of accountability is still the reviewed change.

Start with one low-risk ticket and measure time to an accepted PR. If the agent is fast but reviewers cannot explain the diff, improve the contract and evidence gates before granting more autonomy. If the loop cannot stop, improve the evaluator before increasing the model or tool budget.

Share:
PK

Polo Khan

Lead Author & Systems Architect

Software engineer and distributed systems architect specializing in backend scalability, cloud-native infrastructure, databases, and AI engineering workflows. Author and maintainer of Core Concept Learning.

Human-Engineered & Fact-CheckedOriginal Visual DiagramsEditorial Standards →Send Feedback

Related Articles

AI coding agents change where engineering effort is spent: the hard problem moves from typing code to defining boundarie

Read

Claude Code is an agentic coding tool that can inspect a repository, propose edits, run permitted commands, and work thr

Read

Enterprise teams running Claude Code across 100+ developers face a critical problem: how do you enforce company policies

Read

Keep learning

Follow a structured path or browse all courses to go deeper.