The Gap Between AI Capability and I
The danger isn't that the AI writes bad code—it's that it writes "plausible" code that works on the surface but introduces subtle architectural debt. I hit a wall last month when I let Claude 3.5 Sonnet handle a complex state management migration. It solved the bugs, but it implemented a pattern that bypassed my existing middleware, creating a ghost bug that took me two days to find.
To bridge this gap, I've stopped using "Apply All" blindly. I've shifted to a "Micro-Prompting" workflow to keep the cognitive load manageable. Instead of saying "Implement the payment gateway," I break it down into verifiable chunks:
1. Define the TypeScript interfaces for the payment response in types/payment.ts.
2. Implement the API wrapper in services/stripe.ts using the defined interfaces.
3. Connect the wrapper to the checkout hook, ensuring the loading state is handled.By forcing the AI to move in steps, I stay in the loop. If the AI suggests a change that looks "too clever," I use a specific prompt to force it to justify the design choice:
Explain why you chose this specific pattern over [Alternative X]. If this introduces a dependency on [Library Y], explain the trade-off in terms of bundle size.Configuring the .cursorrules file is where the real productivity gains happen. If you leave it blank, the AI guesses your style, and that's where the "capability gap" creates friction. I've added a strict set of constraints to my project root to stop it from hallucinating deprecated APIs:
- Always use Tailwind utility classes; avoid custom CSS files.
- Prefer functional components and hooks over class components.
- When modifying API routes, always check /docs/api-spec.md for naming conventions.
- Do not remove existing error handling blocks unless specifically asked.One major "gotcha" with these tools is the "Context Drift." After a long session of iterating on a single feature, the AI starts losing the thread of the original architecture. I've found that the best way to reset this is to manually clear the chat and re-index the relevant files.
My current productivity stack for staying in control:
- Cursor (Composer Mode) for rapid scaffolding and boilerplate.
- Claude Code (CLI) for deep terminal-based refactoring and git commit generation.
- Manual Code Reviews for every single AI-generated block that touches the core business logic.
The goal isn't to let the AI drive; it's to be the navigator who knows exactly where the car is going, even if the AI is the one pressing the pedals. If you can't explain exactly how the AI solved the problem, you haven't actually "coded" it—you've just outsourced the thinking.
All Replies (0)
No replies yet — be the first!
