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:
| Task | Why it's delegable |
|---|---|
| Boilerplate and scaffolding | Well-defined patterns, predictable result |
| Mechanical renaming/refactoring | Unambiguous transformation, verifiable |
| Generating unit tests | Pattern matching of the code structure |
| Format conversion (JSON→YAML, etc.) | Deterministic transformation |
| Documenting existing code | AI reads the code and describes what it does |
| Generating types/interfaces | AI infers types from usage |
| Configuration setup (linter, formatter) | Standard configuration files |
| Translating code between languages | If 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:
| Task | What to delegate | What you do |
|---|---|---|
| New feature with specs | The base implementation | Edge cases, integration, testing |
| Integration with an external API | The connection code | Error handling, retry logic, auth |
| Complex SQL query | The query skeleton | Optimization, indexes, data verification |
| New UI component | The base structure and styles | UX, accessibility, error states |
| Significant refactoring | A proposal for the new structure | The 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
| Task | Why it's not delegable |
|---|---|
| Architecture decisions | Requires context of the business, team, and roadmap |
| Feature prioritization | Requires understanding users, market, resources |
| Trade-off evaluation | Requires experience and subjective judgment |
| Deep code review | Requires understanding intent, not just syntax |
| Debugging production problems | Requires context of the complete system |
| Technical negotiation with stakeholders | Requires interpersonal skills |
| Mentoring junior developers | Requires empathy and teaching experience |
| Defining requirements | Requires 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 task | AI is faster | Manual is faster | It 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:
- You'll observe which types of tasks your mini-agent handles well (delegable)
- You'll identify when it generates "almost right" and why
- You'll document the relationship between the quality of your instructions and the quality of the output
- 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:
| Task | Used AI? | Correct classification | Did I get it right? |
|---|---|---|---|
| Fix a validation bug | Yes | Partially delegable | Yes — AI generated a draft, I adjusted edge cases |
| Configure ESLint | Yes | Delegable | Yes — AI generated a complete config and it worked |
| Design a DB schema | No | Non-delegable | Yes — it required understanding the business domain |
| Write tests | Yes | Delegable | Yes — AI generated correct tests with good instructions |
| Optimize a slow query | Yes | Partially delegable | No — 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:
- Write a rate limiting middleware
- Generate data fixtures for tests
- Decide between a monolith and microservices for your next project
- Convert a React class component to functional with hooks
- 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 |
|---|---|---|---|---|
| 1 | Yes: "Limit to N requests per minute per IP. Return 429 when it exceeds." | Medium: badly configured rate limiting can block legitimate users | Some times | Partially delegable |
| 2 | Yes: "Test data that covers the cases of the User/Product schema" | Low: incorrect fixtures are detected when running tests | Yes, many times | Delegable |
| 3 | No: It depends on team, scale, roadmap, budget... | Potentially catastrophic | Yes (but each time is different) | Non-delegable |
| 4 | Yes: "Same behavior, hooks syntax" | Low: tests tell you if something broke | Yes, many times | Delegable |
| 5 | No: I don't know what causes the crash | Potentially catastrophic | Yes (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:
- Your default mental model (power tool / intern manager)
- Your trust calibration checklist (from capsule 04)
- Your task classification criteria (from this capsule)
- Your circuit breaker signs (from capsule 04)
- 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
- Agentic Coding — Task Delegation — Decision frameworks for what to delegate to coding agents
- Anthropic: Claude Code Best Practices — Official recommendations on when and how to delegate
- MIT Missing Semester 2026: Agentic Coding — Section on task selection and delegation
- METR Transcript Analysis — Real cases of effective vs ineffective delegation
- Stack Overflow 2025: What Developers Use AI For — Data on which tasks developers delegate most to AI
- Veracode 2025 — Evidence of why certain tasks (security) are not delegable