AI-Assisted Coding · Module 2Lesson 6

Study explanation · Lesson 06 · 10 min

Deliverables, logs and the bridge to Module 3

Module 2 ends with three kinds of evidence: code, verification results, and three short logs that record what you prompted, what you corrected and what you learned. Then the same loop carries into the frontend.

Listen to this lesson

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

Narrated by an AI voice.

Code deliverables

Before moving on, the notes ask you to make sure these files are saved in your repository.

Module 2 code deliverables · Lecture notes pp. 10-11
FileWhat it holds
app/models.pyPydantic v2 models, TaskStatus and TaskPriority enums, validators, and extra-field rejection.
app/storage.pyIn-memory storage with add_task, get_all_tasks, get_task_by_id, update_task, delete_task, and _reset.
app/main.pyFive CRUD routes wired to storage, with PATCH calling the transition validator.
app/business_rules.pyVALID_TRANSITIONS and validate_status_transition.
tests/verify_a.pyModel verification script with all eight checks passing.
tests/conftest.py and tests/test_tasks.py16 or more pytest tests.

Verification deliverables

Each verification gate in the module leaves a result you should be able to show.

  • GET /health returns 200 before you begin editing.
  • python -m tests.verify_a prints PASS for all eight model checks.
  • curl or Swagger checks verify all five CRUD endpoints.
  • The status-transition matrix returns 200, 200, 422, 200, 422, 200.
  • pytest tests/ -v returns a full green suite.
  • Break Test evidence: at least the invalid-transition test fails when transition validation is removed, and the blank-title test fails when title validation is broken.

Documentation deliverables

Three short logs record your judgment, which is the part of the work the AI can’t do for you. The prompt comparison log sets the vague POST prompt against the strict one, with notes on what changed. The correction log collects examples of AI output you inspected and fixed. The reflection log is three to five sentences on where Cursor helped, where it guessed, and what your review caught.

  • Prompt comparison log Vague POST prompt versus strict POST prompt, with notes on what changed.
  • Correction log Examples of AI output you inspected and fixed.
  • Reflection log Three to five sentences on where Cursor helped, where it guessed, and what your review caught.

Writing the logs from evidence

Prompts E1 and E2 help you draft the two logs, and both insist on evidence. E1 asks you to paste the weak and strict prompts and three to five observations about each output, then builds a comparison with columns for the prompt difference, the weak output’s risk, the improved output’s benefit, and what you learned. E2 asks for the actual result of every verification step and the Break Test, plus one thing the editor AI did well and one thing you had to correct, and tells the assistant not to exaggerate or mention anything you didn’t provide. The weak versions, “Summarize which prompt was better” and “Write my reflection for this module”, produce exactly the generic text these logs are meant to replace.

Prompt E2 from the libraryHelp me draft a 3-5 sentence Module 2 reflection log. Facts from my work: - Data model verification result: [PASTE RESULT] - CRUD endpoint verification result: [PASTE RESULT] - Business-rule transition matrix result: [PASTE RESULT] - Pytest result: [PASTE RESULT] - Break Test result: [PASTE WHAT FAILED WHEN YOU BROKE THE CODE] - One thing Cursor/editor AI did well: [PASTE] - One thing I had to correct or verify carefully: [PASTE] Write the reflection in first person, but keep it professional and specific. Do not exaggerate; only mention evidence I provided.

Optional extensions

The library adds two optional prompts for after the required work and the Break Test are done. O1 explains pytest or framework warnings and sorts each into safe to ignore for now, fix now, or note for later, so warning cleanup doesn’t distract from correctness. O2 produces a one-page API summary checklist from verified facts only, and forbids inventing features such as authentication, databases or frontend behavior.

The bridge to Module 3

In Module 1 you had a skeleton with a single health endpoint. Now you have a working backend with a strict data model, five CRUD endpoints, transition business rules, and a test suite you proved by breaking the code and watching the right tests fail. Cursor wrote a lot of the code, but the prompts were yours, the file references were yours, the verification steps were yours, and the final judgment was yours. In Module 3 you build the frontend, connect it to this API, and debug across the frontend-backend boundary. The same loop applies: ask, inspect, run, test, refine.

Key ideaThe AI drafted the backend; you made it correct.

Key takeaways

  • Deliverables come in three kinds: code, verification evidence and documentation.
  • The logs record your judgment: what you compared, what you corrected, what your review caught.
  • Draft logs with E1 and E2 from pasted evidence, never from a general impression.
  • Module 3 keeps the same loop: ask, inspect, run, test, refine.

Built from the Module 2 lecture notes and prompt library; page references are in the source notes below.

Your study checkpoint

Ready to continue?

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

Next · Summary