A county clerk's office asks its coding agent to restructure a decade-old case filing module so the internal code is cleaner and easier to maintain, without changing anything about what the module does from a caller's perspective, ahead of a larger modernization effort. How should the architect classify this task, and what should the agent's output preserve?
Select an answer to reveal the explanation.
Short Explanation
Refactoring is like reorganizing a cluttered filing cabinet: you swap messy folders for clean ones, but every document still ends up findable in exactly the same place. The clerk's office asked for cleaner internals with the same external behavior, which is a textbook refactor, not a rewrite or a new feature. The agent's job is structure, not function.
Full Explanation
Refactoring is explicitly in scope as a coding-agent use case: restructuring source code to improve maintainability while preserving observable behavior, which is exactly what the clerk's office described. Recognizing this distinction matters because a refactor and a feature change carry different risk profiles and different review expectations even though both involve editing the same files. Treating the task as feature addition misreads the request; introducing new filing capabilities changes the module's external contract, which is precisely what the clerk's office said it did not want touched. Framing it as data migration confuses the code that implements the module with the records the module operates on; nothing in the request mentions moving or reshaping stored data. Calling it an evaluation task misapplies a different discipline entirely: evaluation measures an agent's output against success criteria using golden datasets, it does not restructure source code, so it cannot be the deliverable here. A caveat worth flagging is that the phrase ahead of a larger modernization effort signals this refactor is a stepping stone, not the modernization itself, so scope should stay bounded to structure. A concrete check is to run the module's existing test suite or behavioral contract before and after the refactor and confirm every external input still produces the same output.