The recommended workflow
The brief gives ten steps. Follow them in order; each one produces evidence you will need later.
- Create and switch to a branch named mid-course-project.
- Run the app and existing pytest suite before making changes. Save the baseline result.
- Choose two features and draft user stories with AI support. Review and correct assumptions.
- Write the mini-ADR before coding. Keep the design small.
- Implement Feature 1 backend changes, then tests, then frontend integration. Verify each layer before moving on.
- Run a Break Test for at least one important Feature 1 test.
- Repeat the same small-loop workflow for Feature 2.
- Run the full behavior contract and full pytest suite.
- Commit a working checkpoint, then do any focused refactor. Re-run the contract afterward.
- Complete the documentation files, final reflection, and submission link.
Baseline before anything else
Run the app and the existing test suite before you change a line, and save the result. The baseline is your proof that anything failing later was caused by your change, not inherited. If something already fails, record it honestly; the brief asks for the baseline, not for a perfect starting point.
Key ideaWithout a baseline you cannot tell a regression from a pre-existing problem, and neither can your reviewer.
Stories with AI, corrected by you
Draft the user stories with AI support, then review them. AI drafts tend to assume things your repository does not do: a different field type, a status name that does not exist, filtering in the browser when the brief wants a backend change. Find those assumptions, correct them against the real code, and mark at least one per feature in your stories file. Then write the mini-ADR before coding, and keep the design small.
The small loop for each feature
Each feature goes through the same loop, one layer at a time. You verify a layer before you start the next, so when something breaks you know which layer to look at.
- 1BackendModel, storage, route. Smallest change.
- 2TestsTargeted pytest, then the full suite.
- 3FrontendModal, cards, filter bar or panel.
- 4VerifyRun the app; watch the browser and Network.
- 5Break TestProve one important test bites.
Then repeat the loop for Feature 2, starting from a verified Feature 1.
One prompt, one phase
The loop only works if your prompts respect it. A prompt that asks for the backend, the tests and the UI of both features at once invites one giant patch you cannot review. Ask for one phase, name the files, state what must not change, and ask the assistant to stop. This is the Module 1 prompt-as-specification habit applied to a real codebase.
A phase-scoped prompt (study-guide illustration)Implement only the Feature 1 backend: an optional due_date on the task model and an overdue filter on the existing GET /tasks. Files: the model, storage and route modules. Do not change the frontend or tests in this phase. Keep unfiltered GET /tasks behavior identical. No new dependencies. Before editing, list the files and functions you will touch. After editing, run the existing tests and stop.
Checkpoint, then refactor
After both features, run the full behavior contract and the full pytest suite. Commit a working checkpoint. Only then do a focused refactor, and re-run the contract afterward. This is Module 3’s safe-refactor order: contract first, checkpoint second, a selected refactor third, verification after every accepted change.
Read with careThe brief says “any focused refactor”, so a refactor is expected but small. Pick one function or one block. A whole-file rewrite is the opposite of focused.
Key takeaways
- Branch, then baseline, before any change.
- Draft stories with AI, then correct its assumptions against the real repository.
- Write the mini-ADR before coding; keep the design small.
- Per feature: backend → tests → frontend → verify → Break Test, one layer at a time.
- Contract and full suite, checkpoint, then one focused refactor and a re-run.