N° 01 | Case study · AI and automation
Merges that resolve themselves.
Branch merge automation used to hard-stop on every conflict, pulling an engineer off their work for hours. I designed and built an AI layer that resolves the conflict, checks its own work, and only asks a human when it isn't sure.
- Context
- Developer platform for a large enterprise codebase
- Year
- 2025
- My role
- Designed and built end to end
- Stack
- Python · Git · CI pipelines · AI
- To unblock a conflicted merge
- Minutes
- Of manual resolution, before
- Hours
- Developers pulled off their work by default
- 0
A merge conflict stopped the line, and pulled a developer off their work.
The team’s merge automation keeps branches in sync. When a merge goes through cleanly, nobody notices.
When it hits a conflict, the automation hard-stops. Someone has to put their own work aside, understand both sides of the change and resolve it by hand. That takes hours, and the branches keep drifting while it waits.
The approach
(02) Three principlesContext before code
The AI is given the context of the merge it is handling, so it resolves with intent instead of guessing.
Trust, then verify
Every AI resolution passes automated checks before it becomes a change request, then the same validation as any human change.
Humans for the hard ones
When it isn’t sure, it hands the merge to a developer with the context attached instead of forcing a guess.
How it works
(03) The flow- 01 · Merge
Regular git merge
The existing automation runs as before. If it merges cleanly, nothing changes.
- Git
- CI
- 02 · Context
Gather the context
On conflict, the job gathers what the AI needs to understand the change.
- Python
- Context
- 03 · Resolve
AI resolution
An AI coding assistant resolves the conflicting code using that context.
- AI
- 04 · Verify
Automated checks
Checks decide whether the result is good enough to move forward.
- Checks
- 05 · Ship
Change request
A normal change request goes through regular validation. Anything uncertain goes to a developer instead.
- Code review
- Validation
Every stage designed and built by me · plugs into the existing merge automation, nothing replaced
Problems I solved
(04) Field log- P.01● Hardest
Proving that AI-resolved code is production-grade.
The hardest part. Most of the work went into testing resolutions and working out which checks actually catch a bad merge, so AI output only moves forward once it passes them.
- P.02
Giving the AI enough context to make the right call.
A conflict means different things depending on the merge. The AI is given the context it needs to know which side should win and why.
- P.03
Knowing when not to trust it.
When a resolution looks uncertain, the merge goes to a developer for review instead of shipping a guess.
- P.04
Fitting in without changing how people work.
The output is an ordinary change request that goes through regular validation, so reviewers and pipelines treat it like any other change.
Time to unblock
(05) Before and afterIllustrative, not to scale · uncertain merges still go to a developer
What I learned
(06) TakeawaysPutting AI into a production pipeline is less about the model and more about everything around it.
Verification is the product
The AI step was quick to build. The checks that make its output trustworthy are where the real engineering went.
Context beats cleverness
Giving the AI the right context improved results more than any prompt wording.
Escalation is a feature
A system that knows when to ask for help is one people are willing to rely on.