YAGNI stands for “You Aren’t Gonna Need It.” Martin Fowler describes it as a mantra from Extreme Programming that is now used generally across agile software teams. The idea is simple: do not build a capability until you actually need it, even when you feel sure you will need it later.
Fowler’s argument is that presumptive features, capabilities added because the team expects to need them, carry real costs whether or not the future arrives. They take time to build, they add complexity that slows down all the work that follows, and if the anticipated need never materializes, the effort is wasted outright. Even when the feature is eventually used, building it early often gets the details wrong, because the team understands the requirement better once it is real.
YAGNI is specifically about speculative generality, not about cutting corners. It does not argue against good design or refactoring; in fact it relies on them, since a team can only safely defer features if the code stays easy to change. The principle works best alongside practices like continuous refactoring that keep adding new behavior cheap.
The payoff is that teams spend their effort on what is known to be needed now, deferring decisions until they have the most information. That reduces both wasted work and the kind of complexity that makes software harder to maintain.