Module 6: The Fundamental Workflow — Research → Plan → Execute → Validate

Module 6: The Fundamental Workflow — Research → Plan → Execute → Validate

Description

Module 05 gave you the judgment: mental models, trust calibration, circuit breaker. Now you need the process. Knowing that you're responsible for the result (power tool) and that you should verify (circuit breaker) isn't enough if you don't have a concrete workflow to execute that responsibility.

This module teaches the workflow that separates developers who are productive with AI from those who waste time. It's not abstract theory — it's a four-step process you can apply to any task, with any tool, starting today.

The METR study (Module 05) showed the problem: without methodology, you're 19% slower with AI. This module gives the solution. The developers who WERE faster in the study shared a pattern: they thought before executing, planned before coding, and verified before declaring victory.

By the end of the 5 capsules, you'll be able to apply R→P→E→V to any task, choose the correct variant based on the context, recognize and correct anti-patterns in your own work, and have a workflow ready for building the Module 07 mini-agent.


Where We Are in the Guide

Module 01: The paradigm shift                ✅ Completed
Module 02: How LLMs work                      ✅ Completed
Module 03: From chatbots to coding agents     ✅ Completed
Module 04: The agent's toolbox                ✅ Completed
Module 05: The developer as director          ✅ Completed
Module 06: The fundamental workflow           ← YOU ARE HERE
Module 07: Project: Build a mini-agent

This is Module 06 of 7 — the last conceptual module before the project. Everything before converges here: you understand the context (01), the mechanics (02-04), and the judgment (05). Now you learn the process that connects everything in action.


Why Methodology Matters More Than the Tool

Developer A:                         Developer B:
→ Claude Code (top tool)             → Copilot (standard tool)
→ No defined workflow                → Uses R→P→E→V consistently
→ "Do it" → accept → debug           → Research → Plan → Execute → Validate

Result A:                            Result B:
→ Fast at the start                  → Slower at the start
→ Extensive debugging                → Less rework
→ Inconsistent code                  → Verified code
→ Total time: UNPREDICTABLE          → Total time: PREDICTABLE

The data backs this comparison:

  • METR study: The variability between developers with the same tool demonstrates that the process matters more than the tool
  • METR transcript analysis: The most effective developers used the agent to EXPLORE before EXECUTING
  • Anthropic best practices: They explicitly recommend "think before you code" as a fundamental principle

A Real Migration: Without a Workflow vs with R→P→E→V

So the module isn't abstract, consider a task many developers have faced:

Task: Migrate the /reports endpoint from SQLAlchemy 1.4 to SQLAlchemy 2.0. The endpoint uses async sessions, complex joins, and a cache layer. Deadline: half a day.

Approach A: Without a workflow

09:00 → "Migrate this code from SQLAlchemy 1.4 to 2.0."
        Pastes 4 files into the agent.

09:30 → The agent delivers "migrated" code. It compiles.

10:00 → Unit tests fail. "Fix them." The agent changes
        the tests too.

11:00 → Tests pass, but the integration tests hang
        (deadlock with async session).

13:00 → Iteration 4. "Why didn't you use sessionmaker?" The agent
        re-generates the layer.

15:00 → Iteration 7. The cache layer now makes double queries.

16:00 → Works locally. Push to staging.

18:00 → Staging fails with an error you didn't see locally
        (autoflush behavior changed in 2.0).

22:00 → Bug fixed, but the code ended up inconsistent with the
        rest of the project. Total: 13 hours and a confusing PR.

Approach B: R→P→E→V

09:00 → RESEARCH (30 min)
        - Reads the SQLAlchemy 2.0 changelog (the breaking changes)
        - Asks the agent to identify what specifically changed
          between 1.4 and 2.0 in async sessions and autoflush
        - Identifies the 3 affected files and their dependencies

09:30 → PLAN (20 min)
        - Lists the 5 specific transformations to apply
        - Defines the order: first sessions, then queries, then tests
        - Agrees with the agent on the convention (sessionmaker vs context manager)

09:50 → EXECUTE (90 min)
        - Applies the changes one by one, not all together
        - After each step: runs the specific tests of that step
        - The agent works DIRECTED, not autonomous

11:20 → VALIDATE (40 min)
        - Complete test suite: unit + integration
        - Spot-check of the 3 most complex queries
        - Compares performance (latency, N+1 queries) before/after
        - Reads the complete diff before committing

12:00 → PR opened. Total: 3 hours. Zero rework in review.

Same task. Same agent. 13h vs 3h.

The difference is that Approach B:

  • Did Research before asking for code (Capsule 02)
  • Had an explicit Plan that was a contract with the agent (Capsule 02)
  • Executed directed, not accepting the first thing (Capsule 02)
  • Validated with criteria defined before starting, not improvised (Capsule 04)

The 5 capsules of this module train you to be Approach B by default.


Prerequisites

