- Start every new AI conversation with the Module 3 context block. The assistant does not reliably know your repo, backend rules, or current file unless you provide them.
- Use one prompt for one small step: setup, static board, fetch/render, UI states, drag-and-drop, modal, refactor, test, or debug.
- Anchor prompts to the right file or selected code. For Module 3, that usually means app/main.py, frontend/index.html, or tests/test_tasks.py.
- For debugging prompts, include evidence: the action you took, the status code, response body, console message, Network tab details, or pytest failure output.
- Read every answer or diff before accepting it. Then run the app or tests. A prompt can improve the draft, but verification makes the result trustworthy.
- Use the foundation prompts first to set context and avoid hallucinated repo assumptions. Then follow the hands-on chain in the same order as the module: setup, board, modal, refactor, test/debug, reflection.
Key mindset AI proposes; you decide. In Module 3, a strong prompt is not a replacement for inspecting the diff, checking the browser, using DevTools, and running pytest.
P0 · P1 · P2
Foundation prompts
These prompts support the whole module. They teach the habits that repeat in every hands-on part: give context, anchor to real files, ask for a plan, inspect output, and correct assumptions.
P0 · Start a Module 3 conversation with context
Use at the beginning of a new AI chat, or whenever the assistant starts making generic suggestions.
Weak versionHelp me build the frontend for my task tracker.
Improved version · P0I am working in the Module 2 Task Tracker repository for an AI-Assisted Coding course. Current project: - Backend: Python/FastAPI Task Tracker API. - Main task fields: id, title, description, status, priority, assignee. - Status values are exactly: ToDo, InProgress, Done. - Priority values are exactly: Low, Medium, High. - The frontend will live in frontend/index.html using vanilla HTML, CSS, and JavaScript. Module 3 goal: Build a browser-based Kanban board with three status columns, cards sorted by priority, loading/empty/error/ready states, drag-and-drop that PATCHes the backend, and a create/edit modal with title trimming and server 422 handling. Workflow rules: - Work in small steps. - Do not rewrite the whole file unless I explicitly ask. - Do not add frameworks, build tools, auth, accounts, real-time sync, or new backend features. - Treat your answer as a draft. I will inspect, run, test, and refine it.
Why it is betterIt gives the assistant the project, stack, exact enum values, Module 3 scope, and review mindset. The weak prompt leaves the assistant free to invent a frontend framework, status names, or extra features.
Then ask Before answering, list any assumptions you are making about my current files or backend behavior.
The mistake it avoidsAssuming the assistant remembers the repo, the Module 2 backend rules, or the exact Module 3 deliverables.
Context / project state · Prompt library pp. 2-3
P1 · Verify the assistant reads app/main.py
Use in Part 3.1 after opening the Module 2 repo in VS Code and selecting app/main.py.
Weak versionWhat routes are in this project?
Improved version · P1Read the selected app/main.py file carefully. Answer only from the selected file. 1. What framework does this file use, and what is the exact name of the app object? 2. List every route registered in this file: HTTP method, path, and handler function name. 3. Is CORS middleware already attached? If yes, list the allowed origins. If no, say "not present". Do not infer routes from a typical FastAPI project. If something is not visible in the selected file, say "not present" rather than guessing.
Why it is betterIt anchors the answer to the actual selected file and forces the assistant to distinguish visible evidence from assumptions.
Then ask You listed [ROUTE OR FEATURE], but I cannot find it in app/main.py. Re-read the selected file and correct only the unsupported claim.
The mistake it avoidsTrusting a confident route summary without checking the decorators and functions in the real file.
Repo grounding / setup verification · Prompt library p. 3
P2 · Ask for a plan before code
Use before each major build step: board, modal, refactor, or tests.
Weak versionBuild the whole Kanban board for me.
Improved version · P2Before writing code, give me an incremental plan for building this feature in small Copilot/Codex loops. Feature: [DESCRIBE FEATURE, e.g. Kanban board or create/edit modal] Current file(s): [LIST FILES] Output format: Return a table with columns: Step, File or selection, What changes, How I verify it. Constraints: - Do not write code yet. - Keep the plan aligned with Module 3: small changes, inspect the diff, run the app or tests, then refine. - Do not introduce frameworks, new backend features, or unrelated files.
Why it is betterIt prevents a giant first answer and turns the task into the same ask-inspect-run-test-refine workflow taught in the module.
Then ask Now write code only for Step [NUMBER]. Keep the diff focused on [FILE OR SELECTION].
The mistake it avoidsSkipping planning and accepting a full-file rewrite before you know how you will verify each layer.
Planning / small-loop workflow · Prompt library pp. 3-4
B1 · B2 · B3 · B4 · B5
Part 3.2 - Build the Kanban board
These prompts support the board build shown in the module: static board first, then fetch/render logic, then UI states, then CORS troubleshooting if needed, and drag-and-drop only after the static board works.
B1 · Create the static Kanban layout first
Use after creating frontend/index.html, before adding fetch or drag-and-drop.
Weak versionMake a nice task board page.
Improved version · B1In frontend/index.html, create the first static version of the Task Tracker Kanban board. Requirements: - Use vanilla HTML, CSS, and JavaScript only. No frameworks and no build step. - Create three columns with data-status values exactly: ToDo, InProgress, Done. - Display column labels as To Do, In Progress, and Done. - Include a header with the page title and short subtitle. - Add one sample card per column so I can see the layout. - Each card should show title, optional description, priority, assignee or Unassigned, and an Edit button. - Sort behavior is not required yet, but leave the markup easy to render from tasks later. - Do not add fetch logic yet. - Do not add drag-and-drop yet. Output: Return a focused implementation for frontend/index.html. Keep the code readable so I can inspect it before adding behavior.
Why it is betterIt asks for the exact first layer taught in the module. The weak version asks for polish but does not protect against skipped status values, missing card fields, or premature drag-and-drop.
Then ask I have the first column and card written. Continue the same pattern for the other two columns using the same classes and data-status structure.
The mistake it avoidsLetting the assistant jump straight to a complex interactive board before the static structure is verified.
Frontend structure / static layout · Prompt library p. 4
B2 · Add fetch and render logic
Use after the static columns render correctly in the browser.
Weak versionConnect this to the backend.
Improved version · B2Add fetch and render logic to the existing frontend/index.html. Context: - Backend base URL: http://localhost:8000 - Endpoint to load tasks: GET /tasks - Status values are exactly: ToDo, InProgress, Done. - Priority order inside each column must be: High, then Medium, then Low. If priorities tie, sort by id ascending. Task: - Add an async fetchTasks() function. - Store loaded tasks in a tasks array. - Add renderBoard(tasks) that groups tasks by status and renders each column. - Preserve the existing three-column layout and class names where possible. - Escape task text before inserting it into the DOM. - Keep empty columns visible. Constraints: - Do not add drag-and-drop yet. - Do not add the modal form yet. - Do not change the backend. - Return a focused diff or replacement for the script section only if possible.
Why it is betterIt names the backend endpoint, the exact enum values, the priority order, and the features that should not be added yet.
Then ask Before I accept this, list the exact browser checks I should run to verify grouping, sorting, and empty columns.
The mistake it avoidsUsing vague "connect to the backend" language that lets the assistant invent URLs, status names, or sorting rules.
Frontend data flow / GET /tasks · Prompt library p. 5
B3 · Add loading, empty, ready, and error states
Use after GET /tasks works and cards render from real backend data.
Weak versionAdd better loading and error handling.
Improved version · B3Extend the existing board rendering so the UI has four explicit states: loading, ready, empty, and error. Requirements: - Loading: show a visible loading state while GET /tasks is pending. - Ready: render the normal board when tasks load successfully. - Empty: if there are no tasks, still show all three columns with count 0 and empty-column placeholders. - Error: if GET /tasks fails, show a board-level error message with a Retry action. - Empty columns must remain visible and usable later as drop targets. - Do not hide the board just because one column has no tasks. Constraints: - Preserve priority sorting. - Preserve status values: ToDo, InProgress, Done. - Do not add drag-and-drop yet. - Do not rewrite unrelated HTML or CSS. Output format: Explain the small changes first, then provide the focused code diff or the replacement functions only.
Why it is betterIt makes each UI state testable and prevents the common AI mistake of only implementing loading and populated states.
Then ask Give me a manual verification checklist for these four states using the browser, DevTools, and stopping/restarting the backend.
The mistake it avoidsTreating empty and error states as optional polish rather than required frontend behavior.
UI states / frontend verification · Prompt library pp. 5-6
B4 · Diagnose CORS or browser fetch failure from evidence
Use only if the board works through the backend directly but the browser cannot fetch tasks.
Weak versionCORS is broken. Fix it.
Improved version · B4My Task Tracker frontend cannot fetch tasks from the FastAPI backend. Expected behavior: GET http://localhost:8000/tasks should load tasks into the board. Frontend page URL: [PASTE FRONTEND URL, e.g. http://localhost:5500/frontend/index.html] Backend URL: [PASTE BACKEND URL, e.g. http://localhost:8000] Browser Console error: [PASTE EXACT CONSOLE ERROR] Network tab result: [PASTE STATUS CODE OR "request blocked before response"] Relevant backend code: [PASTE app/main.py app creation and middleware section] Task: Diagnose whether this is a CORS issue, a wrong URL, a stopped server, or another fetch problem. Propose the smallest safe fix. Constraints: - Do not change API routes. - Do not add authentication or unrelated middleware. - If CORS is needed, allow only the local frontend origins I provide.
Why it is betterIt gives the assistant the evidence needed to separate CORS from wrong URLs, stopped servers, and frontend bugs.
Then ask Now give me the minimal app/main.py CORS middleware change only. Do not rewrite the route handlers.
The mistake it avoidsSaying "CORS is broken" without the frontend origin, backend URL, console error, or middleware code.
Browser debugging / DevTools evidence · Prompt library pp. 6-7
B5 · Add drag-and-drop with PATCH and rollback
Use only after the board renders correctly with real tasks and all UI states are verified.
Weak versionMake the cards draggable.
Improved version · B5Add drag-and-drop to the existing Kanban board in frontend/index.html. Behavior: - Use the native HTML5 drag-and-drop API. Do not add a drag library. - Each task card should carry its task id. - Dropping a card on a different column sends PATCH http://localhost:8000/tasks/{id} with JSON body { "status": targetStatus }. - If the card is dropped in the same status column, do nothing and do not send PATCH. - Use an optimistic update: move the card locally first so the UI feels responsive. - On a 200 response, keep the new state. - On a 4xx response such as 422, revert the card to its previous status, re-render, and show the server error message. - On network failure, revert and show a clear fallback message. Preservation constraints: - Do not break priority sorting. - Do not remove loading, empty, ready, or error states. - Do not change status values or request body shape. - Keep the diff focused on the drag/drop code and any minimal CSS needed for drag state.
Why it is betterIt connects the visual drag action to the backend business rules. The improved prompt makes rollback and server rejection part of the feature, not an afterthought.
Then ask Give me a DevTools verification checklist for valid drag, same-column drop, invalid transition, and network failure.
The mistake it avoidsImplementing local drag-and-drop that looks correct but never PATCHes the backend or ignores 422 rejection.
Interaction / server persistence · Prompt library p. 7
C1 · C2 · C3
Part 3.3 - Build the create/edit modal form
These prompts support the modal form flow: plan the flows, add the modal in a focused way, validate empty titles before sending requests, surface server 422 errors, and debug failures from Network tab evidence.
C1 · Plan the modal flows before editing
Use before adding the modal so the assistant does not rewrite the whole board.
Weak versionAdd a form for tasks.
Improved version · C1Before writing code, plan the create/edit modal for the existing Kanban board. Current file: frontend/index.html Existing behavior to preserve: - Three columns by status. - Priority sorting. - Loading, empty, ready, and error states. - Drag-and-drop PATCH with rollback on server rejection. Modal flows to support: - New Task opens an empty form. - Edit opens a pre-filled form for the selected card. - Empty or whitespace-only title is blocked before any network request. - Create uses POST /tasks. - Edit uses PATCH /tasks/{id}. - Server 422 errors stay visible in the modal. - Cancel, close button, Escape, and overlay click dismiss the modal. Output format: Return a table with columns: Flow, Code sections likely affected, Verification step. Do not write code yet.
Why it is betterIt forces the assistant and student to name the required flows before editing a working board.
Then ask Now implement only the smallest first step: add the New Task button and modal shell without changing submit behavior yet.
The mistake it avoidsAsking for a generic form and accidentally losing board behavior or backend validation rules.
Planning / form workflow · Prompt library p. 8
C2 · Add the create/edit modal in a focused way
Use after the board and drag-and-drop are working.
Weak versionCreate a modal form for adding and editing tasks.
Improved version · C2Extend the existing frontend/index.html with a create/edit task modal. Requirements: - Add a New Task button in the page header. - Keep the existing Edit button on each card or add one if missing. - Modal fields: title, description, status, priority, assignee, and hidden taskId. - Create mode: empty/default form, submit with POST http://localhost:8000/tasks. - Edit mode: pre-fill from the task card/data, submit with PATCH http://localhost:8000/tasks/{id}. - Client validation: title is required after .trim(); if empty, show "Title is required" and do not send a request. - Empty description should be sent as an empty string. - Empty assignee should be sent as null. - On 200/201: close the modal, clear errors, and call fetchTasks() so the board refreshes. - On 422: keep the modal open and show the server message in the relevant field slot or form-level banner. - Cancel, close button, Escape key, and overlay click all close the modal and clear errors. Constraints: - Reuse existing visual styles as much as possible. - Do not introduce a framework or new dependency. - Do not break drag-and-drop, priority sorting, or the four UI states. - Return a focused diff.
Why it is betterIt specifies both create and edit paths, client validation, server validation, success refresh, and dismissal behavior. These are the flows the lecture asks students to verify.
Then ask Before I accept the diff, list which functions or event listeners you changed and which existing behaviors could regress.
The mistake it avoidsAdding a form that creates tasks but does not handle edit, whitespace titles, server 422, or board refresh.
Form implementation / POST and PATCH · Prompt library pp. 8-9
C3 · Diagnose a failing modal flow from Network tab evidence
Use when one modal flow fails: create, edit, invalid transition, title validation, or dismissal.
Weak versionThe modal does not work. Fix it.
Improved version · C3In my Task Tracker frontend, this modal flow is failing: [DESCRIBE THE EXACT ACTION, e.g. "I edit a Done task and change status to ToDo"] Expected behavior: [DESCRIBE WHAT SHOULD HAPPEN] Actual UI behavior: [DESCRIBE WHAT THE UI SHOWS] Network request: Method: [POST or PATCH] URL: [PASTE URL] Status: [PASTE STATUS CODE] Response body: [PASTE RESPONSE BODY] Relevant selected code: [PASTE OR SELECT THE SUBMIT HANDLER / MODAL CLOSE LOGIC] Task: Diagnose the root cause and propose the smallest focused edit. Explain why the edit fixes the cause rather than hiding the symptom. Constraints: - Do not rewrite the whole file. - Do not weaken backend rules. - Do not close the modal on a 422 invalid-transition response.
Why it is betterIt replaces vague debugging with the exact evidence the assistant needs: action, request, status, response body, and selected code.
Then ask Your fix touches unrelated render logic. Revise it so only the submit handler or modal-close logic changes.
The mistake it avoidsDebugging from "it does not work" instead of the browser evidence that shows what actually happened.
Debugging / evidence-based prompt · Prompt library pp. 9-10
D1 · D2 · D3 · D4
Part 3.4 - Refactor what you just built
These prompts teach the safest part of Module 3: write the behavior contract first, commit, refactor one selected section, inspect the diff, and recover surgically if a behavior regresses.
D1 · Write the 8-behavior refactor contract
Use before any refactor prompt or visual cleanup.
Weak versionWhat should I check before refactoring?
Improved version · D1Create an 8-item behavior contract for my current Module 3 Kanban board before refactoring. Behaviors that must be covered: - Three status columns render with correct counts. - Cards sort by priority inside each column. - Loading state appears before tasks load. - Empty columns remain visible. - Error state appears when the backend is stopped. - Valid drag sends PATCH and updates the board. - Invalid drag/server 422 reverts and shows the server message. - New Task and Edit modal flows still work, including title validation and dismissal. Output format: Return a table with columns: ID, Behavior, How to check manually, Pass/Fail notes. Do not write or change code.
Why it is betterIt turns refactoring into a testable activity. The weak prompt is too open and does not protect against silent behavior changes.
Then ask Convert this into a short checklist I can paste into my reflection or debugging log after the refactor.
The mistake it avoidsRefactoring because the code looks messy without first writing down what must not change.
Refactor safety / behavior contract · Prompt library pp. 10-11
D2 · Refactor one selected section safely
Use after committing the working state and selecting one function or section in frontend/index.html.
Weak versionClean up this file.
Improved version · D2Refactor only the selected section for clarity and maintainability. Selected section: [DESCRIBE SELECTION, e.g. renderBoard/renderCard functions, drag handlers, or modal submit handler] Goal: [DESCRIBE THE CLEANUP, e.g. extract helper functions, rename unclear variables, reduce duplication] Hard preservation constraints: - Do not change URLs, HTTP methods, or request body shapes. - Do not change status values: ToDo, InProgress, Done. - Do not change priority order: High, Medium, Low. - Do not remove title .trim() validation. - Do not remove loading, empty, ready, or error states. - Do not remove optimistic update plus rollback on failed PATCH. - Do not change class names, IDs, or data-* attributes used by existing code. - Do not add new features, dependencies, or files. Output: Return a focused diff for the selected section only. After the diff, list which behavior-contract items I should re-run.
Why it is betterIt makes refactoring a bounded selected edit instead of a full-file rewrite. The constraints reflect the exact behaviors the module teaches students to preserve.
Then ask The diff changed [CLASS/URL/REQUEST BODY]. Revise the refactor while preserving that exact value.
The mistake it avoidsAccepting a clean-looking refactor that silently changes selectors, validation, or rollback behavior.
Selected edit / safe refactor · Prompt library p. 11
D3 · Review a diff for regression risk
Use before accepting a refactor or large AI edit.
Weak versionIs this diff okay?
Improved version · D3Review this proposed diff for Module 3 regression risk before I accept it. Behavior contract to preserve: - Three columns and counts render. - Priority sorting remains High, Medium, Low. - Valid drag sends PATCH and updates the board. - Failed drag/server 422 reverts and shows the server message. - New Task and Edit modal flows work. - Empty title is blocked with .trim(). - Loading, empty, and error states still show. - Dismissal paths still work: Cancel, close button, Escape, and overlay click. Diff: [PASTE DIFF HERE] Output format: Return a table with columns: Risk, Evidence in diff, Possible regression, Accept / revise. Do not rewrite the code. This is an inspection task only.
Why it is betterIt uses the AI as a reviewer rather than a generator. This reinforces the inspect step from the module.
Then ask For every item marked revise, suggest the smallest instruction I should give the assistant to fix it.
The mistake it avoidsTreating a diff as acceptable because it looks cleaner, without checking the behaviors it might have changed.
Inspect step / diff review · Prompt library pp. 11-12
D4 · Recover one regression surgically
Use when one behavior fails after refactoring.
Weak versionUndo the refactor. It broke stuff.
Improved version · D4After the refactor, one behavior regressed. Before the refactor: [DESCRIBE THE BEHAVIOR THAT WORKED] After the refactor: [DESCRIBE THE BROKEN BEHAVIOR] Selected code section: [PASTE OR SELECT THE SMALLEST RELEVANT FUNCTION/SECTION] Task: Restore the previous behavior in this selected section only. Constraints: - Do not rewrite the whole file. - Do not touch unrelated functions. - Do not change the test/check expectation. - Preserve the current working behaviors outside this regression. Output: Provide a focused patch and explain which behavior-contract item it restores.
Why it is betterIt avoids the common spiral of re-running the entire refactor and creating new regressions. The fix stays attached to one observed failure.
Then ask Now give me the one manual check I should run to confirm this regression is fixed and no adjacent behavior changed.
The mistake it avoidsResponding to one broken behavior with another full-file AI rewrite.
Refactor recovery / focused fix · Prompt library pp. 12-13
E1 · E2 · E3 · E4
Part 3.5 - Test and debug what you built
These prompts support the test/debug loop: brainstorm realistic PATCH edge cases, generate one test at a time, prove each test by source breakage, and debug from pytest output without weakening the test.
E1 · Brainstorm PATCH edge cases
Use after selecting the existing PATCH /tasks/{id} tests in tests/test_tasks.py.
Weak versionWrite more PATCH tests.
Improved version · E1Read the selected PATCH /tasks/{id} tests in tests/test_tasks.py. Identify edge cases that are not currently covered. List exactly 6 scenarios. Context: - The frontend now uses drag-and-drop and the modal form, so PATCH is hit often. - Relevant areas include status changes, invalid transitions, partial updates, invalid values, not-found ids, and malformed or empty update bodies. Output format: N. [Scenario in one sentence] Category: [validation | business logic | not found | malformed] Expected status: [HTTP code] Why it matters: [one sentence] Constraints: - Do not write tests yet. - Do not repeat scenarios already covered in the selected tests. - Do not suggest race conditions, SQL injection, authentication, permissions, or production database behavior. - Keep the scenarios realistic for this learning-project FastAPI backend.
Why it is betterIt separates test design from test writing. The module teaches students to brainstorm edge cases first, then generate one test at a time.
Then ask Rank these six scenarios from most important to least important for the drag-and-drop/modal frontend.
The mistake it avoidsAsking for "more tests" and getting broad, duplicate, or out-of-scope cases.
Test design / backend edge cases · Prompt library pp. 13-14
E2 · Generate one pytest test
Use after choosing one scenario from the edge-case list.
Weak versionWrite all the tests for those cases.
Improved version · E2Write ONE pytest test for this Task Tracker scenario: [PASTE ONE SCENARIO] Requirements: - Use the existing FastAPI TestClient pattern from tests/test_tasks.py. - Use the same fixture style as the existing tests. - Name the test function so it describes the scenario exactly. - Arrange required data through API calls, such as POST /tasks. - Act with one PATCH /tasks/{id} request for the scenario. - Assert both the HTTP status code and the relevant response body field or detail message. - If the scenario is invalid input, assert that the response communicates the validation or business-rule failure. Constraints: - Return only the test function. - Do not add imports unless the existing file truly lacks them. - Do not modify app code. - Do not write multiple tests in one answer.
Why it is betterIt keeps generated tests inspectable and connected to one behavior. The module warns that generated tests can sound correct while asserting the wrong thing.
Then ask Review this test name and assertions. Tell me whether the assertion actually proves the scenario or only checks that any error happened.
The mistake it avoidsAccepting a bundle of tests without reading whether each assertion matches the test name.
Test generation / one scenario at a time · Prompt library p. 14
E3 · Prove a generated test by deliberate breakage
Use after a new test passes once.
Weak versionThe test passed. Is it good?
Improved version · E3I added this pytest test and it currently passes: [PASTE TEST FUNCTION] Task: Tell me the smallest temporary SOURCE-CODE change that should make this test fail if the test is meaningful. Output format: 1. Source file/function likely to change temporarily. 2. Exact behavior to break. 3. Expected failing assertion or status mismatch. 4. What result would prove the test is weak or wrong. 5. Reminder to restore the source after the failure check. Constraints: - Do not modify or weaken the test. - Do not suggest random breakage unrelated to the scenario. - Do not make permanent changes.
Why it is betterIt turns the lecture principle into a reusable prompt: a test is trusted only when it fails for the bug it claims to catch.
Then ask Here is the failure output after the deliberate break. Does this failure match the intended scenario, or did I break the wrong thing?
The mistake it avoidsAssuming a passing generated test is meaningful without proving it fails when the source behavior is broken.
Test verification / deliberate breakage · Prompt library pp. 14-15
E4 · Diagnose pytest failure from output only
Use after introducing a subtle bug or when a new test fails unexpectedly.
Weak versionpytest failed. Fix the test.
Improved version · E4This pytest failure occurred in my FastAPI Task Tracker project. Failure output: [PASTE FULL PYTEST OUTPUT] Relevant source or selected file if available: [PASTE OR SELECT RELEVANT SOURCE CODE] Task: Diagnose the failure from the evidence and propose a source-code fix. Required response structure: 1. Root cause: exact file and function, or the smallest likely location. 2. Why it fails: trace how the source behavior leads to the failing assertion. 3. Cause fix vs symptom suppression: state which one your fix is. 4. Proposed fix: before/after snippet on the SOURCE file. 5. Verification: exact pytest command to rerun. Constraints: - Do not change the test just to make it pass. - Do not weaken assertions. - Do not add try/except to hide the failure. - Do not mask missing fields with defaults unless the source contract requires it.
Why it is betterIt gives the assistant failure evidence and blocks the most common bad AI debugging move: changing the test instead of fixing the source.
Then ask Your answer changes the test/assertion. Revise it so the fix is in the source code and explain why the original assertion should remain.
The mistake it avoidsDebugging by softening assertions, hiding the failure, or changing the expected behavior after the test catches a real bug.
Debugging / cause fix · Prompt library pp. 15-16
R1
End-of-module deliverable prompt
One prompt turns your own notes into the Module 3 debugging log and reflection, without letting the assistant invent what you did.
R1 · Write the debugging log and reflection from your notes
Use after the board, modal, refactor, tests, and debugging activity are complete.
Weak versionWrite my Module 3 reflection.
Improved version · R1Use only the notes I provide below. Do not invent actions, bugs, fixes, tests, or tool comparisons. Task: Create my Module 3 debugging log and short reflection. Required output: 1. Debugging log in four lines: - What I intentionally broke or what failed. - Failing test name and one-line failure summary. - AI assistant's root-cause diagnosis. - Whether I accepted or rejected the fix, and why. 2. Reflection in 3-5 sentences: - How the VS Code AI assistant helped during frontend work. - One place I had to correct or constrain the assistant. - How inspecting diffs, DevTools, or pytest output changed the result. - One habit I will reuse in later modules. My notes: [PASTE YOUR ACTUAL NOTES HERE] Constraints: - If my notes are missing a detail, write "Missing - add your own note". - Keep the language specific and student-friendly. - Do not claim I verified a behavior unless my notes say I did.
Why it is betterIt helps students complete the deliverable while preserving ownership. The reflection is based on what the student actually observed.
Then ask Make the reflection more concise, but still use only the facts in my notes.
The mistake it avoidsLetting the assistant invent a polished reflection that does not match the student workflow.
Deliverable / reflection · Prompt library pp. 16-17
O1 · O2
Optional extension
The prompts below are useful, but they go beyond the core Module 3 lecture emphasis. Use them only after the required board, modal, refactor contract, tests, and debugging log are complete.
O1 · Review accessibility and keyboard behavior
Use after the required modal and board behaviors work.
Weak versionMake this accessible.
Improved version · O1Review the selected frontend code for basic accessibility and keyboard behavior. Focus only on: - Meaningful button labels. - Visible focus styles. - aria-live announcements for board updates or errors if already present. - Modal keyboard behavior such as Escape to close. - Avoiding divs that behave like buttons without keyboard support. Constraints: - Do not redesign the UI. - Do not add dependencies. - Do not change backend behavior. - Mark any suggestion as optional if it is not required for the Module 3 deliverable. Output format: Return a table with columns: Issue, Why it matters, Minimal fix, Core or optional.
Why it is betterIt keeps accessibility review practical without making it look like a required advanced accessibility audit.
Then ask Give me only the two highest-impact changes that are safe to make without touching backend behavior.
The mistake it avoidsTurning an optional review into a broad redesign or framework migration.
Optional extension / accessibility review · Prompt library p. 17
O2 · Polish the visual design after behavior works
Use only after the static board, fetch/render, UI states, drag-and-drop, modal, and tests are working.
Weak versionMake the page look modern.
Improved version · O2Improve the visual polish of the selected CSS while preserving all Module 3 behavior. Current behavior to preserve: - Three columns by status. - Priority sorting. - Loading, empty, ready, and error states. - Drag-and-drop with rollback on failed PATCH. - Create/edit modal with validation and server 422 handling. Design constraints: - Reuse existing colors, fonts, spacing, and class names where possible. - Do not add external fonts, CSS frameworks, icons, or dependencies. - Do not touch JavaScript behavior unless a class name mismatch requires it. - Return only CSS changes or clearly separate CSS from any required markup change. Output format: Explain the visual goal in two bullets, then provide a focused diff.
Why it is betterIt turns vague polish into a behavior-preserving CSS task. In the module, polish is less important than not breaking the working app.
Then ask Review your proposed CSS changes and list any selectors that must still match the existing HTML/JavaScript.
The mistake it avoidsLetting a visual cleanup change class names, hide states, or remove affordances required by the JavaScript.
Optional extension / UI polish · Prompt library p. 18
End-of-module checklist
The library closes with what you should have produced and saved before moving on.
| Prompt | Use | Module connection |
|---|---|---|
| P0 | Start a Module 3 conversation with context | All parts |
| P1 | Verify the assistant reads app/main.py | Part 3.1 setup |
| P2 | Ask for an implementation plan before code | Small AI loops |
| B1 | Create the static Kanban layout | Part 3.2 board |
| B2 | Add GET /tasks fetch and render logic | Part 3.2 board |
| B3 | Add loading, empty, ready, and error states | Part 3.2 board |
| B4 | Diagnose CORS or browser fetch failure | Part 3.2 troubleshooting |
| B5 | Add drag-and-drop with PATCH and rollback | Part 3.2 interaction |
| C1 | Plan the create/edit modal flows | Part 3.3 modal |
| C2 | Add modal create/edit behavior | Part 3.3 modal |
| C3 | Diagnose a failing form flow from evidence | Part 3.3 debugging |
| D1 | Write the 8-behavior refactor contract | Part 3.4 refactor |
| D2 | Refactor one selected section safely | Part 3.4 refactor |
| D3 | Review a diff for regression risk | Part 3.4 inspect |
| D4 | Recover one refactor regression surgically | Part 3.4 recovery |
| E1 | Brainstorm PATCH edge cases | Part 3.5 tests |
| E2 | Generate one pytest test | Part 3.5 tests |
| E3 | Prove a generated test by breakage | Part 3.5 tests |
| E4 | Diagnose pytest failure from output | Part 3.5 debugging |
| R1 | Write the debugging log and reflection | Deliverable |
Read with careThe library has no end-of-module checklist, so this is its quick-reference table. It does not list the two optional extension prompts, O1 and O2.