Module 5: The Developer as Director — Human-Agent Collaboration

When to Delegate and When to Do It Yourself

Capsule description

You know that AI is a power tool. You know you should be a circuit breaker. You have your trust calibration checklist. But you're missing the final piece: for each task you face in your day, should you use AI or do it yourself?

This capsule gives you a practical decision framework for classifying tasks into three categories: delegable to AI, partially delegable, and non-delegable. It's not about absolute rules — it's about a framework you can apply quickly when you decide how to approach each task of your day.

You'll also explore the cost of "almost right" — the phenomenon where AI generates code that's 90% correct, and the remaining 10% takes more time to fix than writing everything from scratch. Knowing how to recognize this pattern saves you hours of frustration.


The Task Classification Framework

The three categories

┌──────────────────────────────────────────────────────────┐
│  DELEGABLE                                                │
│  → AI can do the task with minimal supervision            │
│  → Trust calibration: Level 3 (light)                     │
│                                                          │
│  Characteristics:                                        │
│  ✓ Well-defined (clear criteria for 'correct')            │
│  ✓ Mechanical (requires no creativity or judgment)        │
│  ✓ Known patterns (AI has good training data)             │
│  ✓ Easily verifiable (tests, diff, visual)                │
│  ✓ Low risk if there are minor errors                     │
├──────────────────────────────────────────────────────────┤
│  PARTIALLY DELEGABLE                                      │
│  → AI writes the draft, you review and adjust             │
│  → Trust calibration: Level 2 (focused)                   │
│                                                          │
│  Characteristics:                                        │
│  ✓ Mostly defined (but with edge cases)                   │
│  ✓ Combines mechanical + judgment                         │
│  ✓ AI generates a good starting point                     │
│  ✓ Requires adjustments for your project context          │
│  ✓ Medium risk — errors are detectable in review          │
├──────────────────────────────────────────────────────────┤
│  NOT DELEGABLE                                            │
│  → You do it (AI can help research, not execute)          │
│  → Trust calibration: N/A (no AI output to evaluate)      │
│                                                          │
│  Characteristics:                                        │
│  ✓ Requires deep domain judgment                          │
│  ✓ The consequences of errors are severe                  │
│  ✓ No clear 'correct' criterion — it's subjective         │
│  ✓ AI lacks enough context (business, users)              │
│  ✓ The task requires innovation, not replication          │
└──────────────────────────────────────────────────────────┘

DELEGABLE tasks: AI's sweet spot

These are the tasks where AI shines and where you get the highest ROI from your investment in tools:

TaskWhy it's delegable
Boilerplate and scaffoldingWell-defined patterns, predictable result
Mechanical renaming/refactoringUnambiguous transformation, verifiable
Generating unit testsPattern matching of the code structure
Format conversion (JSON→YAML, etc.)Deterministic transformation
Documenting existing codeAI reads the code and describes what it does
Generating types/interfacesAI infers types from usage
Configuration setup (linter, formatter)Standard configuration files
Translating code between languagesIf you know both languages to verify

How to delegate effectively:

✅ "Generate unit tests for the UserService class in
    services/user.py. Cover: create_user (success + duplicate),
    get_user (exists + doesn't exist), update_email (valid + invalid).
    Use pytest + fixtures. The tests go in tests/test_user_service.py."

→ Specific instructions
→ Defined scope
→ Clear expected format
→ Easy verification: the tests run

PARTIALLY DELEGABLE tasks: AI as a draft

In these tasks, AI generates a first draft that you adjust:

TaskWhat to delegateWhat you do
New feature with specsThe base implementationEdge cases, integration, testing
Integration with an external APIThe connection codeError handling, retry logic, auth
Complex SQL queryThe query skeletonOptimization, indexes, data verification
New UI componentThe base structure and stylesUX, accessibility, error states
Significant refactoringA proposal for the new structureThe final decision, gradual migration, tests

How to work partially:

✅ Step 1 (AI): "Generate the POST /orders endpoint with Pydantic
                 validation. Include: create order, calculate total,
                 apply discount if there's a coupon."

✅ Step 2 (You): You review the discount logic.
                 Does it handle expired coupons?
                 What happens if the discount > price?
                 Does it validate that the products exist?

✅ Step 3 (AI): "Add handling for: expired coupon (returns 400
                 with a message), discount > price (applies price 0,
                 not negative), nonexistent products (returns 404
                 with a list of the IDs not found)."