Required knowledge:

  • ✅ Module 05 completed (mental models, trust calibration, circuit breaker)
  • ✅ Experience using some AI coding tool

Recommended:

  • ✅ Having a real project or task to apply the workflow during the exercises
  • ✅ Your personal protocol from Module 05

Module Roadmap

Capsule 01 — Module introduction (this capsule)

Context and motivation. Why you need a workflow, not just judgment. The migration case.

Capsule 02 — Research → Plan → Execute → Validate

The fundamental workflow step by step. Each phase explained with what to do, how to do it, what to deliver before moving to the next. Concrete examples of each phase.

Capsule 03 — Workflow variants

Three important variants: PRD → Plan → Todo → Code (Anthropic), Spec-first + TDD (Tweag), Explore → Plan → Code (native to coding agents). When to use each. Comparison.

Capsule 04 — Verification: the step everyone skips

Why developers skip verification. What it costs to skip it. Types of verification. How to use the agent to verify (not just to generate). The concept of "verification-first."

Capsule 05 — Common anti-patterns

The five most destructive anti-patterns: vibe coding (already covered, here we connect it with the workflow), prompt-and-pray, context dumping, premature automation, and the sunk cost fallacy with AI.

Progression map

Capsule 01 (this)     → Why you need a workflow
Capsule 02            → THE workflow: R→P→E→V step by step
Capsule 03            → Variants: PRD, Spec-first, Explore→Plan→Code
Capsule 04            → Verification: why it's the most important step
Capsule 05            → Anti-patterns: what NOT to do

Difficulty: ⭐⭐ ────────────────────────▶ ⭐⭐⭐

What connects each capsule

Capsule 01 → "You need a process" (motivation)
     │
     ▼
Capsule 02 → "This is the process" (R→P→E→V)
     │
     ▼
Capsule 03 → "There are variants depending on the context"
     │
     ▼
Capsule 04 → "Verification is where most people fail"
     │
     ▼
Capsule 05 → "These are the anti-patterns to avoid"

What You'll Achieve in This Module

By completing the 5 capsules:

  1. Apply R→P→E→V step by step to any task with a coding agent
  2. Choose the correct variant of the workflow based on your context
  3. Not skip Verification — and know exactly what to verify
  4. Recognize anti-patterns in your work and correct them
  5. Have a workflow ready for the Module 07 project

The before and after

BEFORE the module:
→ "I ask the agent to do the task and see what comes out"
→ "If it works, I accept it"
→ "Verification is something I do if I have time"
→ "I don't have a process — it depends on the task"

AFTER the module:
→ Research → Plan → Execute → Validate, every task
→ I know which variant to use based on the context
→ Verification is a mandatory part of my process
→ I recognize when I fall into anti-patterns and correct them

What This Module Does NOT Cover

TopicWhere it's covered
How to write effective promptsPrompt Engineering guide
Specific tools (CLAUDE.md, .cursorrules)Specific-tool guides
Testing in depthTesting with AI guide
CI/CD with AIContinuous integration guide

This module is about the working workflow — not about the tools that execute it.


Connection with the Final Project

In Module 07, you'll build a mini coding agent. You'll use R→P→E→V directly:

  1. Research: Investigate how LLM APIs and tool calling work
  2. Plan: Design your mini-agent's architecture before coding
  3. Execute: Implement with active direction
  4. Validate: Verify that your agent works, document its behavior

The workflow isn't just something you learn — it's something you apply immediately in the next module.


Traps to Avoid While Taking This Module

Five predictable misunderstandings. Anticipate them before starting.

1. "R→P→E→V is overkill for simple tasks"

No. For a 5-minute task, R→P→E→V can be 30 seconds: research = "I already know the context," plan = "I'm going to change X in file Y," execute = the change, validate = review the diff. The workflow scales with the size of the task. Capsule 02 shows the compressed workflow for small tasks and the extended one for large tasks.

2. "A workflow means waterfall — I can't iterate"

The opposite. R→P→E→V is iterative within each phase and between phases. If in Execute you discover that your Plan was wrong, you go back to Plan. If in Validate you find an edge case you didn't consider, you go back to Research. Capsule 02 describes the legitimate return points. What you don't do is skip a phase.

3. "Skip Plan: 'I already know what I'm going to do'"

It's the most costly trap. "Knowing what you're going to do" in your head isn't the same as a Plan written and shared with the agent. The written Plan serves as a contract: if the agent deviates, you notice immediately. If there's no Plan, no output can be "wrong" — because there's no reference. Capsule 02 gives you Plan templates for different task sizes.

4. "Validate = running the tests"

Validate is broader: does the result match the original intent? Are the edge cases covered? Does the change maintain consistency with the rest of the codebase? Tests are one tool of validation — they aren't the complete validation. Capsule 04 gives you a taxonomy: functional, contractual, integration, regression, and intent validation.

