Skip to content
Ylabator
GuideBeginner

Vibe Coding vs. Agentic Engineering

Vibe coding and agentic engineering can use the same AI tool. The difference is whether the rules that protect customers are enforced by checks the agent cannot skip.

5 min read / Updated / Last checked

Format
Guide · Beginner
Who it is for
Non-technical founders
You leave with
Tell when AI-generated code needs engineering review, and set up the files that turn a prompting session into an engineering process.

The problem

In November 2025, Collins Dictionary named "vibe coding" its word of the year, credited the term to Andrej Karpathy and defined it as using AI prompted by natural language to write computer code [1]. In its original sense, vibe coding means prompting a model and accepting what comes back without reading the code [2]. Most developers keep it out of their professional work. In Stack Overflow's 2025 survey, 84% of respondents used or planned to use AI tools, yet 72% said vibe coding is not part of their professional development work [3].

The risk appears when a vibe-coding habit meets production data. In July 2025, SaaStr founder Jason Lemkin reported that Replit's coding agent ignored instructions to freeze code and deleted a production database. Replit's CEO called it unacceptable, and the company's fix was structural: automatic separation of development and production databases [4]. A sentence in a prompt had not stopped the agent. A boundary in the platform would.

A founder looking at a working demo cannot tell which process produced it. Both look the same in a browser. The difference sits in two places a demo never shows: what the agent was allowed to touch, and what had to pass before a change reached customers.

How it works

Vibe coding is a loop of prompt, look, prompt again. The only check is a person looking at the happy path in a browser. That is a sensible way to test an idea with fake data.

Agentic engineering, in Simon Willison's definition, is developing software with the help of coding agents that write and execute code, while the human specifies the problem, provides the tools and verifies the results [2]. The agent still writes most of the code. What changes is the set of controls around it.

Claude Code's documentation draws the line that matters. Every instruction is either non-deterministic or deterministic [5]. A prompt, a CLAUDE.md file or a rules file is read by the model, and the model decides whether to follow it. A hook, a deny rule, a test suite, CI or branch protection runs as software every time, whatever the model decided. The same page gives the rule of thumb: if something has to happen every time, make it a hook, a deny rule or a managed setting [5].

An agentic engineering setup has five parts:

  1. A spec. A short PRD with acceptance criteria, so "done" has a definition.
  2. A context file. AGENTS.md gives any coding agent the build commands, conventions and security notes. More than 60,000 open-source projects use the format, now stewarded by the Agentic AI Foundation under the Linux Foundation [6].
  3. A check the agent can run. Tests, a typecheck or a build that returns pass or fail, so the agent fixes its own mistakes before a person looks [5].
  4. Hard gates. CI and branch protection that block a merge when checks fail, plus credentials that keep the agent away from production data.
  5. A human merge. A reviewer reads the diff against the spec and owns the release.

Anthropic's guidance on agents explains why the gates exist. Autonomy brings higher costs and compounding errors, so agents need testing in sandboxed environments with guardrails. Coding suits agents because automated tests can verify the output, and human review still decides whether a change fits the wider system [7].

Agentic engineering: where each rule is enforced

Fig. 01
  1. SpecPRD with acceptance tests
  2. Context fileAGENTS.md conventions
  3. Agent loopedit, run check, fix
  4. Hard gatesCI and branch protection
  5. Human mergereview against the spec
The spec and context file guide the agent. Tests, CI and a human merge decide what ships.

By the numbers

of developers used or planned to use AI tools in Stack Overflow's 2025 survey [3]
84%
said vibe coding is not part of their professional development work [3]
72%
distrusted the accuracy of AI tool output, against 33% who trusted it [3]
46%
of Veracode's test cases produced code with an OWASP Top 10 vulnerability [8]
45%
ConcernInstruction (the model decides)Enforcement (software decides)
What to doPrompt, CLAUDE.md, rules filesHooks
What it can touchAuto mode's classifierDeny rules, sandbox, managed settings
When it is doneA request for evidenceTests, typecheck, a Stop hook, CI
Who has the last wordThe agent's own summaryBranch protection, a person who approves the merge
Where a rule lives decides whether it holds, from Claude Code documentation read in November 2026 [5]

The survey describes a profession that uses AI every day and does not trust its output unreviewed. Veracode's study shows why that instinct is right. Across 80 coding tasks and more than 100 models, code got more accurate over time while security stayed flat, and larger models did not do significantly better than smaller ones [8]. A model upgrade does not replace a test.

