Book: Hexagonal Architecture in Python
Companion code: hexagonal-python-examples — every listing from the book, free on GitHub
My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools
Me: xgabriel.com | GitHub
The line is from sqlalchemy import select , and it sits at the top of shop/orders/domain/order.py . A coding agent put it there while adding a "find orders above a threshold" query to your FastAPI service, because the Order class lived in that file and the import was the shortest path to a working query. The tests stayed green, and a reviewer skimming twelve lines of diff on a Friday approved it.
That one line is where the hexagon starts to dissolve. Your domain now depends on your database library, and the next change will lean on it, because the import is already there.
A folder called domain/ is a convention. Conventions hold while everyone remembers them, and an agent has no memory of the architecture talk you gave last quarter.…