AI-Assisted Coding · Module 3Lesson 7

Study explanation · Lesson 07 · 10 min

Pitfalls and the finished module

Most Module 3 mistakes come from trusting output before checking context, browser evidence or the contract. This lesson collects the six pitfalls with their recovery moves, and the eight things you should have at the end.

Listen to this lesson

Hear the lesson read aloud, with each sentence highlighted as you go.

Narrated by an AI voice.

Most mistakes are trust mistakes

Looking back across the module, the failures have one shape: something was accepted before it was checked. The answer came from the wrong context, the browser was never opened, the contract was never re-run, or a test was never broken.

Key ideaMost Module 3 mistakes come from trusting output before checking context, browser evidence, or the behavior contract.

Pitfall guide

Six pitfalls, each with a recovery that narrows the problem rather than restarting it.

Pitfall guide · Lecture notes pp. 12-13
PitfallHow to recover
Wrong repo or file contextOpen the Task Tracker repo folder directly. Select the relevant file and ask the assistant to reread only that file.
Building too much at onceBack up to one layer: static board, styling, fetch/render, UI states, drag-and-drop, then modal.
Full-file AI rewritesReject or narrow the request. Select a function or section and preserve URLs, statuses, selectors, and behavior.
Refactor regressionUse the 8-item contract to identify the exact broken behavior, then fix only that section.
Generated test that is too weakBreak the source. If the test still passes, improve the assertion before trusting it.
Symptom-suppression debuggingReject fixes that weaken tests or hide errors. Ask for a source-cause explanation and a minimal source fix.

Every recovery is a narrowing

Read the right-hand column again and the pattern is clear. None of the recoveries is “ask again for everything”. Each one makes the problem smaller: one folder, one file, one layer, one section, one behavior, one assertion, one source fix.

  • Context: one repo folder, one selected file.
  • Scope: one layer of the board at a time.
  • Edits: one function or section, with URLs, statuses and selectors preserved.
  • Regressions: one contract item, one section.
  • Tests: one broken source change that must make the test fail.

What you should have at the end

The final deliverable is not just a working UI. The checklist asks for evidence alongside every feature.

End-of-module checklist · Lecture notes p. 13
You should have...Check
VS Code + Copilot working on the right repoYou verified at least one answer against app/main.py.
A Kanban board in frontend/index.htmlThree columns, priority sorting, fetch/render logic, and all four UI states.
Drag-and-drop status updatesValid moves persist through PATCH; invalid moves revert or refresh and show an error.
A create/edit modalTitle trimming, POST/PATCH behavior, server 422 handling, and dismissal flows all verified.
A behavior contractThe 8-item checklist passed before and after the refactor.
A cleaner/refactored frontendThe refactor was selected, inspected, accepted deliberately, and verified.
Expanded backend testsNew edge-case tests were run and at least one was proven through deliberate breakage.
A debugging log and reflectionYou recorded evidence, AI diagnosis, decision, and a brief comparison of AI tools/workflows used so far.

Key ideaThe final deliverable is a working UI plus evidence that you inspected, tested, refactored, and debugged responsibly.

Write the reflection from your own notes

Prompt R1 lets the assistant format your debugging log and a three-to-five-sentence reflection, but only from notes you paste in. It must not invent actions, bugs, fixes, tests or tool comparisons, must not claim you verified something your notes do not mention, and must mark gaps “Missing - add your own note”. The reflection covers how the assistant helped with the frontend, one place you had to correct or constrain it, how diffs, DevTools or pytest output changed the result, and one habit you will reuse.

Read with careThe end-of-module checklist also asks for a brief comparison of the AI tools and workflows you have used so far, but neither the notes nor R1 describe it further. Write it yourself, from your own experience in Modules 1 to 3.

What comes next

Module 3 completes the first half of the course. The midcourse project asks you to add two scoped features to this same Task Tracker, at least one visible in the frontend, and is assessed mainly on the process you practised here: plan, constrain, implement in small steps, inspect, verify in the app, test, and document what you accepted, edited or rejected.

Key takeaways

  • Most mistakes come from trusting output before checking it.
  • Every recovery narrows the problem: one file, one layer, one section, one behavior.
  • The deliverable is a working UI plus evidence for each part of it.
  • Your reflection comes from your notes, never from the assistant’s imagination.

Built from the Module 3 lecture notes, prompt library and additional readings; the module videos and slides were not supplied.

Your study checkpoint

Ready to continue?

Mark the lesson complete once you have read it and tried its idea on something real.

Next · Summary