⏱ ~28 min 🎤 Dex Horthy 🏢 HumanLayer

No Vibes Allowed — Solving Hard Problems in Complex Codebases

How a 3-person team achieved 2–3× throughput using structured context engineering — moving beyond vibe coding to a disciplined Research → Plan → Implement workflow for brownfield codebases.

No Vibes Allowed — Solving Hard Problems in Complex Codebases thumbnail
🏷 Context Engineering 🏷 Brownfield 🏷 Research-Plan-Implement 🏷 12 Factor Agents
1

The Problem With AI Coding Today

0:00

Dex opens with a stark finding from a 100K-developer study: teams using AI coding assistants are shipping more code — but a disproportionate amount of it is rework. The net productivity gain is far smaller than the raw output suggests.

"Too much slop." — The recurring refrain from senior engineers reviewing AI-generated PRs. Volume isn't velocity when half the output needs to be fixed.

The core distinction:

  • Greenfield — AI excels when there's no existing context to respect. Start from scratch and go fast.
  • Brownfield — AI struggles with existing codebases, established patterns, implicit conventions, and complex dependency graphs. This is where most real work happens.

The talk's premise: vibe coding doesn't scale to complex codebases. You need structure, discipline, and deliberate context management to get expert-quality results from AI.

2

Context Engineering — From Skeptic to 2–3× Throughput

0:47

Dex describes his team's journey: 8 weeks of structured experimentation with a 3-person team at HumanLayer. They went from skeptics to believers after systematically testing workflows.

The breakthrough came from treating AI coding as a context engineering problem, not a prompting problem. The key workflow:

  1. Research — Explore the codebase, gather relevant context, understand patterns
  2. Plan — Convert research into a concrete, step-by-step implementation plan
  3. Implement — Execute the plan with a fresh, focused context window
The team achieved 2–3× throughput not by writing prompts faster, but by being deliberate about what context the model sees at each phase.

This isn't about clever prompts — it's about workflow architecture. Each phase has different context needs and different failure modes.

3

Advanced Context Engineering

4:43

Dex lays out a maturity model for context engineering, showing how teams evolve their approach:

Level 0

The Argue Loop

Back-and-forth with the model, piling corrections into one massive thread. Context degrades with every exchange. Most developers start here.

Level 1

Fresh Context Windows

Recognizing that fresh windows perform better than stale ones. Starting new conversations instead of continuing broken ones.

Level 2

Intentional Compaction

Deliberately summarizing and compacting context between phases. Carrying forward only what matters. This is where the Research→Plan→Implement workflow lives.

Dex introduces four optimization axes for context engineering:

  • Relevance — Is the context actually useful for this specific task?
  • Recency — Is the context fresh, or has the codebase evolved past it?
  • Density — Is the signal-to-noise ratio high enough?
  • Coherence — Does the context tell a consistent story, or does it contradict itself?
4

The Dumb Zone

8:15

One of the talk's most memorable concepts. When the context window fills up with noise — previous errors, irrelevant code, contradictory instructions — the model enters what Dex calls the "Dumb Zone".

Performance doesn't degrade linearly — it falls off a cliff. The model goes from producing expert-quality code to generating confident nonsense.

Signs you're in the dumb zone:

  • Model starts ignoring instructions that are clearly in the prompt
  • Outputs become internally contradictory
  • The model hallucinates APIs, function signatures, or file paths
  • Fixes for one issue break previously working code
  • The model starts apologizing and rewriting the same code in loops

The antidote: don't let it happen. Compact context proactively. Start fresh windows. The Research→Plan→Implement workflow is specifically designed to avoid the dumb zone by keeping each phase's context window clean and focused.

5

Research Phase

11:30

The research phase uses sub-agents to explore the codebase without polluting the main context window. This is the critical insight: exploration is messy, but its output doesn't have to be.

How it works:

  1. Spawn sub-agents to search the codebase, read files, trace dependencies
  2. Each sub-agent explores a specific question or area
  3. Sub-agents produce a structured research document summarizing findings
  4. The research document — not the raw exploration — feeds into the next phase
The research phase is disposable by design. All the wrong turns, dead ends, and noisy file reads stay in the sub-agent's context — only the distilled findings survive.

The output is a clean research document covering: relevant files, existing patterns, API contracts, edge cases discovered, and open questions. This becomes the foundation for the plan.

6

Plan Phase

15:00

The plan phase converts the research document into an actionable implementation plan. This is where human judgment is most valuable.

