Rework is effort spent revising or redoing software because intent, constraints, or quality expectations were unclear or surfaced too late. It is waste when it consumes time without improving user value. The code may work as written and still need changes to meet unstated expectations. section 1.1 section 1.0
Look for rework where expectations or feedback arrive late:
- Review reveals unstated architectural principles after implementation. section 1.1
- Generated code meets a narrow goal, such as brevity, but conflicts with performance requirements. section 1.1
- Production reveals performance or operational problems that could have been validated earlier. section 1.1.3
Reduce avoidable rework by making constraints visible before implementation. Teams can use documented standards, review checklists, linters, architectural fitness functions, or agent instructions. Ask whether a practice prevents rework or merely shifts where decisions are made. section 1.1 section 1.1.3
Refactoring with an AI agent
A refactor can reduce duplication and improve modularity yet violate performance or operational constraints. Make those requirements explicit and validate them, for example with load testing, before the work is considered done. section 1.1.3
Listing 1.1 A sample persona
#####Persona##### You are acting as a Senior Java Architect in a large-scale enterprise system. Context: - Architecture style: Modular monolith with clear bounded contexts Guiding principles: - Enforce clear separation between domain logic, application services, and infrastructure - Avoid framework leakage into the domain layer - Prefer precise types and immutability where practical - Design APIs for evolution, not convenience - Favor clarity over cleverness ###################
An architectural persona makes design constraints explicit for an AI agent before it generates code. section 1.1
