How I Made AI Write Code That Doesn’t Rot
I started building an Obsidian plugin and wrote almost every line of it with AI, using DeepSeek v4 inside OpenCode.
The speed is real. Development flies, and it delivers features really, really fast. But the key word is almost. I still have to review, fix, and adjust the code. The problem is that AI does not care about design patterns, naming conventions, or consistency. It produces code that is hard to read. Code nobody cares about is bug-prone. When it breaks, I am the one who has to fix it.
So, I made the tooling care for me. Every check with a strict mode runs in strict mode:
TypeScript: A silent type bug becomes a failed build seconds after I write it. It never ships.
  • Prettier: The formatting debate that used to take a team meeting now takes one command.
  • Knip: Dead code is flagged the moment it is no longer imported. I delete it and move on.
  • jscpd: Paste a block twice, and it tells me to extract a shared function.
  • depcruise: One architecture-breaking import kills the build. My design survives.
The real hero is AGENTS.md. I wrote down exactly what I want the AI to follow during development, focusing primarily on code structure. The model reads it before writing a single line. One file replaced a hundred code reviews.
The payoff is immediate. I can check the code anytime and understand it in minutes, not evenings. When the checks pass, the code is mine, even though I did not type a word.
The lesson is simple. Quality gates are not overhead. They are what makes AI-written code yours. The AI brings the speed. The checks bring the judgment. You bring the standards.
Here is the link to the repository so you can check out what I did: https://github.com/Karol-Szykula/NotePalace/tree/develop
3
14 comments
Karol Szykula
4
How I Made AI Write Code That Doesn’t Rot
powered by
EngineeringTech
skool.com/szykulatech-3240
We focus on JS/TS, React, Next.js, Supabase, shadcn/ui, Tailwind CSS, and deployments on Netlify. We focus on fast learning.
Build your own community
Bring people together around your passion and get paid.
Powered by