L16 · Diagnose wrong answers and changed requirements
Skill packs and prompts are provided in English so they work best with the AI tools. Use them as-is.
Diagnose wrong answers and changed requirements
Learning time: about 28.8–45.5 active minutes. Choose ONE presentation: the text (about 5.5 minutes, estimated) OR the lesson video (3:49, measured). Then 25–40 minutes of practice and checking (estimated). Do not count both presentations. Setup delays and optional extra study are separate; learner timing has not yet been piloted.
Where you are: Module 8, lesson 16. You can recover a project. Now you will decide whether an unexpected result is a defect, a missing fact or a new request.
What you will do
Classify a reported problem, reproduce it, ask for a focused repair or a change decision, and recheck the affected output. This supports outcomes O1 and O7.
Teaching
“The result is wrong” is a useful starting observation, but it does not tell the builder what to change. Write what you expected, what happened, the input you used and why the difference matters. A screenshot can show the symptom; the input and steps let another person reproduce it.
Compare the result with the agreed requirement. If the calculator promised to reject negative attendees but accepts minus one, that is a defect. If the owner now wants a discount field that was excluded from the brief, that is a change request. If nobody specified whether the ticket price includes a fee, the calculation has an unresolved assumption.
Repair a confirmed defect within the original scope. Ask the owner to decide a consequential new requirement. Record an unknown instead of converting it into a convenient number. An agent should not change the fixed costs to make the workshop profitable or increase capacity to make its calculation fit.
A focused repair still needs a broader affected check. A change to rounding can fix the displayed break-even count while damaging capacity warnings. Recheck the failing example, nearby boundary cases and any shared calculation. Tests are evidence only for what they actually check. A test that repeats the same mistaken formula can pass while the business result remains wrong.
Worked example
This is an original simulated example, not an actual agent exchange. The Workshop Launch Kit uses USD 180 fixed cost, USD 8 variable cost, USD 30 ticket price and capacity 12. Suppose the calculator rounds 180 ÷ 22 down and displays eight as break-even. The agreed requirement asks for the smallest whole number that covers cost.
The owner reproduces the error, checks eight attendees manually and finds a USD 4 loss. They ask the builder to repair the whole-person rounding and preserve the input facts. After repair, nine produces a USD 18 surplus; eight remains a loss. At capacity, surplus remains USD 84. Those checks cover the original failure and nearby correct behavior.
Use a complete instruction like this:
Repair one confirmed defect in the local fictional Workshop Launch Kit.
First inspect the current revision and uncommitted work. Read the brief,
instructions and existing calculator. Preserve unrelated changes.
Facts remain fixed cost USD180, variable cost USD8 per attendee,
ticket price USD30 and capacity 12. Required behavior: show the smallest
whole attendee count that covers costs. The observed display says eight;
manual checking shows eight loses USD4. Explain the cause before editing.
Make the smallest relevant repair. Recheck eight, nine and twelve
attendees, the capacity boundary and invalid inputs affected by your
change. Report changed files, actual results, unchecked cases and any
new dependency you believe necessary before adding it. Do not alter
prices, scope, capacity, access controls or unrelated files. No push,
external message, purchase or deployment. Stop for review afterward.
Now suppose the owner asks to support two currencies. That request changes the brief. It needs decisions about conversion, rates and rounding before implementation. Adding a second currency symbol beside unchanged numbers would misrepresent the calculation.
Do it yourself
Classify these four separate reports as defect, new requirement or missing fact. Give a next action and one acceptance check for each.
- The agreed brief allows 0 to 12 whole attendees. Entering 12.5 produces a result.
- The owner asks for an emailed receipt for every attendee. No email or attendee records are in the brief.
- The input note says “venue fee 100,” without a currency, while the calculator requires USD.
- The brief requires a visible loss label. At a negative surplus, the number appears without a label.
Then write a repair request for one defect using a specific input, expected result and limited file scope. Preserve the original project boundaries. For the new request, write the decision needed before authoring; do not implement it during this exercise.
Feedback and retry
Pause here before reading the feedback.
Reports 1 and 4 are defects against explicit requirements. Reject the fractional count with a helpful message, and show a clear loss label when surplus is negative. Report 2 is a new requirement with external sending and personal-data implications. It needs a separate approved scope. Report 3 is a missing fact; the worker should ask which currency applies rather than silently treating it as USD.
Retry with this new case, using the L07 retry inputs (fixed cost USD 70, variable cost USD 5, price USD 15, capacity 6): the original requirement accepts whole counts from 0 to 6. At 6, the tool correctly reports a USD 10 loss. The owner says “It must be profitable; make the warning disappear.” Record why this is not evidence of a calculator defect. The cost, price or capacity decision must change explicitly if the owner wants a different business result. A correct calculation may deliver unwelcome news.
Check your understanding
Choose an answer and write one sentence explaining why before you read the answers.
- The repaired example passes, but no other tests were run. Which completion statement is accurate?
- A. The reported example passed; related checks remain open.
- B. Every requirement passes.
- C. The project is safe to publish.
Answers
- A. A narrow test result supports a narrow conclusion. Continue with the affected checks before acceptance.
Summary
Save the original expectation, reproduced result, classification, authorized change and recheck evidence. That record lets the next reviewer see why the project changed.
Sources
- OpenAI, Code review, choosing scope and following up, checked 8 November 2026.
- GitHub, GitHub flow, review and iteration.
- Anthropic, Common workflows. Diagnostic categories and exercises are original instructional procedures, not vendor guarantees.