Key properties of a good plan:

  • Step-by-step instructions the implementing agent can follow linearly
  • Code snippets embedded as anchors — showing exact patterns to follow
  • Explicit listing of files to modify and in what order
  • Expected behavior at each step (verification points)
Mental alignment through plan review. The human reviews the plan before implementation begins. This is the checkpoint where you catch wrong approaches before they're coded — far cheaper than fixing bad code.

Plans with embedded code snippets outperform purely prose plans because they give the implementing agent concrete anchors to pattern-match against, reducing hallucination of APIs and coding patterns.

7

Implement Phase

18:30

Implementation starts with a fresh context window containing only the plan and necessary reference code. No research noise. No exploration dead ends.

The implementing agent:

  • Receives the plan document as its primary context
  • Uses code snippets from the plan as anchoring examples
  • Follows steps linearly, checking off each one
  • Has maximum context budget available for actual implementation
Because the plan was built from real research (not hallucinated), and the context window is clean (not polluted with exploration), the implementing agent produces expert-quality code that respects existing patterns.

This is where the "no vibes" philosophy pays off: the implementation isn't hoping the model guesses right — it's executing a verified plan with the right context.

8

Progressive Onboarding

21:00

A counterintuitive lesson: don't dump everything at once. When onboarding AI to a codebase, progressive disclosure outperforms comprehensive context.

The analogy: onboarding a new engineer. You don't hand them the entire codebase on day one. You progressively introduce:

  1. Architecture overview — high-level structure, key abstractions
  2. Local patterns — conventions in the specific area they'll work on
  3. Relevant examples — similar changes that were made previously
  4. Edge cases — only the ones relevant to the current task
More context ≠ better results. The model performs best when it receives the right context at the right time, layered progressively as needed.

This principle applies to both single-session work and multi-session projects. Each new task should start with a fresh, progressively-built context rather than carrying forward everything from previous sessions.

9

Trajectory Traps & Recovery

23:30

Even with structured workflows, agents sometimes go down the wrong path. Dex discusses how to detect and recover from trajectory traps.

Early detection signals:

  • Agent starts modifying files not in the plan
  • Diff size grows beyond what the task warrants
  • Agent introduces new abstractions not discussed in the plan
  • Multiple consecutive error-fix cycles on the same file

Recovery strategies:

  • Detect early — Monitor the agent's trajectory, don't wait for a final broken result
  • Compact — Summarize what was learned from the failed attempt
  • Restart — Fresh context window with the original plan + lessons from the failure
A failed attempt isn't wasted — it's research. Compact the learnings and feed them into a new, clean implementation attempt.
10

Results & Key Metrics

26:00

After 8 weeks of applying these techniques, the 3-person HumanLayer team measured concrete results:

  • 2–3× throughput — Measured in shipped features, not lines of code
  • No slop — Code quality maintained at expert level, no increase in rework
  • Expert-quality code — AI-generated code follows existing patterns and conventions
Team collaboration changed fundamentally. Plans became the primary unit of review, not PRs. Engineers shifted from writing code to writing plans and reviewing AI output — a higher-leverage activity.

The workflow transforms the developer role: less time typing, more time thinking, designing, and validating. The AI handles execution; humans handle judgment.

🎯 Key Takeaways

🔍 AI coding studies show more code ≠ more productivity — A 100K-developer study found much of AI-generated output is rework, not net-new value.
🏗️ Greenfield ≠ Brownfield — AI excels at scratch projects but struggles with existing codebases. Most real work is brownfield.
🔬 Research → Plan → Implement — Separating these phases with fresh context windows is the core breakthrough for structured AI coding.
🧠 Context engineering > prompt engineering — What the model sees matters more than how you ask. Manage context deliberately across phases.
⚠️ The "Dumb Zone" is real — When context fills with noise, model performance drops off a cliff, not gradually. Prevent it proactively.
🧹 Sub-agents keep context clean — Research sub-agents explore messily so the main context stays focused. Exploration is disposable; findings are not.
📋 Plans with code snippets outperform prose plans — Concrete code anchors reduce hallucination and give the implementing agent patterns to match.
📈 Progressive onboarding beats context dumping — Layer context progressively, just like onboarding a new engineer. More isn't always better.
🔄 Failed attempts are research — When an agent goes off-track, compact the learnings and restart with a clean context. Don't try to fix a broken trajectory.
🚀 2–3× throughput is achievable without slop — A 3-person team proved this over 8 weeks. The key is workflow discipline, not better prompts.