Dashboard

Let a Non-Developer Use an AI Coding Agent Safely

How to let a non-developer use an AI coding agent safely: plan mode by default, deny rules that hold in every mode, and a branch they cannot break.

Steve Jefferson
Steve Jefferson
Developer Advocate
13 October 20261 min read

Letting a non-developer use an AI coding agent safely works better than most engineers expect, and it fails in one specific way: the agent asks to do something consequential, the person has no basis to judge it, and they approve. The fix is not training them to judge. It is a setup where the consequential actions are not on the menu.

Build that out of deny rules and a read-only default rather than out of trust. Both are configuration, both are checked in, and neither depends on anyone reading a prompt carefully at 6pm.

Start in plan mode, not in edit mode

The first setting is what the agent does by default. Claude Code documents a set of permission modes, and plan mode is the one that fits a non-developer, because the agent explores and reads but does not edit source files. The permission modes documentation describes making it the project default by setting defaultMode to plan in .claude/settings.json.

json
{
  "permissions": {
    "defaultMode": "plan"
  }
}

The behaviour this produces is the behaviour you want for a first month: the agent proposes, the person reads the proposal, and nothing changes on disk until someone says so. It also gives the person a readable artefact to bring to an engineer, which is a better handoff than a changed branch nobody expected. How to read one of those plans is covered in reviewing an AI agent plan before it runs.

Write the deny list before the allow list

The permissions system evaluates rules in a fixed order. The permissions documentation describes evaluation as deny, then ask, then allow, with the first match winning, and notes that deny rules hold in every mode, including bypassPermissions. That last property is what makes a deny list worth writing: it survives someone turning off the prompts.

A starting deny list for a non-developer's project, in plain terms:

  • Anything that talks to production, including the production database URL and deploy commands

  • Anything that reads credentials, such as .env files and key directories

  • Anything destructive at the filesystem level

  • Anything that publishes, including package registry commands and force pushes

Keep it readable. A deny list nobody understands gets deleted the first time it blocks something legitimate.

There are two documented details worth knowing before you commit the file. Project and local settings cannot set defaultMode to auto or bypassPermissions, so those have to come from user or managed settings or the command line, which is helpful: a checked-in file cannot quietly disable the guardrails. And committed allow rules only take effect once a teammate trusts the folder, while deny and ask rules apply immediately. The protective half of your configuration works on first run, and the convenience half waits. That is the right way round.

Give the agent a safe place to work

Permissions stop actions. They do not give anyone a way to undo a bad one. Three structural pieces do that:

  1. A branch per task, never the main branch. Branch protection on the default branch means the worst case is an abandoned branch rather than a reverted main.

  2. A development database with fake data, with the production connection string absent from the environment rather than merely denied.

  3. A preview deployment per branch, so the person can see their change in a browser without anyone running a deploy command.

Point three matters more than it sounds. Most requests to do something risky come from wanting to see the result. Give a safe way to see the result and the requests stop.

Terminal access is the piece people get wrong most often, usually by granting all of it or none. The middle setting is covered in giving an AI coding agent safe terminal access, and the production database question has its own answer in keeping an agent away from production.

Teach three habits, not a curriculum

A non-developer does not need to learn git. They need three habits.

Ask for one thing at a time

"Change the heading on the pricing page to X" produces a reviewable diff. "Make the pricing page better" produces fifteen files. The scope of the request determines the scope of the diff more than any setting does.

Say what the result should look like, not how to build it

Non-developers are usually better at this than engineers, because they describe the outcome rather than the implementation. Encourage it.

Stop when surprised

The single most useful rule: if the agent starts doing something that was not asked for, stop it and ask an engineer. Not approve it, not refuse it quietly, stop and ask. Surprise is the signal.

What the engineer on the other side owes them

This setup fails if the review burden lands on nobody. Someone technical has to look at the branch before it merges, and that review should be quick because the diffs are small and the tests are green.

Which means the preconditions are on the engineer's side: a test suite that runs in one command and fails honestly, and a pipeline that runs it on every branch. Building a test suite an agent can run covers the first part. Without it, the person doing the review has only the agent's own account of its work, which is the least reliable input available.

Set up a short feedback loop too. A ten-minute look at the week's branches, with one comment about what to ask differently, turns the whole thing into a skill rather than a gamble.

The settings that let a non-developer use an AI coding agent safely

json
{
  "permissions": {
    "defaultMode": "plan",
    "deny": [
      "Bash(git push --force:*)",
      "Bash(npm publish:*)",
      "Read(./.env*)",
      "Read(./secrets/**)"
    ],
    "ask": [
      "Bash(git push:*)"
    ]
  }
}

Treat that as a shape rather than a recipe, since the right entries depend on your stack and your tooling. The principle it encodes is the part that transfers: default to proposing, deny the irreversible, ask for the rest, and make the safe path the easy one.

For choosing the agent itself, the guide to picking an AI coding tool compares the options, and using git with an AI coding agent covers the version control habits that make any of this recoverable.

How did this land?

About the author

Steve Jefferson
Steve Jefferson

Developer Advocate

Steve builds something with Swarmz every week and writes up what worked, what broke, and what he'd do differently. Tutorials and hands-on guides are his lane.

Share

Get the next post in your inbox

One email a month. Product updates, engineering posts, and the best of Built with Swarmz.

I agree to receive emails about AI building tips and Swarmz product news. Unsubscribe any time.