Artificial Intelligence
Before You Accept an AI-Written Change, Test the Requirement
A worked checklist example shows how to turn a vague feature request into observable behavior and judge an AI-generated change against it.
Start with a decision a person can verify
Imagine a team requesting an internal checklist that displays overdue items. “Highlight anything late” sounds specific until a reviewer asks what happens to completed tasks, missing due dates, and work due today. Before asking an AI assistant to suggest code, write the rule in plain language. In this example, an item is overdue only when its due date is earlier than the team’s current business date and its status is open. A missing due date goes to a separate review list.
Give the model a small acceptance table
Use four fictional records. Yesterday and open should be flagged. Today and open should remain on the regular list. Yesterday and completed should stay completed. A blank date and open should go to review. Ask the assistant to explain the expected result for each before proposing an implementation. Save these examples separately from the generated code so a reviewer can use them after the code changes.
Inspect the change where the user will see it
Suppose the proposed code uses “on or before today” and ignores status. It will flag both an item due today and an already completed item. Run the four records through the checklist view and compare the observed labels with the acceptance table. Ask for a narrow correction to the date comparison and status check, then rerun every case, including the ones that passed before.
Keep a short decision record
Record the agreed definition of overdue, the owner of the business date, the four examples, and the reviewer who accepted the result. If the team later decides work becomes overdue at a specific hour, revise the requirement and tests together. A change can be technically correct for yesterday’s rule and still be wrong for tomorrow’s workflow.