Using AI coding tools without shipping slop

The noise around AI coding tools for developers is exhausting. Half the industry says manual coding is finished, the other half calls the whole thing a “slop machine” that produces unmaintainable garbage. Fourteen years into WordPress core and complicated WooCommerce checkouts, my experience sits somewhere in between. Switch your brain off with these tools and you become a liability, but refusing to touch them is not a plan either.

My team and I have had Cursor, Copilot, and Claude in the normal workflow for a while now, on the condition that we still behave like responsible developers. In practice that means the code we hand over should not become someone else’s technical debt. We treat AI output the way we would treat code from a stranger on the internet: test it, verify it, and never paste secrets or PII into a prompt without policy approval.

Mapping an unfamiliar legacy codebase

Landing in a big legacy codebase is intimidating, whether it is a ten-year-old custom theme or a plugin nobody has opened in years. I get the agent to produce a high-level architecture overview first. Instead of clicking through folders for three hours, I ask for the entry points, the routing logic, and the data layer.

“Give me a high-level architecture overview: entrypoints, routing, auth, data layer, build tooling. Then list 5 files to read in order. Treat explanations as hypotheses and confirm by jumping to referenced files.”

That turned what would have been a week of onboarding into a single day of reading. I wrote recently about the technical debt risks in AI development, and mapping the codebase first is the cheapest way to avoid adding to it.

Modernizing a legacy build stack

A client came to me with a site built close to a decade ago. It ran RequireJS and a version of Node.js that would not install on my 2025 MacBook. Doing that migration by hand meant days of dependency hell, so I had an agent move the SCSS and JS build over to a lean Vite stack instead.

An hour of refining the output later, I had a Vite config that handled the theme’s assets. A simplified version of what we ended up with:

// The AI-suggested vite.config.js for a WordPress theme
import { defineConfig } from 'vite';
import path from 'path';

export default defineConfig({
  base: process.env.NODE_ENV === 'production' ? '/wp-content/themes/legacy-theme/dist/' : '/',
  build: {
    outDir: 'dist',
    rollupOptions: {
      input: {
        main: path.resolve(__dirname, 'js/main.js'),
        style: path.resolve(__dirname, 'scss/style.scss'),
      },
      output: {
        entryFileNames: `[name].js`,
        chunkFileNames: `[name].js`,
        assetFileNames: `[name].[ext]`,
      },
    },
  },
});

Using AI coding tools for developers to ship robust tests

Plenty of developers skip tests because writing them is tedious. I do not get to skip them, so I use AI helpers to generate the scaffolding for Jest or PHPUnit. I also hand the agent specific testing guidelines, Kent C. Dodds’ principles among them, so it does not come back with a suite of happy-path tests that pass no matter what the code does.

The ask is usually plain: “Cover the happy path, edge cases, and failure modes. Explain why each test exists.” Making it justify each test is what keeps my review short.

Prompting and reviewing

Your code comes out about as specific as your prompt was. One trick I picked up from Ryan Florence is to end the first prompt with “Before we start, do you have any questions for me?” That gives the agent a chance to pin down what you meant before it starts inventing code.

Use version control religiously while you work this way. An agent will occasionally go rogue and refactor files you never mentioned. Small chunks with frequent Git commits give you somewhere to roll back to. For more of this, see my notes on the AI tools I actually use for web development.

If the AI coding tools question is eating your dev hours, I can take it on. I have been working with WordPress since the 4.x days.

What I would tell a junior developer

AI is a productivity multiplier for people who can already code, and not much more than that. The risk for juniors is skipping the grind, those long ugly debugging sessions where the expertise actually forms. Use the tools to free up attention for the harder decisions, and keep reading everything they hand back to you.

author avatar
Ahmad Wael
I'm a WordPress and WooCommerce developer with 15+ years of experience building custom e-commerce solutions and plugins. I specialize in PHP development, following WordPress coding standards to deliver clean, maintainable code. Currently, I'm exploring AI and e-commerce by building multi-agent systems and SaaS products that integrate technologies like Google Gemini API with WordPress platforms, approaching every project with a commitment to performance, security, and exceptional user experience.