YAGNI is difficult to get right because we can't see into the future. There's certainly been plenty of times where it would have been great if something was designed from the start with the new functionality in mind instead of having to hack it in. But there's also many times where thinking that we would need something that we didn't created maintenance and performance overhead.