R&D
Sovereign AI for R&D

Hand it a bug, get back a mergeable fix.

Engineering time is best spent on architecture and product judgment, not chasing repetitive bugs and code-review queues. The R&D avatar runs against your own repo and Karma Box, reading and writing code without it ever leaving that machine — writing a failing test before touching the fix, with merges always waiting for your nod.

// pipeline.log

A bug isn't really fixed until it's walked through all five steps

The R&D avatar never skips the process to jump to a fix — it walks the full chain in a fixed order. Skip any one step, and a fix can be wrong while still looking right.

STEP/05
01

Locate the root cause

Works against the current codebase, never from a half-remembered API in its training data — pinpoints the exact file and line, not a vague "probably here."

STEP/05
02

Write a failing test

Writes a test that reproduces the bug first, proving it's real before touching any code — red comes before any talk of green.

STEP/05
03

Change the smallest possible surface

- const spec = item.specs[0];+ const spec = item.specs.find(s => s.id === choice.specId);

Touches only the one necessary line of logic, no drive-by refactors of unrelated code — keeps the risk of introducing something new as low as possible.

STEP/05
04

Turn the test green

The fix must actually pass, not just get a verbal "should be fixed now" — the new cases include one negative regression test, built specifically to catch the same bug coming back in a different shape.

STEP/05
05

A human signs off

The merge request waits for review — who approves it, whether the diff stayed in scope — this step always stays with a person. The avatar never has permission to merge to main directly.

R&D avatar locating a bug and writing a test
Locate & reproduce

Write a failing test first, then touch the fix

The avatar works against the current codebase, never from a half-remembered API. Before any change, it writes a failing test that reproduces the bug; after the change, the test must actually turn green — not just get a verbal "should be fixed now."

Real case · MR #142, 3 new tests including 1 negative regression case
A merge request waiting for human review
The gate before merge

Every merge request gets reviewed like a colleague's PR

Permissions split into two tiers from day one: opening a merge request is always allowed, merging directly to main never is. Who approves it, whether the diff stayed in scope, whether the new test actually covers the original bug — these calls always stay with a person.

Local loop · Reading and writing code never leaves the engineer's own Karma Box

Configurations real teams are running

Pulled from real run logs, not a demo script. Click through for the full record, screenshots, and outcome.

From "whenever there's time" to same-day turnaround
Standard Workflow6-person team · Mini-program

From "whenever there's time" to same-day turnaround

A 6-person mini-program team's first week: connect the R&D Factory to the repo, set permissions to "merge-request authoring only," assign 11 low-priority bugs that had sat untouched for a month. Week one: 9 merge requests came back, 7 passed on the first try.

Tech lead handling it piecemeal all day→20 fixed minutes of review a day
Read the full case →
Pay down six months of test debt before shipping anything new
Test Coverage4-person startup · SaaS backend

Pay down six months of test debt before shipping anything new

A 4-person SaaS team's core-module test coverage had been stuck at 31% for months — nobody had time to fix it. Tasked the avatar with "tests only, no logic changes": 42 legacy modules in two weeks, coverage up to 78%, and 3 real edge-case bugs surfaced along the way that nothing had covered before.

31% coverage→78% after two weeks
Read the full case →
Alert fires at 2am — the avatar locates it, a human decides whether to roll back
Incident ResponseTriggered 2:14am

Alert fires at 2am — the avatar locates it, a human decides whether to roll back

A production latency spike — the avatar located the cause within 6 minutes: a cache-invalidation bug from the previous release. It presented two options, rollback or hotfix, each with its own risk, and the on-call engineer confirmed before anything executed. Fully traceable end to end.

Manual triage: 40+ min→6 min to root cause
Read the full case →

Not just a good feature — control genuinely stays in your hands

Merging and shipping always wait for my nod — what it hands back is a mergeable fix, not a suggestion.
Tech lead, 6-person mini-program teamR&D
9 merge requests, 7 passed first try
The most common mistake is treating "tests pass" as proof the fix is correct — we now also check the negative-case ratio.
The same teamWeek 2 of adoption
Rework cases fed back in as reference
Treating it as a replacement for code review is wrong — it accelerates the prep work before review, but a person still makes the final call.
The same teamWeek 4 of adoption
20 min/day of review time

Frequently asked questions

How large a change can it handle?+

Start with small, independently verifiable changes — a single-file bug fix, a local refactor, filling in missing test coverage. Changes that cross multiple modules or involve architectural decisions should be broken into smaller tasks by a person before being assigned.

Does code leave the machine?+

The R&D Factory can run entirely on your own Karma Box — reading and writing code never leaves that machine. Whether to route non-sensitive steps through a cloud model is your call.

If a fix turns out wrong, how do you trace and roll it back?+

Every merge request carries a full change record and its corresponding test results, so you can pinpoint exactly which merge introduced a problem — it goes through the same version control and rollback process as any human-authored commit, with no special-cased shortcut.

Will it write meaningless tests just to pad the coverage number?+

The team set a hard requirement: at least 30% negative cases, and every test needs a one-line comment stating what it guards against. Tests that only assert "the function was called," with no meaningful check, get rejected outright.

What about existing flaky tests — does it fix those too?+

Fixing existing tests was out of scope for this task — it only added new coverage. The team later ran a separate pass scoped to "fix flaky tests only, add nothing new," using the same test-files-only permission setup.

Does it have permission to roll back on its own?+

No. The avatar can only locate the problem and propose options — any action that touches production (rollback, hotfix, service restart) requires explicit confirmation from the on-call engineer first. This is the same principle as "merges and releases always ask before acting."

What if the avatar's root-cause call is wrong — could it mislead the decision?+

Every conclusion it gives comes with verifiable evidence attached (commit, logs, the overlapping-curve screenshot) — the engineer is checking that evidence before deciding, not just taking a bare conclusion on faith. The evidence and the conclusion are both kept on record, so the reasoning can be re-examined afterward too.

Hand your code-review bottleneck to an avatar that actually runs tests first

Open a browser and build your first avatar — no install, and your data never leaves your control.

Start free →