01 Why does Module 2 move the AI assistant from the browser into the editor?The work now happens inside real project files, and the assistant needs to read the actual codebase. Browser assistants cannot generate Python code. The editor assistant writes correct code without review. Module 2 no longer uses prompts; it relies on inline completions.
02 What is the gate before any code is generated in Module 2?pytest reports 16 passing tests. Cursor can read app/main.py and correctly explain what the /health endpoint does. Swagger UI shows five endpoints. The prompt library has been copied into the repository.
03 How should inline completions be used, according to the notes?For all new business logic, because they are faster than chat. Never; they are disabled for this module. For boilerplate, without replacing deliberate prompting for new logic. Only for writing tests.
04 Why must TaskCreate and TaskUpdate not accept id, created_at or updated_at?Pydantic v2 cannot validate datetime fields. Those fields slow down the in-memory store. The response model would become too large. They are server-managed; storage generates them, so a client must not be able to set them.
05 A generated title validator checks for an empty string but doesn’t strip first. Which verify_a.py check is most likely to fail?Title over 200 characters rejected. Whitespace title rejected. Defaults applied. Invalid status rejected.
06 verify_a.py prints a FAIL line about an extra field being accepted. What is the right next prompt?A2: paste the exact FAIL lines and limit the fix to app/models.py. B3: fix the POST route. “My model tests failed. Fix the models.” D2: regenerate the pytest suite.
07 Why does Part 2.2 build one endpoint per prompt?Cursor can only output one function at a time. FastAPI requires routes to be registered separately. It makes the cost of each prompt lower. All endpoints at once makes output harder to review and lets mistakes multiply.
08 What does the vague-versus-strict POST experiment show?Vague prompts always produce code that fails to run. Strict prompts are only needed for business logic. Vague prompts can create plausible code; strict prompts create code you can verify. Both prompts produce the same code if the model is good enough.
09 GET /tasks?status=Done finds no matching tasks. What should it return?404 with a “not found” detail. 204 with no body. 200 with an empty list. 422, because the filter matched nothing.
10 Which response is correct for a successful DELETE /tasks/{task_id}?204 with an empty body. 200 with the deleted task as JSON. 201 with a confirmation message. 404, because the task no longer exists.
11 A generated route calls storage.find_one(task_id). What is wrong?find_one is a Pydantic v1 method. It is an invented helper; storage.py defines get_task_by_id, not find_one. It should be wrapped in try/except. Nothing, as long as the route returns 200.
12 Why does the status-transition rule belong in the backend?The frontend can’t read enum values. FastAPI requires it for PATCH routes. It makes the UI faster. A client can call the API directly, so only the backend can reliably enforce the rule.
13 A generated validator accepts any status that is a valid TaskStatus value. What is the core problem?It checks the new value only, not the (current, new) pair. It should return 400 instead of 422. It should use if/elif chains instead of a set. It should run before the task is fetched.
14 The six-test matrix returns 200, 200, 422, 200, 422, 422. Which check is off, and what is a likely cause?T3; Done -> ToDo is wrongly allowed. T1; ToDo -> InProgress is missing from the set. T6; the route validates transitions even when status is not in the payload. T5; same -> same is wrongly allowed.
15 In the generated tests, the missing-title test sends {"title": " "}. What is wrong?Nothing; spaces count as missing. It should send {"title": null}. It should expect 400. It tests a blank title, not a missing one; the missing-title test should send {}.
16 What is the purpose of the Break Test?To measure how fast the suite runs. To prove the tests fail when the behavior they protect is broken. To find bugs in production code that the tests missed. To check that pytest is installed correctly.
17 You comment out validate_status_transition and every test still passes. What should you do?Fix the test so it actually checks an invalid transition, then rerun the Break Test. Restore the code and move on; the suite is green. Change the production code to raise 400 instead. Delete the transition tests, since they test nothing.
18 Which reflection log best meets the module’s expectations?“Cursor was very helpful and the strict prompts were better.” A list of every prompt used in the module. Three to five sentences naming verification results, where Cursor helped, where it guessed, and what review caught. A copy of the API summary checklist.