Kailash H.

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
(01) The problem

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 principles
  • Context 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
  1. 01 · Merge

    Regular git merge

    The existing automation runs as before. If it merges cleanly, nothing changes.

    • Git
    • CI
  2. 02 · Context

    Gather the context

    On conflict, the job gathers what the AI needs to understand the change.

    • Python
    • Context
  3. 03 · Resolve

    AI resolution

    An AI coding assistant resolves the conflicting code using that context.

    • AI
  4. 04 · Verify

    Automated checks

    Checks decide whether the result is good enough to move forward.

    • Checks
  5. 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
  1. 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.

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

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

  4. 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 after
Before
Hours
  • Conflict · automation stops
  • Waiting for a developer
  • Manual resolution
  • Review
After
Minutes
  • Conflict
  • AI resolves
  • Checks
  • Review

Illustrative, not to scale · uncertain merges still go to a developer

What I learned

(06) Takeaways

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

(07) Ownership

Designed and built end to end by me, as part of a developer platform team. Conflicted merges now unblock in minutes instead of the hours a developer used to spend on them.