Working With AI Agents Without Checking Your Judgment At The Door

AI coding tools such as Copilot, Cursor, Claude, and ChatGPT have moved from experiment to everyday utility for many teams. When used deliberately, they can digest unfamiliar code, automate repetitive refactors, and even give you a foothold in technologies you have never touched. The caveat is that you still own the quality of what ships. Treat anything the tool generates like code from an unfamiliar developer: review it critically, verify security and privacy implications, and never feed proprietary code, secrets, or PII into a tool that your employer has not approved. The following techniques come from field experience shipping production web interfaces with these tools in the loop.

Where AI Agents Earn Their Keep

These examples generally assume JavaScript-centric work in frameworks like React, Vue, Svelte, or Angular, though the patterns translate well elsewhere.

Decoding An Existing Project

Large legacy codebases can be disorienting. Instead of spelunking through directories blindly, open your project in an agent-aware editor and interrogate it like a colleague. Ask for a high-level architecture overview covering entry points, routing, authentication, the data layer, and build tooling, then follow up with requests for deeper dives into specific mechanisms like routing or auth flows. A useful frame for the initial prompt is:

"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."

Continue with pointed follow-up questions and verify each claim by exploring the referenced source files. The agent maps the territory; you still walk it.

Triaging Breaking Changes From Dependency Upgrades

Major version bumps often include subtle breaking changes that surface as frustrating regressions. When upgrading plotly.js from version 2 to 3 in an Angular project eliminated the x- and y-axis labels on graphs, a direct question to ChatGPT proved its worth: "I updated my Angular project that uses Plotly. I updated the plotly.js — dist package from version 2.35.2 to 3.1.0 — and now the labels on the x and y axis are gone. What happened?" The resulting explanation pointed directly to the migration concern involved. As ever, the explanation needs validation against the official migration guide before you commit your fix.

Replicating Refactors Across Many Files

When you spot duplicated code that should be consolidated into a shared component, you can perform the extraction in one file, then instruct your agent to roll the same pattern out to the rest. Most agents support selecting multiple files as context. Add both the refactored file and untouched counterpart files to the prompt, and request, "Replicate the changes I made in file A to file B as well." The drudgery of repeating an identical structural edit across dozens of files disappears, while review stays straightforward because you control the source pattern.

Venturing Into New Languages

AI assistance really shines when you need to deliver in a language you have not mastered. A complex animated gradient loading state on a 3D object, authored in GLSL with its notorious learning curve, seemed unrealistic within a two-day deadline. Starting with a simple prompt to render a canvas with an animated color gradient, in each subsequent session instructing AI to bring more complexity and finesse, birthed a strong shader foundation. Iterating on this result led directly to a functional integration into the production codebase.

Writing Tests When Time Is Tight

Unit and integration test suites are the first thing to be sacrificed when delivery looms. Agents can spin them up fast, but you must still direct the coverage strategy. Use a specific scenario-based prompt:

"Write unit tests for this function using Jest. Cover happy path, edge cases, and failure modes. Explain why each test exists."

Feeding the agent established testing principles such as Kent C. Dodds’ guidelines can help align its output with your team’s philosophy on what deserves coverage and what does not.

Bootstrapping Internal Tooling

Internal scripts to do tedious manual work are an ideal niche. A task analyzing code duplication rate before and after a refactor, with results in an Excel table, sounds like hours of work. Using Copilot, a script to detect cross-file code repetition and produce a sorted table ready for Excel was created expeditiously. Then, after the actual refactor, the same agent compared the refreshed numbers and computed the current duplication metrics as separate delta columns.

Modernizing Antiquated Build Systems

A decade-old site depended on SCSS and JavaScript built with requireJS and demands for a legacy Node.js version that refused to run on newer hardware. Modernizing that toolchain manually meant days. Asking ChatGPT directly, "Can you update the JS and SCSS build process to a lean 2025 stack like Vite?" produced a working starter migration in about an hour of iterative prompts. This freed time for the true mission—fixing the site’s broken features —while remaining cautious about validating the resultant compiled output after every change to such an integral piece.

Trimming Communication Manual Labor

Use AI to condense a messy commit list or summarize the diff on your just-finished branch into a clear, succinct message. Prompts can be as direct as "Please sum up my recent changes in concise bullet points." Yet, these tools should be used discerningly for near-final communication; a small dose of human proofreading can prevent machine-generated ambiguities or awkward phrasing from reaching clients or coworkers.

Best Practices For Keeping AI Output Safe

Formulate Sharply, Then Ask Questions

The hidden strength of prompt-based work is that it drives clearer engineering specs. Strong requirements produce stronger code, and AI output merely mirrors that clarity back. To accelerate good requirements gathering, use the trick Ryan Florence, a Remix co-author, recommends: end your first prompt with "Before we start, do you have any questions for me?" The agent’s clarifying follow-ups quickly surface ambiguous words or unclear targets, guiding toward more customized and robust replies.

Commit Early, Often, And Granularly

AI is non-deterministic, which means occasionally it goes sideways and makes unhelpful adjustments to your work. Robust version control practice is therefore doubly essential. Break the AI-aided effort into small chunks, continuously committing them to create revertible checkpoints in case something irreparable breaks. Short, semantic commits benefit both your rollback strategies and your team’s code-review cycle.

Be Ruthless In Self-Review

Once AI delivers code, treat it precisely as you would a pull request from someone less familiar with your system: review every changed line. If you "turn off your brain" and trust blindly, you delegate essential judgment tasks to a tool prone to confident hallucinations. Steering, testing your assumptions, discussing edge cases, and running the software as a real user remain true routes to quality. The more carefully you investigate the tool's output before pushing, the more reliable it becomes as a daily ally.

The Bigger Picture

AI tools relieve developers of excessive clerical overhead and unlock learning within new technology stacks, paving the way for concentrated thinking and broader architectural work. However, agents only produce what their context supports. Insist they declare their reasoning for each code adjustment and independent research when in doubt. And most importantly, continue refining expertise by thoroughly solving the difficult, instinct-guided problems yourself. For novice developers especially, valuable expertise comes from pushing through those frustrating, unglamorous debugging sessions and cultivating flexible engineering judgment. That analytical persistence cannot ever be fully outsourced.