The table is the practical reading. Every rule you care about sits in one of the two columns. Rules in the left column are followed most of the time. Rules in the right column are followed every time. Agentic engineering is the work of moving the rules that protect customers, money and data into the right column.

Implementation

Start with three files. The first tells any agent how the project works. The second makes CI fail when a rule breaks. The third makes Claude Code keep working until the typecheck passes, using the Stop hook pattern from its documentation [5].

AGENTS.mdmarkdown
# AGENTS.md
## Project
Booking app for small clinics. Next.js, Postgres, Stripe.
Requirements: docs/PRD.md (source of truth)

## Commands
- Install: npm ci
- Typecheck: npm run typecheck
- Tests: npm test
- Run locally: npm run dev (reads .env.local, never production keys)

## Rules
- Every API route checks the session AND that the record belongs to the caller.
- Secrets live in server environment variables. Nothing secret in client code.
- Schema changes go in a new migration file. Never edit an applied migration.
- Payment and booking writes take an idempotency key.
- Never connect to the production database. Use the seeded local database.

## Definition of done
- npm run typecheck and npm test pass, with output pasted in the PR.
- New behavior has a test, including one negative test (wrong user, bad input).
- The PR lists every rule above that the change touched.
.github/workflows/ci.ymlyaml
name: ci
on:
  pull_request:
  push:
    branches: [main]
jobs:
  checks:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
          cache: npm
      - run: npm ci
      - run: npm run typecheck
      - run: npm test
      - run: npm audit --omit=dev --audit-level=high
.claude/settings.jsonjson
{
  "hooks": {
    "Stop": [
      {
        "hooks": [
          { "type": "command", "command": "npx tsc --noEmit 1>&2 || exit 2" }
        ]
      }
    ]
  }
}

Then add a branch protection rule on main that requires the checks job to pass and one approving review before merge. From that point, a change that skips the ownership check fails its negative test, CI goes red and the merge is blocked, whoever or whatever wrote it. The Stop hook works one level earlier: exit code 2 sends the agent back to work with the compiler errors, so it cannot report "done" on code that does not typecheck [5].

Keep production credentials out of every agent's environment entirely. A rule that says "never connect to production" is an instruction. A missing credential is enforcement.

Test it

Prove each gate works before trusting it. Each check takes minutes.

  • Open a branch where one API route drops its ownership check. Expected: the negative test fails, CI is red, and the merge button is blocked.
  • Ask the agent to finish a change that breaks a type. Expected: with the Stop hook in place, it keeps fixing until tsc passes, and its final message includes the passing output.
  • Ask the agent to "check something in the production database". Expected: it cannot, because no production credential exists in its environment.
  • Push a commit straight to main. Expected: rejected by branch protection.
  • Read the last three merged pull requests. Expected: each shows pasted test output and a human approval.

If any expected result fails, that rule still lives in the left column of the table.

Decision

Use vibe coding alone for throwaway prototypes, internal demos and idea tests with fake data. Switch to agentic engineering before the first real user account, payment or private record.

  • Add AGENTS.md, CI and branch protection on the first day of any codebase you intend to keep. It is three files and one repository setting.
  • Keep production data out of agent reach by design. A platform boundary held where a prompt did not [4].
  • Pay for review time on the merge step. The agent writes, and a person who understands the spec approves.
  • Write the spec before the first prompt: see How to Write a PRD Before Prompting AI.

Sources

  1. [1]Collins' Word of the Year 2025: AI meets authenticity as society shifts (opens in a new tab)Collins Dictionary, November 2025
  2. [2]What is agentic engineering? (opens in a new tab)Simon Willison, February 2026
  3. [3]2025 Developer Survey: AI (opens in a new tab)Stack Overflow, July 2025
  4. [4]Replit makes vibe-y promise to stop its AI agents making vibe coding disasters (opens in a new tab)The Register, July 2025
  5. [5]Best practices for Claude Code (opens in a new tab)Anthropic, November 2026
  6. [6]AGENTS.md (opens in a new tab)Agentic AI Foundation, November 2026
  7. [7]Building effective agents (opens in a new tab)Anthropic, December 2024
  8. [8]AI-Generated Code Poses Major Security Risks in Nearly Half of All Development Tasks (opens in a new tab)Veracode, July 2025

Technical guidance, not legal or security certification.

Need a technical review of an AI-built MVP?

Discuss your build