AI for Developers: A Practical Workflow for Coding with AI Assistants

· AI, Development

Table of contents

Introduction

A couple of years ago, AI for developers meant autocomplete on steroids. Today, coding agents read a whole repository, run the test suite, and open a pull request. The tools changed fast, but the question I get from other developers has stayed the same: how do you use them without shipping garbage?

This is the workflow I use daily on PHP, Laravel and Magento projects.

Where AI helps most

  • Boilerplate and glue code: migrations, DTOs, form requests, API clients, test scaffolding.
  • Exploring unfamiliar code: "where is this price calculated, and what overrides it?" is a great question for an agent on a large Magento codebase.
  • Refactoring with a safety net: renames, extracting classes, upgrading deprecated APIs, as long as tests exist.
  • Debugging: paste a stack trace plus the relevant files and get a short list of hypotheses to check.
  • Writing documentation, commit messages and PR descriptions.

Where it still struggles

  • Architecture decisions: it will happily implement the first design that works, not the one you can maintain in two years.
  • Business rules that live in people's heads: if the requirement is not written down, the model will invent one.
  • Framework edge cases: Magento plugins, observers and DI configuration are a classic place for plausible but wrong code.
  • Security and performance: it rarely volunteers N+1 queries, missing authorization checks or unsafe input handling.

My workflow

  1. Write the intent first. A few sentences on what should change and why, plus constraints (coding standards, no new dependencies, keep backward compatibility).
  2. Give context, not the whole repo. Point the agent at the relevant files and keep a project instructions file (conventions, commands to run tests and linters).
  3. Plan before code. Ask for a plan, correct it, then let it implement. Fixing a plan is much cheaper than fixing a diff.
  4. Work in small steps. One concern per change, so each diff is reviewable.
  5. Let the tests judge. Run the test suite and static analysis after each step. If there are no tests, have the agent write them first.
  6. Review every line. I read AI-generated diffs as if a junior developer wrote them: politely, but carefully.

Good habits

  • Never paste secrets, customer data or proprietary code into a tool your client has not approved.
  • Verify every package, function and config key it mentions. Hallucinated APIs look very convincing.
  • Keep ownership: you are accountable for the code you commit, whoever typed it.
  • Keep learning the fundamentals. Review skills decay if you stop writing code at all.

What it means for developers

AI does not remove the need for developers, but it shifts where the value is. Typing speed matters less. Judgment matters more: choosing the right abstraction, asking the right question, spotting the subtle bug in a confident-looking diff, and understanding the business well enough to know what to build.

Conclusion

Treat AI as a fast, tireless and occasionally overconfident pair programmer. Give it clear intent, small tasks and a good test suite, and review its work. Used that way, it makes me noticeably faster without lowering the quality bar.