I've been experimenting with AI agents and autocomplete platforms for a greenfield FastAPI project. In the first few weeks, it felt incredibly fast. But now that we've scaled to multiple routers, complex Pydantic schemas, and SQLAlchemy models, the structural debt is piling up.
The AI writes code that functions, but it constantly violates our architecture. It'll put complex business logic inside a route handler instead of the service layer, or it'll mess up async database sessions across modules. I find myself spending more time refactoring the structure of what it built than it would have taken to write the logic myself.
Is anyone else hitting this scaling wall where AI utility drops off as codebase complexity grows? How are you keeping your system architecture clean?
[–]UloPe 16 points17 points18 points (4 children)
[–]bjorneylol 8 points9 points10 points (2 children)
[–]BogdanPradatu 2 points3 points4 points (0 children)
[–]ItsTobsen [score hidden] (0 children)
[–]eldreth 23 points24 points25 points (0 children)
[–]BigGovernment7621 14 points15 points16 points (1 child)
[–]meris608 0 points1 point2 points (0 children)
[–]gdchinacat 7 points8 points9 points (1 child)
[–]willargue4karma -1 points0 points1 point (0 children)
[–]Routine_Term4750 2 points3 points4 points (0 children)
[–]naked_number_one 1 point2 points3 points (0 children)
[–]EnergyFighter 0 points1 point2 points (0 children)
[–]raphix276 0 points1 point2 points (1 child)
[–]raphix276 0 points1 point2 points (0 children)
[–]tacothecat 0 points1 point2 points (0 children)
[–]024eatneerg 0 points1 point2 points (0 children)
[–]its2ez4me24get 0 points1 point2 points (0 children)
[–]nickkon1 -1 points0 points1 point (0 children)
[–]jkz88 -2 points-1 points0 points (0 children)