Make One Small Agent Edit and Verify It
Constrain a booking-slot wording fix to one module, then use tests and the diff to judge whether the change meets the task.
Today's Goals
- Write a file scope and acceptance criteria for a small edit.
- Ask Agent to state a plan before editing and run relevant checks.
- Review the diff, test output, and untested risks.
Plain-Language Walkthrough
Define “small” before opening the editor
Yesterday's map is useful only if it tells you where to make the next move. Assume a real local copy confirms that booking/ui/Confirmation.js prints a fixed “morning” label while the booking object already contains the correct slot label. That premise is a teaching fixture, not an observed Cursor result. The D2 request is deliberately narrow: use the existing label in the confirmation view, add or adjust the nearest test, and leave domain, billing, and unrelated styling alone. A small patch changes the least behavior needed to satisfy a written acceptance condition. It is not merely a patch with few lines.
Write the acceptance conditions before asking Agent to edit. For an afternoon booking, the displayed message uses the afternoon label from the booking object. For a morning booking, the existing correct behavior remains. The edit does not change stored slot values, payment calculations, or the public API. The relevant test passes under the project's actual test command, and the final diff contains only files justified by the task. These conditions are observable. “Make it work nicely” is not. A reviewer can now reject a superficially plausible patch without debating taste.
Interview questions
What makes a small Agent patch genuinely small?怎样判断 Agent 补丁确实足够小?
Common in ChinaCommon overseasBasic#cursor#workflow🔒 Unlock this chapter to see the answer keys.
Why does a passing focused test not settle the whole review?为什么相关测试通过仍不能结束审阅?
Common in ChinaCommon overseasIntermediate#cursor#workflow🔒 Unlock this chapter to see the answer keys.
How should you react when Agent changes a domain rule to satisfy a UI test?Agent 为通过 UI 测试改了领域规则,应如何处理?
Common in ChinaCommon overseasDeep dive#cursor#workflow🔒 Unlock this chapter to see the answer keys.
