> For the complete documentation index, see [llms.txt](https://code-craftsmanship-saturdays.gitbook.io/pragmatic-programmer-and-clean-code-principles/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-craftsmanship-saturdays.gitbook.io/pragmatic-programmer-and-clean-code-principles/yagni.md).

# YAGNI

**You aren't gonna need it**

This is a mantra from Extreme Programming usually tied with agile software teams. It essentially means implementing features that you anticipate needing in the future. Martin Fowler discusses this concept in detail in the blog post [YAGNI](https://martinfowler.com/bliki/Yagni.html)

YAGNI argues that you should not implement features that you anticipate needing.

Building Features today for the future can be costly: 1. You devoted dev time for something that is not feasible and developer time is money. 2. You have to maintain this new feature in tandem with other features. 3. You falsely assume requirements that are wrong and you need to rewrite. 4. You are adding complexity to a code base for a perceived requirement. 5. You should wait until the feature is truly needed implementing it prematurely.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://code-craftsmanship-saturdays.gitbook.io/pragmatic-programmer-and-clean-code-principles/yagni.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
