---
title: "Build only what is needed now · Agent Wranglers"
url: https://agentwranglers.se/playbook/architecture/solid-and-dry/no-speculative-abstraction
updated: 2026-10-20
licence: "All rights reserved"
---

# Build only what is needed now

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Required
- Chapter: [SOLID and DRY](https://agentwranglers.se/playbook/architecture/solid-and-dry)
- Rule: Do not add interfaces, factories, options or layers for needs that do not exist yet.
- How: One implementation needs no interface, unless it sits at a boundary such as a database or an outside service. Add the abstraction when the second case arrives. Delete settings that nobody changes.
- Check: In review, every interface has two implementations or sits at a boundary. Every option has a caller that sets it.

Example:

```python
# Bad: a factory and an interface for the only exporter there will ever be
class ExporterFactory:
    def create(self) -> "IExporter": return CsvExporter()

# Good: call the one thing directly
def export_orders(orders): return to_csv(orders)
```

```ts
// Bad
class ExporterFactory { create(): Exporter { return new CsvExporter(); } }

// Good
const exportOrders = (orders: Order[]) => toCsv(orders);
```

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers architecture playbook: https://agentwranglers.se/playbook/architecture/solid-and-dry/no-speculative-abstraction`.

- Previous: [Depend on abstractions at the edges](https://agentwranglers.se/playbook/architecture/solid-and-dry/dependency-inversion)
- [SOLID and DRY](https://agentwranglers.se/playbook/architecture/solid-and-dry)
