Noetic SuiteSign in

Coding with AI without breaking your project

AI coding assistants can write a working function in seconds, explain an error you have stared at for an hour, and draft the tests you would otherwise put off. They can also change files you never mentioned, delete a check that mattered, or call a function that does not exist, all in code that looks perfectly reasonable.

The habits below keep the speed and limit the damage. They apply whether you paste code into a chat, use an assistant built into your editor, or let an agent edit files on its own.

Before you start: make every change reversible

Put the project under version control before an assistant touches it. Git is the usual choice. Then:

  1. Commit a clean, working state, so that you always have something to go back to.
  2. Make a branch for the work you are about to do.
  3. Check that you can run the project and its tests from the command line.
  4. Learn the command that throws away uncommitted changes to a file, and the one that undoes a commit. You will use both.

With that in place, a bad suggestion costs you a minute, not an afternoon.

Give it the context a new teammate would need

The assistant sees only what you give it, plus whatever files its tool reads for you. Useful context includes:

Work in small steps

"Add user accounts" is not one change. It is a data model, a sign-up form, password hashing, sessions, emails and tests. Ask for all of it at once and an assistant will produce hundreds of lines that you cannot review properly.

Ask for one small, testable step at a time, and give each step the same loop:

  1. Ask for the change.
  2. Read the diff.
  3. Run the tests, and try the feature yourself.
  4. Commit, with a message that says what changed.
  5. Move on to the next step.

Small commits also make it easy to find which step broke something later on.

Read every diff

Never accept code you have not read. You do not need to understand every line at once, but you should look for these:

If you do not understand part of a change, ask the assistant to explain it line by line. If the explanation does not hold up, undo the change.

Let tests do the checking

Tests turn "looks right" into "works". This pattern is reliable for bugs:

  1. Ask for a test that reproduces the bug.
  2. Run it and watch it fail. A test that passes before the fix proves nothing.
  3. Ask for the smallest change that makes it pass.
  4. Run the whole test suite, not only the new test.

Be wary when an assistant "fixes" a failing test by changing what the test expects. Sometimes the old expectation was wrong; often the code is. Decide which, yourself.

A worked example

A shop's checkout shows a price of $10.50 as "$10.5". You paste the formatting function, an example input and the wrong output, and ask for a test that shows the bug. The test fails, as it should.

You ask for the smallest fix. The diff should be a line or two inside that one function: formatting to two decimal places, or using the language's own currency formatting. If the diff also changes how prices are rounded somewhere else, ask why before you accept it. Then you run every test, try a few prices by hand (including zero and a very large amount), and commit.

Check every package before you install it

Assistants sometimes suggest packages that do not exist, or names that are one letter away from a popular package. Attackers know this, and publish harmful packages under names that models tend to invent. Before you install anything new:

Keep secrets out

Do not paste API keys, passwords, customer data or private configuration into an assistant. Use placeholders and sample data instead. Keeping your data private when using AI covers what to strip out and why.

Take extra care with security-sensitive code that an assistant writes: sign-in and permissions, anything that builds database queries or file paths from what a user typed, and anything that handles payments. Ask specifically what could go wrong, and run your linter and any security scanner you have.

Know when to stop

Stop asking and start thinking for yourself when:

Go back to the last good commit, read the problem again, and either break it into a smaller step or solve that part yourself. An assistant's confident explanation of code you do not understand is not the same as code you understand. How to check AI answers and their sources applies to explanations of code too.

When the assistant can run commands

Agent-style tools can edit many files, run commands and install software without asking each time. They are powerful, and they need firmer boundaries: a dedicated folder, your approval before anything that cannot be undone, and an easy way back. Letting an AI agent act for you, safely explains how to set those up.

Where Noetic Suite fits

In the Noetic Suite desktop app, Noetic works on a folder on your own computer, with the files, the changes, a terminal and a preview beside the conversation, and a restore point that undoes a whole build in one click. It also works with the coding agents you may already use. See the features page and the download page.

All guides

Get help

Noetic Suite · part of S&NS · United States