5. "I want the universal workflow — just one"

There isn't one. R→P→E→V is the backbone, but the variants (PRD-driven, Spec-first, Explore-Plan-Code) have advantages depending on the context. A version migration benefits from Spec-first; a greenfield feature benefits from PRD-driven; a debug benefits from Explore-Plan-Code. Capsule 03 gives you the criteria to choose.


Diagnosis: What's Your Starting Point?

Five questions to calibrate before starting.

Question 1: The last non-trivial task where you used a coding agent, did you do anything formal before asking for code?

If you said "no, I went straight in": you're in the Approach A pattern. Capsule 02 formalizes the "before asking for code" part.

If you said "yes, I wrote a mini-spec / list": you're on the right track. Capsule 02 gives you structure so that habit is consistent.

Question 2: When the agent delivers something, what do you do before accepting it?

If you said "I run the tests": it's the minimum, it's not complete Validate. Capsule 04 shows you what's missing.

If you said "I read the code and compare it with my intent": you're on the right track. Capsule 04 systematizes that reading so it's reproducible.

Question 3: Have you noticed that for different types of tasks, a different process suits you better?

If yes: Capsule 03 gives a formal name to those processes (PRD-driven, Spec-first, Explore-Plan-Code).

If no: you've moved in a single mode. Capsule 03 opens the catalog and teaches you to choose.

Question 4: Do you know what "vibe coding" is and do you recognize when you fall into it?

If yes: do you know its 4 siblings? (prompt-and-pray, context dumping, premature automation, sunk cost). Capsule 05 develops them.

If no: Capsule 05 is a priority. Recognizing these 5 anti-patterns is what separates a Developer A from a Developer B.

Question 5: If you had to teach a junior to use a coding agent professionally, what process would you give them?

If you have an articulated answer: you'll be able to validate/refine your process against R→P→E→V in this module.

If you struggle to articulate it: that's the main output of the module. You'll come out with a teachable process.

If you hesitated on 3 or more: this module is the conceptual conclusion of the guide — don't treat it as a review. If you answered them all with judgment, use it to formalize what you already do and to learn the variants (Capsule 03) you maybe don't use.


How to Work Through This Module

  1. Capsule 02 is the most important. It's the workflow you're going to use for the rest of your career with AI tools.
  2. Capsule 03 expands your options. You don't need to memorize the variants — you need to know they exist for when you need them.
  3. Capsule 04 is the most counterintuitive. Verification seems like "extra work" but it's where the most time is saved.
  4. Capsule 05 is a mirror. You'll probably recognize yourself in at least 2 anti-patterns.

Estimated time:

Capsule 01 (this)  →  5 min
Capsule 02         → 12 min
Capsule 03         → 10 min
Capsule 04         → 10 min
Capsule 05         → 10 min + exercises

Total: ~50-60 minutes

Evidence of Success

Before moving on to Module 07 (Project: build a mini-agent), you should be able to:

  • Explain the 4 phases of R→P→E→V with what to do and what to deliver in each one
  • Apply R→P→E→V to a real task from your work and notice the difference
  • Choose the correct variant (R→P→E→V vs PRD-driven vs Spec-first vs Explore-Plan-Code) for 3 different tasks
  • Define your own Validate checklist (beyond "the tests pass")
  • Identify at least 2 of the 5 anti-patterns in your own recent history
  • Have a written workflow that you're going to use in the Module 07 project

If any aren't met at the end, go back to the corresponding capsule. Module 07 asks you to apply this workflow when building a mini-agent — without it, you finish the project but don't internalize the methodology.


Summary

This module transforms the judgment from Module 05 into an executable process.

What it covers:

  • The R→P→E→V workflow step by step
  • Three variants for different contexts
  • Why Verification is the most important step (and the most skipped)
  • The five most destructive anti-patterns

What it produces:

  • A workflow of your own, written, reproducible
  • The ability to choose a variant based on the context
  • A Validate checklist calibrated to your work
  • Honest identification of your own anti-patterns

Why it matters:

  • Judgment without a process is intent without action
  • The METR study showed that the difference is the methodology
  • A consistent workflow produces predictable results
  • The difference between 13h and 3h in the opening scenario is exactly this module

Next capsule: 02 — Research → Plan → Execute → Validate — the complete workflow, step by step, with concrete examples for small, medium, and large tasks.


Additional Resources

  1. Anthropic: Claude Code Best Practices — The workflow recommended by Anthropic, aligned with R→P→E→V
  2. Agentic Coding — Workflows — Multiple documented workflows with examples
  3. METR Transcript Analysis — Evidence that "explore before executing" produces better results
  4. MIT Missing Semester 2026 — Section on effective workflows with coding agents
  5. Tweag: Spec-First Development with AI — The spec-first approach that capsule 03 covers
  6. Anthropic: Building Effective Agents — Design patterns that connect with R→P→E→V applied to agent use