OMAR
Field NotesCV
Aider: AI Pair Programming That Commits
← All Notes
AI Engineering16 June 2026 · 4 min read

Aider: AI Pair Programming That Commits

It edits your repo and writes the commit message. Which is either exactly what you want or a very good reason to work on a branch.

Most AI coding tools show you a suggestion and let you paste it. Aider skips that step: it edits the files in your repository and writes the commit.

That is either exactly what you want or a very good argument for working on a branch. Usually both.

How it works

You run it in a repo, tell it which files are in scope, and describe the change:

aider src/api/booking.js src/schemas/booking.js
> add an idempotency key to the create-booking endpoint

It reads the files, makes the edit, and commits with a message describing what it did. Because every change is a commit, git diff and git reset are your review tools — which is a much better safety model than a chat window you have to copy out of.

What makes it good

Git is the undo button. No special history, no proprietary checkpoint format. If a change is wrong, you already know how to revert it.

Scope is explicit. You choose which files it can touch. Narrow scope produces better edits and prevents the sprawling refactor nobody asked for.

It works across files. Renaming a field in a schema and updating every call site is exactly the sort of mechanical change worth delegating.

Model-agnostic. Cloud model for hard work, local model for routine edits, your choice.

How I actually use it

Mechanical refactors, adding a field through a stack, writing the first version of tests, and porting a pattern from one module to five others.

Not for architecture. Deciding what to build is the part where the value is, and handing that to a tool because it types faster is how you end up with a well-implemented wrong thing.

The catch

Always work on a branch. This is not optional advice. A tool that commits autonomously against main will eventually commit something you did not intend.

Read the diff before you push. Every time. The commit message describes the intent, not necessarily the result.

Watch the context cost. Adding twenty files to scope sends twenty files with every request. Keep scope tight for cost as much as for quality.

Tests are the real safety net. A change that compiles is not a change that works, and an AI-authored refactor is exactly the situation a test suite exists for.

Resources

AIOpen Sourceaider

Need this built properly?

I build secure, fast, bilingual platforms for clients across Egypt, Saudi Arabia, the UAE and Kuwait.

Keep Reading