Enterprise Vibe Coding: How Big Companies Let AI Write Code Without Losing Control
Vibe coding started as a weekend-hack habit. Now it is showing up inside banks, insurers and logistics firms, with guardrails the hobbyists never needed.
When Andrej Karpathy coined “vibe coding” in early 2025, he meant something specific: describe what you want, accept whatever the model writes, and never really read the code. It was a confession, not a methodology. Eighteen months later the phrase has drifted into a very different room. CTOs now use it in board decks, platform teams write policies about it, and the question inside large companies is no longer whether AI should write production code, but how much of it, and who signs off.
What “vibe coding” means when the codebase is fifteen years old
A solo developer vibe coding a side project has one stakeholder and no history. An enterprise has a monorepo nobody fully understands, a compliance team, a security review queue, three generations of coding standards and a production system that cannot go down on a Tuesday. The model does not change between those two settings. Everything around it does.
So the enterprise version keeps the core move: a developer describes intent in plain language, and an agent such as Claude Code, Cursor or Copilot’s coding agent produces the change. It then wraps that move in things the hobbyist never needed. Repository rules the agent must follow, permissions on what it can run, a review step that is not optional, and CI that acts as the final judge. The vibe is still there. It is just supervised.
Why enterprises are doing it anyway
- The boring backlog: test coverage, migrations between library versions, adding logging, wiring up a new endpoint that looks like the last twenty. This is most of enterprise engineering and it is exactly what agents are good at.
- Legacy modernisation: reading a COBOL module or a decade-old Java service and producing a documented, tested equivalent is a job humans avoid and agents do not mind.
- Internal tools: the dashboards, admin panels and scripts that never got built because no team could justify the headcount. A product manager with an agent can now ship a working prototype in an afternoon.
- Onboarding: a new hire asking the agent “how does billing talk to invoicing here?” gets a useful answer in minutes instead of waiting for the one person who knows.
- Speed on the parts that matter: when the tedious 70% of a feature takes an hour, senior engineers spend their day on the 30% that actually needs judgment.
Where it goes wrong
Every failure story from the past year has the same shape: the agent did what it was told, and nobody checked whether what it was told was right. The specific ways that plays out inside a large company:
- Unreviewed merges: a pull request that is 900 lines of plausible-looking code gets a rubber-stamp approval because nobody has time to read it. That is the original meaning of vibe coding, and it does not belong in production.
- Security debt at scale: hard-coded secrets, permissive CORS, SQL built by string concatenation. An agent will happily write the same vulnerability in fifty places if fifty tickets ask for it.
- Dependency sprawl: agents reach for a new package the way a junior developer does. Six months in, the lockfile has tripled and legal has questions about licences.
- Data leaving the building: source code, customer records in fixtures, credentials in config, all pasted into a tool whose retention policy nobody read.
- Skill atrophy: a team that has not written a database migration by hand in a year is a team that cannot debug one at 3 a.m.
- Cost surprises: agentic loops that retry, re-read and re-plan burn tokens quickly. A single runaway session can cost more than the engineer running it earns that day.
The guardrails that make it work
- 1. Rules file
- One file, versioned with the codeCLAUDE.md, .cursor/rules or AGENTS.md at the repo root: conventions, banned packages, where tests go. Read by the agent on every task.
- 2. Brief and review
- Humans at both endsThe engineer writes a precise spec before the agent starts and reads the diff after it finishes. Only the typing in between is delegated.
- 3. CI gate
- The only judgeTests, static analysis, secret scanning, licence and security checks. A green build is evidence. The agent saying all tests pass is not.
- 4. Least privilege
- A contractor on day oneSandbox, scoped token, allowlist of commands. It can run the test suite. It cannot push to main, deploy or touch production credentials.
- 5. Audit trail
- Prompt, model, diff and log togetherEvery agent-authored change is stored with its session transcript and linked to the ticket. Overkill until the first audit.
- 6. Data boundary
- Source code yes, production data neverZero-retention contracts and synthetic fixtures only. Customer PII, live credentials and production databases never reach the model.
1. Rules live in the repository, not in someone’s head
Every serious coding agent reads a rules file at the root of the project: CLAUDE.md for Claude Code, .cursor/rules for Cursor, and AGENTS.md as the emerging vendor-neutral convention. This is where the enterprise puts its conventions once and gets them applied on every task: which logger to use, how errors are wrapped, which packages are banned, where tests go. A good rules file is short, specific and versioned with the code.
# CLAUDE.md (excerpt)
- Use the internal `platform-http` client. Never import axios or fetch directly.
- Every new endpoint needs an integration test in tests/api/.
- Do not add dependencies without listing them in the PR description.
- Secrets come from Vault via config.get(). Never read process.env directly.
- Run `make lint test` before declaring a task done.2. The human moves upstream and downstream
In a healthy setup the engineer spends their time writing a precise brief before the agent starts, and reading the diff after it finishes. The middle, the typing itself, is delegated. Teams that skip the first part get code that solves the wrong problem. Teams that skip the second part get the incidents described above. Review is the bottleneck now, and that is by design.
3. CI is the judge, not the agent’s own claim
An agent saying “all tests pass” is a claim, not evidence. The pipeline runs the tests, the static analysis, the secret scanner, the licence check and the security linter, and a merge is blocked until they are green. Several companies now run a second, separate agent as a reviewer on every pull request, with instructions to be adversarial. Two models disagreeing is cheap; a production rollback is not.
4. Least privilege for the agent
The agent gets a sandbox, a scoped token and an allowlist of commands. It can run the test suite; it cannot push to main, touch production credentials or call a deploy script. Cloud-hosted agents make this easier because the environment is ephemeral and disposable by construction. If you would not give a contractor on their first day a permission, do not give it to the agent.
5. An audit trail for every change
Regulated industries need to answer “who wrote this and why” for every line. That means the prompt, the model, the session transcript and the resulting diff are stored together and linked to the ticket. Some teams commit the agent’s session log alongside the code. It feels like overkill until the first audit, at which point it is the only thing that matters.
6. A clear line on what data the model can see
Enterprise tiers from Anthropic, OpenAI, GitHub and the rest offer zero-retention and no-training contracts, but only if procurement actually signed them and only for the tools on the approved list. The practical rule most companies land on: agents may see source code and synthetic fixtures; they may not see production data, customer PII or live credentials, ever.
A maturity ladder
Most organisations move through the same four stages, and trying to skip one is where the trouble starts:
- Level 1: Autocomplete
- Low risk, modest gainInline suggestions in the IDE, one line at a time, each accepted by the developer. Where almost everyone starts.
- Level 2: Assisted editing
- One human per intentDescribe a change, read the diff, accept or reject. The agent edits but never acts on its own.
- Level 3: Supervised agents
- The 2026 targetThe agent takes a ticket, changes several files, runs the tests and opens a pull request. A human reviews and merges.
- Level 4: Autonomous on scoped work
- Low blast radius onlyDependency bumps, flaky-test fixes and doc updates merge on green CI. Never payment logic or anything customer-facing.
- Level 1: Autocomplete. Inline suggestions in the IDE. Low risk, modest gain, and where almost everyone starts.
- Level 2: Assisted editing. The developer asks for a change, reads the diff, accepts or rejects. Still one human per keystroke of intent.
- Level 3: Supervised agents. The agent takes a ticket, works through a multi-file change, runs tests and opens a pull request. A human reviews and merges. This is where most enterprises are aiming in 2026.
- Level 4: Autonomous on scoped work. Dependency bumps, flaky-test fixes, documentation updates and similar low-blast-radius tasks merge automatically when CI passes. Nobody sensible is doing this for payment logic.
What to measure
“Lines of code written by AI” is the number vendors love and the number that tells you nothing. The measures that actually show whether enterprise vibe coding is paying off:
- Lead time from ticket to merged pull request, split by whether an agent was involved.
- Change failure rate on agent-authored changes versus human-authored ones. If the first is higher, the guardrails are not working.
- Review time per pull request. If it is climbing, the agent is producing more than reviewers can absorb, and throughput is an illusion.
- Token spend per merged change, so the finance conversation is about value rather than a surprising invoice.
