First Directed Edit — Walkthrough

Module 2, Lesson 2.4 activity · both agents · same task

Why this activity exists. You are going to run the exact same small edit through two different coding agents — Cowork (browser) and Claude Code (terminal). The goal is not to compare them as products. It is to feel, in your own hands, the difference between directing through a chat window and directing through a terminal on the same closed loop. The comparison you write at the end is yours; there is no right answer.

What you’ll need before starting

Step 0 — Clone the starter repo

The starter is a tiny Python file with a deliberate typo and an undocumented function. Clone it into your course working folder:

$cd ~/ai-architect-academy $git clone https://github.com/ai-architect-academy/first-directed-edit.git $cd first-directed-edit $ls

You should see a single file: greet.py. Open it in VS Code. Note the contents (about 10 lines). You will not edit it by hand — both agents will.

If the repo URL is unreachable or you prefer offline work, ask the instructor for the local starter file. It’s a 10-line Python snippet; any small, typo-ridden script works.

Step 1 — Identify what needs to change

Open greet.py. You are looking for two things:

  1. A one-word typo in a comment or string.
  2. A function definition with no docstring.

Write them down here — it will help you check each agent’s output.

Typo I spotted:

Function that needs a docstring:

Step 2 — Run the task through Cowork

Tool A — Cowork
  1. Open Cowork in your browser. Make sure it is pointed at your first-directed-edit/ folder.
  2. In the Cowork chat, paste this prompt exactly once (you can tweak on subsequent attempts):

    “Open greet.py in this folder. There is one typo and one function missing a docstring. Please: (a) fix the typo, and (b) add a two-sentence docstring to the function that explains what it does and what arguments it takes. Show me the full diff before applying.”

  3. Review the diff Cowork proposes. Check it against the two things you wrote down above. Accept if correct; push back with a short follow-up if not.
  4. Once applied, switch to VS Code and confirm the file on disk reflects the change.

Capture what happened

The prompt you actually used
First-try success? (yes / partial / no)
One thing that surprised you

Step 3 — Reset the file, then run the task through Claude Code

Tool B — Claude Code
  1. First, reset greet.py back to its original state so Claude Code has the same starting point Cowork had: $cd ~/ai-architect-academy/first-directed-edit $git checkout -- greet.py $cat greet.py # verify the typo is back
  2. Still in the same folder, start Claude Code: $claude
  3. Paste the same prompt you gave Cowork (or something equivalent). Use the same language if you can — it makes the comparison fair.
  4. Review the diff Claude Code shows in the terminal. Accept or push back.
  5. Exit Claude Code (Ctrl+C or /exit). Confirm greet.py on disk matches what you accepted.

Capture what happened

The prompt you actually used
First-try success? (yes / partial / no)
One thing that surprised you

Step 4 — Side-by-side comparison

Which one felt more like directing, and which felt more like asking?

What caused that difference — interface, feedback, speed, something else?

If you had one real task tomorrow, which agent would you reach for first, and why?

Deliverable

A half-page write-up that combines your three answers above into a short memo to yourself. Keep it; Lesson 2.5 and Module 3 both reference it. If you have time, copy the final greet.py into my-first-loop.md as evidence of your first closed-loop directed edit.

Troubleshooting notes