AI Coding Is a Framework, Not a Library
Piglei argues that AI coding tools are better understood as a framework than a library. Frameworks own the program's overall structure and buy convenience at low upfront cognitive cost; AI tools do the same, with natural language replacing code as the input. Using Django REST Framework as the case study, he shows a four-line ModelViewSet generating a full CRUD API, then details what customizing a create response or adding list filters actually costs: rewriting get_queryset and stacking if/else patches. Dropping to a plain ViewSet makes the code longer but surfaces the hidden cognitive debt. Two framework problems persist with AI: abstraction leaks, when prompts fail and you must debug down to variable names, and loss of control, as in vibe coding where the agent owns the structure. His advice: treat AI as a library, find the prompt sweet spot, design the structure yourself, encode constraints in AGENTS.md, and review generated code.