# Our codebase fixes itself now

A customer asked for a feature in Slack and a tested PR showed up 32 minutes later. What happened in between, and the Replicas features that made it work: silent triage, Linear routing to Motherships, self-testing ships and closing the loop.

- Author: Saai Arora
- Published: 2026-11-10
- Category: Best practices
- Canonical: https://replicas.dev/blog/our-codebase-fixes-itself

when i joined replicas about 6 months ago, i ran an experiment where we [gave replicas our entire backlog](/blog/we-gave-replicas-our-entire-backlog). half of it came back mergeable on the first try, but every PR still went through me. i had to triage the tickets, write the briefs, start the agents, and decide what was ready.

we've been chipping away at that since, and now customer requests go all the way through without me starting anything.

at 1:59 pm, branavan from moda asked this in our shared slack channel:

<img src="/blog/self-maintaining-ask.png" alt="Branavan Jegatheeswaran in #replicas-moda at 1:59 PM: can i get the ability to convert regular workspaces into motherships?" />

at 2:32 pm there was a PR for it, tested on web and ios, with screenshots. at 3:47 pm it was merged. at 3:58 pm i got a DM telling me to go let him know.

i touched it twice. once to merge, once to reply to branavan. here's everything that happened in between.

## the ticket files itself

an agent watches every shared customer channel. when someone reports a bug or asks for something, it reads the thread, files a linear ticket with a title, priority, cycle, labels and owner, and posts a note back to us. nobody has to notice the message or decide whose it is.

branavan's message became REP-1393 a minute later.

<img src="/blog/self-maintaining-triage.png" alt="Replicas posts in Slack: Customer report from #replicas-moda: REP-1393 Allow converting a regular workspace into a Mothership (Low, Cycle 55), assigned to Saai Arora" />

this also fixes what went wrong most in that backlog experiment: bad briefs. the ticket comes with the request, what's expected, what happens today, who asked, and a link back to the thread.

## labels decide where it goes

a [mothership](https://docs.replicas.dev/features/workspaces/motherships) is a workspace that owns one area of the product. it doesn't write code itself. it reads each ticket, decides what it needs, and hands the work to ships, which are workspaces with their own sandboxes.

motherships can subscribe to [linear](https://docs.replicas.dev/features/linear) by team, cycle, label and assignee. mine takes REP tickets labelled mothership and assigned to me, so REP-1393 went straight there.

19 seconds later it had decided the ticket needed code, started a ship called `convert-to-mothership`, and written down what it would build and how it would test it.

<img src="/blog/self-maintaining-pickup.png" alt="The Mothership receives REP-1393 from its Linear rule and starts the convert-to-mothership ship" />

## the ship tests its own work

the ship built the feature across the web app, the mobile app, the api and the docs. then it tested it the way i would have: it converted a real workspace on a local copy of our stack, had the new mothership start a ship of its own, checked the cases that should be refused, and ran the mobile flow on an ios simulator through [limrun](https://limrun.com).

the screenshots went on the PR.

<img src="/blog/self-maintaining-pr.png" alt="PR #6882, merged, with the agent's screenshots of the new Make Mothership menu" />

a PR isn't done when it's opened. agent checks run on every commit, [greptile](https://www.greptile.com) reviews it, and anything they flag gets fixed in the same workspace. the mothership only told me about it once it was actually ready.

so i didn't read the 183 lines. i looked at the screenshots, approved, and merged.

## the customer hears back

the part that always slipped was telling the customer. we now have an [automation](https://docs.replicas.dev/features/automations) that runs when a customer ticket moves to done. it finds the original slack thread and DMs me the PR and a link to it.

<img src="/blog/self-maintaining-dm.png" alt="Replicas DM: REP-1393 is done, here is PR 6882, let the customer know in #replicas-moda, with Branavan's original message attached" />

it didn't work the first time. the automation ran a second after the ticket closed but never sent the DM, because the triage agent had attached the slack thread in a link format the automation didn't recognise. i asked an agent why, and a couple of minutes later it had found the cause, sent the DM, and updated the automation to handle both formats.

which is kind of the point. the setup broke, and an agent fixed it too.

## what's still mine

| time | what happened | who |
|---|---|---|
| 1:59 pm | branavan asks in slack | customer |
| 2:00 pm | ticket filed and routed | agent |
| 2:00 pm | ship started with a plan | mothership |
| 2:32 pm | PR opened with screenshots | ship |
| 3:47 pm | merged | me |
| 3:58 pm | branavan told | me |

the two steps left are deciding a change is good enough to ship, and talking to the customer. i'm not in a rush to hand either of those off.

everything else, i'd rather never do again.

