Vibe Coding: What Developers Should Do While AI Coding Agents Write the Code

    This article explores what developers should focus on during the time AI coding agents spend generating code. It reframes the "coding gap" as a high-leverage review period and walks through four practices that fill it: mapping the data flow to see the system's skeleton, analyzing failure modes to defuse problems early, predicting bottlenecks to guide architectural trade-offs, and turning all of it into clear specifications and guardrails. Using a data processing pipeline as a running example, it argues that the developer's core role shifts from writing code to defining problems, and explains why this "humans define, machines implement" model works well when building on cloud infrastructure.

    Introduction: When Code Is No Longer Primarily Written by Hand

    “Vibe coding” has quickly gone viral in the developer community. It doesn’t describe a new language or a new framework — it describes a shift in how we work: humans express intent in natural language, and coding agents (AI coding assistants) translate that intent into runnable code. Once the act of “typing out code” is automated at scale, an unavoidable question emerges — during the time an agent spends generating code, what should the human actually be doing?

    A common but dangerous mindset is: since the machine is writing, I’ll just wait and review the result. This mindset demotes developers from “designers” to “people who click Run.” Mature practice is the opposite: the gap while an agent writes code is precisely the golden window for humans to deliver value that can’t be replaced. Below, I use a data processing pipeline as a running example to show what should fill that gap.

    1. Redefining the “Coding Gap”

    In traditional development, time goes mostly into two kinds of activity: thinking through design and writing code. When coding is handed over to an agent, the structure of that time changes fundamentally — coding time shrinks dramatically, while the “granularity of thinking” must become significantly coarser and higher-level.

    Put differently: work that used to take you hours of writing now produces a first version in minutes. The time you save shouldn’t go into “doing something else”; it should go into the parts machines are worst at:

    • Precise expression of intent: Does your description contain hidden assumptions, boundary conditions, and failure-handling strategies?
    • Soundness of system structure: Does the generated code fit the overall architecture, or is it just an isolated piece of the puzzle?
    • Trustworthiness of the generated result: Which line “looks right but might be wrong,” and which line needs the most careful verification?

    The coding gap is not “idle time” — it’s a high-leverage review and thinking period. Every judgment you make during this window is multiplied into the final output.

    2. The Data Flow View: Seeing the System’s Skeleton

    Back to that data processing pipeline. While the agent writes the implementation, the most valuable thing a human can do is draw out the pipeline’s data flow — not to show the agent, but to show yourself, to calibrate the mental model you hold of the system.

    Why emphasize “draw”? Because no matter how complex a system is, once it lands on a single diagram, weak points reveal themselves immediately. A typical pipeline can be abstracted as:

    1. [Data In] → [Clean/Validate] → [Transform/Aggregate] → [Enrich/Join] → [Load/Output]
    2. ↑ ↑ ↑ ↑ ↑
    3. Data source Format spec Business rules External deps Storage/Downstream

    Against this diagram, you can immediately answer several key questions:

    • What transformations does the data go through from entry to exit? Does each transformation have a clear input/output contract?
    • How does the shape of the data evolve at each step? Are fields preserved intact along the whole chain, or silently dropped at some step?
    • Which steps are pure computation (retriable, no side effects), and which are stateful / have side effects (re-running them causes errors)?

    When the code an agent submits doesn’t match this diagram in your head — for example, it quietly merges two transformations in the “enrichment” step that should have stayed independent — you’ll catch it immediately. And this kind of structural deviation is exactly what automated generation gets wrong most easily and what’s hardest to detect by just “running it once to see.”

    3. Failure Mode Analysis: Preset the “Unexpected” for Every Stage

    The data flow diagram answers “is the skeleton right?” Failure mode analysis (in the spirit of FMEA) answers “where will it break?” This is the highest-value work in the gap and the one that tests experience the most.

    For every stage in the pipeline, you should proactively ask about three kinds of failure:

    1. Input anomalies: What happens when upstream sends empty data, oversized data, missing fields, or wrong types? Does the agent-generated code defend against these, or does it assume “data is always clean”?
    2. Interrupted execution: If the process crashes halfway through this step, or a dependent service times out, can the system recover? Is it idempotent, so that re-running won’t produce duplicates or dirty data?
    3. Silent errors: The most dangerous kind. The step doesn’t error, but the output is wrong — for example, an aggregation quietly undercounts because null handling was done poorly.

    The following pseudocode expresses this defensive design:

    1. def transform(records):
    2. for r in records:
    3. # 1. Input validation: fail explicitly rather than silently polluting downstream
    4. if not is_valid(r):
    5. metrics.incr("transform.invalid_input")
    6. dead_letter.put(r) # isolate, don't discard
    7. continue
    8. # 2. Idempotent processing: repeated runs produce the same result
    9. result = pure_transform(r)
    10. # 3. Observability: leave a trace at every step for easier debugging
    11. metrics.incr("transform.ok")
    12. yield result

    You’ll find that an agent’s first version usually covers only the “happy path,” leaving validation, isolation, idempotency, and observability — all the “unexpected paths” — for later. Listing them out and checking them against the code one by one during the gap is how you defuse the mines ahead of time.

    4. Bottleneck Prediction: Put Your Attention on the Most Fragile Points

    With a data flow diagram and a failure list in hand, the next step is to judge which stage is most likely to become a bottleneck. This isn’t a minor detail of performance tuning — it’s the key point that determines the reliability of the whole system.

    You can locate bottlenecks along three dimensions:

    • Throughput dimension: Which step’s processing capacity doesn’t match its upstream and downstream? For example, if the whole chain can handle a thousand records per second but the “join external dependency” step is limited by the external response time, it becomes a throttling point.
    • State dimension: Which step holds state or shared resources (database connections, locks, shared cache)? Wherever there’s shared state is often where concurrency bottlenecks and failure clusters form.
    • Coupling dimension: Which step depends on an external system you don’t control? The less controllable an external dependency is, the more you should set timeouts, retries, circuit breakers, and fallbacks there.

    A common pitfall in practice is that agents, “casually,” write all processing as serial, synchronous calls. The judgment a human needs to make during the gap is: which steps could run in parallel, which must be serial, and which external calls need to be made asynchronous and paired with a message queue to smooth out peaks. Machines can execute these architecture-level trade-offs, but they’ll almost never make those decisions for you.

    5. Specifications and Constraints: Let Humans Own “Intent,” Machines Own “Implementation”

    The three activities above all point to one conclusion: in the age of vibe coding, the human’s core deliverable shifts from “code” to “specification.” The clearer the spec and the more explicit the constraints, the higher the quality of the agent’s output, and the lower the cost of rework you’ll need afterward.

    A high-quality spec should explicitly include at least:

    • Input/output contracts: Data structures, field meanings, boundary conditions.
    • Invariants: Which properties must hold under all circumstances (e.g., “number of output records ≤ number of input records”).
    • Failure and recovery strategies: Expected behavior for timeouts, retries, isolation, and fallbacks.
    • Observability requirements: Which metrics and logs to record, for easier debugging later.

    Writing these clearly is, in essence, “drawing guardrails for the machine.” The more precise the guardrails, the harder it is for the agent to drift; and human value lies precisely in drawing those guardrails.

    6. From “Person Who Writes Code” to “Person Who Defines the Problem”

    Stringing the above together reveals a clear path of role migration:

    Capability dimension Traditional coding era Agent collaboration era
    Core time investment Writing code by hand Defining intent, reviewing structure
    Main output Runnable code Precise specs + design judgment
    Value source Coding speed and proficiency Problem decomposition and systems thinking
    Biggest risk Wrong syntax Vague intent, misaligned structure

    Coding skills don’t become unimportant — you still need to read code, spot defects, and evaluate quality. But the real dividing line has shifted from “can you write this code” to “can you define clearly what you want, and can you judge where things will go wrong.”

    Conclusion: How to Use the Gap Well

    Back to the original question: while a coding agent writes code, what are you doing? The best answer is — you’re doing the things the machine can’t do for you (yet): mapping the data flow to calibrate the system’s skeleton, analyzing failure modes to defuse mines early, predicting bottlenecks to decide architectural trade-offs, and distilling all of it into clear specifications and guardrails.

    Do this well, and the agent’s “generation ability” can genuinely be anchored in the right direction. When you build on the cloud using general capabilities like object storage, message queues, container platforms, logging services, and monitoring and alerting, this “humans define, machines implement” collaboration model is especially effective: because the complexity and reliability demands of infrastructure are exactly what most need someone to hold the line on structure and boundaries during the gap.

    Vibe coding lowers the cost of “writing” but raises the value of “thinking.” The gap isn’t a break for you to relax — it’s the moment when you converse with the system and digest uncertainty ahead of time. Whoever fills this gap more solidly will make the most of the leverage in the age of agents.