✅ Step 4 (You): Final review + tests + merge

The pattern is: AI does the heavy lifting, you apply the judgment AI doesn't have.

NON-DELEGABLE tasks: where your judgment is irreplaceable

TaskWhy it's not delegable
Architecture decisionsRequires context of the business, team, and roadmap
Feature prioritizationRequires understanding users, market, resources
Trade-off evaluationRequires experience and subjective judgment
Deep code reviewRequires understanding intent, not just syntax
Debugging production problemsRequires context of the complete system
Technical negotiation with stakeholdersRequires interpersonal skills
Mentoring junior developersRequires empathy and teaching experience
Defining requirementsRequires understanding the "why" of the business

AI CAN help with these tasks, but as a researcher, not as an executor:

✅ "What are the trade-offs between Redis and Memcached
    for our use case? We need cache for
    user sessions (50K concurrent), with a TTL of 30 min."

→ AI gives you information to DECIDE
→ The decision is still YOURS
→ AI doesn't know your budget, your team, your current infrastructure

The Cost of "Almost Right"

What it is

The most underestimated phenomenon of working with AI: code that's 90% correct. It looks fine. It passes some tests. But it has subtle errors that take more time to fix than writing the code from scratch.

The "almost right" cycle:

Step 1: AI generates code         → 2 minutes
Step 2: You verify                → 3 minutes
Step 3: You find a problem        → 1 minute
Step 4: You ask AI to fix it      → 2 minutes
Step 5: AI fixes it but breaks something else → 3 minutes
Step 6: You repeat steps 3-5      → 5 minutes
Step 7: You decide to fix it yourself → 10 minutes
                                    ─────────
Total:                              26 minutes

If you had written it yourself:     15 minutes

When it happens

"Almost right" is most likely when:

