O9X Build Log 14: The Imposter Engineer - Why AI Code is a Black Box Trap
I am not a software engineer, yet for three weeks AI made me feel like one. I shipped features fast and the screens loaded, though the logic underneath stayed a black box. In operations, if I do not own the logic, I do not own the risk.
As I wrote in Log 10, I picked a boring stack to avoid odd errors: Python with FastAPI, Supabase, and Cursor. I assumed a clear Product Requirements Document on a standard stack would produce clean code.
I spent five days writing specs for the Associate Enrollment Module, a basic CRUD flow for onboarding staff. I defined every field, including name, ID, bank details, and PF number, along with every validation rule and success state.
The first version worked right away, saving names straight to the database. Then I asked for one validation check to keep bank account numbers between nine and 18 digits. In seconds, the AI rewrote the file, added 60 lines, and deleted three0 lines of working logic.
It imported three new libraries, nested a loop inside the save function, and swapped a simple alert for a tangled try-except block. Over the next three bug fixes, it stacked more complexity on top of that patchwork. The code kept running, yet the AI generated changes faster than I could audit them.
With AI, a bloated function costs the same as a clean one, so I never felt the weight of each new library. If I kept going, I would build a 40-module system that worked on calm days and broke beyond repair on bad ones. I could not audit the code because I had only requested it.
I stopped the build and put a Three-Attempt Protocol in place. In Attempt 1, I focus only on moving data from A to B in a rough prototype. I ignore code quality, variable names, and speed until the core logic works.
In Attempt 2, I ask the AI to reverse-engineer its own code into a technical spec so I can see what it actually built. I cut the bloat, add what it missed, and rebuild the module from scratch. This clean version usually runs faster and uses 20 to three0% less code.
Attempt three is for hardening, though I have not finished building this step yet. Once the clean logic is locked, I plan to check for security holes, standard engineering patterns, and maintained libraries.
AI writes code fast and eagerly. My job is to slow it down before I ship a black box I cannot fix.