→ The task has specific domain logic
  (AI doesn't know YOUR business rules)

→ The task involves integration with existing code
  (AI doesn't have the complete context of your codebase)

→ The task has non-obvious edge cases
  (AI handles the happy path well, the edge cases not)

→ The task requires coherence with implicit conventions
  (AI follows general patterns, not YOUR conventions)

How to detect it early

Signs that you're falling into the "almost right" cycle:

🚩 Sign 1: Third iteration of the same fix
   → If you ask to fix the same type of error 3 times,
     the agent doesn't have enough context. Stop and do it yourself.

🚩 Sign 2: The fix breaks something else
   → A classic sign that the agent doesn't understand the dependencies.
     You understand them better. Take control.

🚩 Sign 3: The code becomes more complex than necessary
   → The agent adds complexity to handle errors that its
     own code introduced. The real solution is simpler.

🚩 Sign 4: You spend more time explaining the problem than solving it
   → If your correction prompt is longer than the manual fix,
     it's more efficient to do it yourself.

What to do when you detect "almost right"

Option 1: Take control
→ Read the generated code
→ Identify the root error
→ Fix it manually yourself
→ For: domain logic, edge cases, integration

Option 2: Discard and retry with better input
→ Delete what was generated
→ Rewrite the prompt with more context
→ Include the edge case explicitly
→ For: context problems, not complexity

Option 3: Accept the 90% and fix the 10%
→ The AI draft is good as a structure
→ You adjust the details manually
→ For: partially delegable tasks where the 90% saves time

Comparison: AI vs Manual by Task Type

Type of taskAI is fasterManual is fasterIt depends
Boilerplate/scaffolding✅ Always
Mechanical renaming✅ Always
Standard unit tests✅ Almost always
Feature with clear specs✅ On the context and complexity
Debugging your own code✅ Almost always
Algorithm with domain logic✅ Generally
Integration with a documented API✅ Generally
Integration with legacy code✅ Generally
Code review✅ Always
Architecture and design✅ Always
Documenting existing code✅ Generally
Migration between languages✅ On your mastery of both

Key insight: AI is consistently faster for mechanical and well-defined tasks. Manual is consistently faster for tasks that require judgment, domain context, or knowledge of the complete system.


The 30-Second Framework

For quick everyday decisions, use these 3 questions:

Question 1: Can I define "correct" in fewer than 2 sentences?
→ Yes: Probably delegable
→ No: Probably partial or non-delegable

Question 2: If AI is wrong, how much does it cost?
→ <5 min to fix it: Delegable
→ >5 min but detectable: Partially delegable
→ Potentially catastrophic: Non-delegable

Question 3: Have I done this task manually before?
→ Yes, many times: Delegable (I know what to verify)
→ Some times: Partially delegable
→ No, first time: Partially delegable or manual (I want to learn)

This framework takes literally 30 seconds of thinking and saves you the most costly trap: using AI for a task where it's counterproductive.


Connection with the Final Project

In Module 07, you'll build a mini-agent and observe it work. Your task classification will be directly relevant:

  1. You'll observe which types of tasks your mini-agent handles well (delegable)
  2. You'll identify when it generates "almost right" and why
  3. You'll document the relationship between the quality of your instructions and the quality of the output
  4. You'll create a table of "tasks my agent handles well" vs "tasks where it fails"

Your classification framework is the lens through which you analyze your agent's behavior.


Troubleshooting

Problem 1: "I never know whether to delegate until I try"

Cause: Lack of experience with what AI handles well.

Solution: Use the first weeks as a calibration period. Try to delegate. Measure the result. If you took longer than manual → recategorize the task. Over time, your intuition calibrates and the 30-second framework becomes automatic.

Problem 2: "I fall into 'almost right' constantly"

Cause: You're using AI for partially delegable tasks without doing your part.

Solution: For partially delegable tasks, expect AI's 90% and plan to do the 10% yourself. Don't expect AI to do 100%. If the 10% consistently becomes 50% of corrections, reclassify the task as "non-delegable."

Problem 3: "My team lead wants me to use AI for everything"

Cause: Pressure for adoption without nuance.

Solution: Share the framework with your team lead. Show that you're using AI strategically (for what it works well at) instead of indiscriminately (for everything). This guide's data backs your argument: using AI without judgment is worse than not using it (METR: -19%).


Exercises

Exercise 1: Classify your tasks from the last week (Easy)

Think about the last 5 code tasks you did. For each one, classify it as delegable, partially delegable, or non-delegable. If you used AI, was the classification correct?

See reflection guide

Example classification:

TaskUsed AI?Correct classificationDid I get it right?
Fix a validation bugYesPartially delegableYes — AI generated a draft, I adjusted edge cases
Configure ESLintYesDelegableYes — AI generated a complete config and it worked
Design a DB schemaNoNon-delegableYes — it required understanding the business domain
Write testsYesDelegableYes — AI generated correct tests with good instructions
Optimize a slow queryYesPartially delegableNo — I should have done it myself. AI didn't know the real access patterns

If you discover you classified incorrectly (you used AI for something non-delegable and lost time), that's valuable learning. Adjust your framework.

Exercise 2: Detect the "almost right" (Medium)

Read this sequence of interactions and answer: is it a case of "almost right"? At what moment should you have changed strategy?

Prompt 1: "Implement pagination for GET /products" → AI generates offset/limit pagination. It works for the first pages.

Prompt 2: "The results are inconsistent when products are added during pagination" → AI adds created_at sorting. It partially solves the problem.

Prompt 3: "Now there are duplicates when a product is updated during pagination" → AI adds client-side deduplication. The response becomes complex.

Prompt 4: "The deduplication doesn't work with active filters" → AI proposes cursor-based pagination. It requires redoing the whole endpoint.

See solution

Yes, it's a case of "almost right."

You should have changed strategy at Prompt 2.

The problem is that offset/limit pagination has a fundamental limitation with changing data (it's a known problem). AI didn't warn you about this in Prompt 1 because it generated the most common pattern, not the most appropriate one.

What you should have done: In Prompt 1, give more context: "Implement pagination for GET /products. The products are updated frequently. I need stable pagination that doesn't have duplicates or missing data when the data changes during navigation."

With that context, AI probably would have suggested cursor-based pagination from the start — saving you 3 iterations of patches.

Lesson: "Almost right" often starts with a prompt that doesn't include enough context about the real REQUIREMENTS (not just the mechanical task).

Exercise 3: The 30-second framework in action (Medium)

Apply the 3 questions of the 30-second framework to each task:

  1. Write a rate limiting middleware
  2. Generate data fixtures for tests
  3. Decide between a monolith and microservices for your next project
  4. Convert a React class component to functional with hooks
  5. Investigate why the server crashes every 3 hours
See solution
#Q1: Define "correct" in 2 sentences?Q2: Cost if it's wrong?Q3: Have I done it before?Classification
1Yes: "Limit to N requests per minute per IP. Return 429 when it exceeds."Medium: badly configured rate limiting can block legitimate usersSome timesPartially delegable
2Yes: "Test data that covers the cases of the User/Product schema"Low: incorrect fixtures are detected when running testsYes, many timesDelegable
3No: It depends on team, scale, roadmap, budget...Potentially catastrophicYes (but each time is different)Non-delegable
4Yes: "Same behavior, hooks syntax"Low: tests tell you if something brokeYes, many timesDelegable
5No: I don't know what causes the crashPotentially catastrophicYes (debugging is my job)Non-delegable (AI can help research, not decide)

Exercise 4: Complete personal protocol (Hard)

Combine the artifacts of this module into a one-page "personal protocol." Include:

  1. Your default mental model (power tool / intern manager)
  2. Your trust calibration checklist (from capsule 04)
  3. Your task classification criteria (from this capsule)
  4. Your circuit breaker signs (from capsule 04)
  5. Your "almost right" signs (from this capsule)
See template
# My Protocol for Working with Coding Agents

## Mental Model
- Default: Power tool (I direct, AI executes)
- Interaction: Intern manager (clear instructions, review, specific feedback)

## Trust Calibration
- Level 1 (complete): [YOUR level 1 tasks]
- Level 2 (focused): [YOUR level 2 tasks]
- Level 3 (light): [YOUR level 3 tasks]
- Automatic alerts to Level 1: [YOUR warning signs]

## Task Classification
- Delegable: [YOUR common delegable tasks]
- Partially delegable: [YOUR partial tasks]
- Non-delegable: [YOUR non-delegable tasks]
- Quick framework: Definable in 2 sentences? → Cost if it's wrong? → Have I done it before?

## Circuit Breaker
- STOP if: [YOUR red signs]
- PAUSE if: [YOUR yellow signs]
- CONTINUE if: [YOUR green signs]

## "Almost Right"
- Signs: 3+ iterations, fix breaks something else, growing complexity
- Action: Take manual control or discard and restart with a better prompt

Save this protocol. You'll use it as a reference in Module 07 and in your daily work.


Summary

In this capsule you learned:

  • Three categories of tasks: delegable (mechanical, well-defined), partially delegable (AI writes a draft, you adjust), non-delegable (require your judgment)
  • The cost of "almost right": code that's 90% correct that takes more time to fix than writing from scratch
  • "Almost right" signs: 3+ iterations, fixes that break things, growing complexity
  • The 30-second framework: 3 questions to classify any task in less than a minute
  • AI vs Manual: AI wins on mechanical tasks, manual wins on tasks that require judgment and domain context
  • Your personal protocol integrates the whole module into a reference document

What you created in this module:

  • ✅ Your trust calibration checklist (capsule 04)
  • ✅ Your task classification (this capsule)
  • ✅ Your complete personal protocol (final exercise)

Next module: Module 06 - The fundamental workflow: Research → Plan → Execute → Validate — the concrete process that makes the difference between developers who are productive with AI and developers who waste time with AI.


Additional Resources

  1. Agentic Coding — Task Delegation — Decision frameworks for what to delegate to coding agents
  2. Anthropic: Claude Code Best Practices — Official recommendations on when and how to delegate
  3. MIT Missing Semester 2026: Agentic Coding — Section on task selection and delegation
  4. METR Transcript Analysis — Real cases of effective vs ineffective delegation
  5. Stack Overflow 2025: What Developers Use AI For — Data on which tasks developers delegate most to AI
  6. Veracode 2025 — Evidence of why certain tasks (security) are not delegable