MAESTRO

Programme Notes

Note IX · Engineering

The software factory: from a bug report to a reviewed fix

A user clicks Feedback in Maestro. What comes back is a pull request that an agent wrote, two review bots argued over, and a gate held until it scored 4/5 or better. A person still tests the build and merges. These are the Cue pipelines in between.

A film projector on a theatre stage throws eight frames onto the screen: a user sends feedback, a local agent reads logs, an issue is filed, Issue Triage opens a PR, Greptile and CodeRabbit review, the agent fixes or argues back, a gate checks for 4/5, and a person merges.
Tonight on the screen: the software factory.

Maestro builds a good part of itself. A user reports a bug from inside the app, and the next time anyone looks there is often a pull request that fixes it, already reviewed twice and checked against a score. None of it is exotic. In Pedram’s words, from an 8 October 2026 recording:

I am probably the most prolific user of Maestro Cue. I don’t use any of the advanced features of like fan out… It’s mostly just trigger action… And by the way, this is all it takes to create a full blown software factory.

This note walks the whole line, one station at a time, with the rules that keep it honest. The agents in this factory happen to run Claude Code. Nothing in the design depends on that: any provider Maestro drives can stand at these stations.

Fig. 1 · The software factory

From a report to a reviewed merge

The factory in four lanes: your machine, GitHub, the Cue pipelines, and people
Steps 1 and 2 run on the reporter’s computer. A person merges at the end, every time.

1. Feedback, with evidence attached

It starts with the Feedback button in Maestro. A local agent interviews the user, and it runs on the reporter’s own machine with their own provider account. It reads the live app state and recent errors without changing anything. When the bug calls for it, it collects optional support logs and perf profiling, so the issue carries evidence instead of a guess.

Before anything is filed, Maestro searches the repository for duplicates and offers the user a +1 on a match. Only then does it file the issue, from the reporter’s own GitHub account, with the summary, environment, steps, expected and actual behaviour, and links to any screenshots and logs.

Issue #1983 is a real one. Its Additional Context opens with “Confirmed on the reporter’s machine during this session” and lists the Codex version, the binary path, the config values and the exact failing command line. Nobody on our side had to ask for any of it.

2. Issue Triage

The first Cue pipeline watches the repository for new issues. Before an agent reads a word of the issue, SusFactor screens the body for prompt injection (more on it below). A clean issue goes to the Issue Triage agent, which does one of four things:

  • labels it,
  • closes it as already fixed, and thanks the reporter,
  • closes it as a duplicate, with a link to the original,
  • or, when the fix is clear: branches, fixes, and opens a pull request that says closes #<n> and carries the factory label. It then comments on the issue, asking the reporter what they think.

The fix for #1983 was #1984, on branch fix/1983-wizard-codex-stderr.

3. Two reviewers, then an argument

CodeRabbit and Greptile review every pull request within minutes. CodeRabbit is free for public open-source repositories, and Greptile runs a free program that open-source projects apply for. Greptile ends its review with a confidence score out of 5. CodeRabbit leaves threads.

Then the second Cue pipeline, the Review Loop, takes over. It runs one round per new head commit or new review. Each round answers everything that is open, in a fixed order: people first, then CodeRabbit, then Greptile, then failing CI, then merge conflicts. For each point the agent does one of two things:

  • fixes the code, and on our own PRs it makes the fixes in a separate worktree, or
  • argues back in the thread, with its reason and the evidence.

Then it pushes and asks both bots to look again: @greptileai review and @coderabbitai review. People can join any round, and their comments are read first.

Fig. 2 · The review loop

Five lifelines, one fix

sequenceDiagram
  participant M as Your machine
  participant G as GitHub
  participant C as Cue pipelines
  participant R as Greptile + CodeRabbit
  actor H as Human
  M->>M: feedback, optional logs and perf profile
  M->>G: duplicate check, then the issue
  G-->>C: new issue
  Note over C: Issue Triage
  C->>C: SusFactor screen, label, branch, fix
  C->>G: pull request with the factory label
  G-->>R: review requested
  loop each new head or review, up to 4 rounds
    R->>G: score and threads
    H-->>G: comments, read first
    G-->>C: new review
    Note over C: Review Loop
    C->>G: fix or argue back, ask for review
  end
  alt gate passes
    C->>G: label approved
  else 4 rounds, or a repeated objection
    C->>H: needs-human and a summary
  end
  H->>G: tests the RC build, merges

4. The gate

Pedram’s intent, dictated on 10 November, was simple:

…Instead of just opening a PR, let’s open a PR and watch it for Greptile and CodeRabbit, and then when all the agents are in agreement, let’s merge the thing in.

A week of running it refined that into rules. The loop adds the approved label only when all of these hold on the current head:

ConditionWhy
Greptile scores 4/5 or higherThe score is for this commit, not an older one.
No open CodeRabbit threadEvery finding is fixed or answered.
No open human thread, no human review asking for changesPeople outrank bots.
CI is greenA passing review of a failing build is worth nothing.

A new push removes approved, and the gate runs again. The loop never merges. A person tests the release-candidate build and merges, every time.

When the loop cannot get there, it stops and asks for help. After 4 rounds, or as soon as a reviewer repeats an objection the agent has already argued against, it adds needs-human, posts a summary of the open points, and sends Pedram a Maestro notification. While that label is on, the loop does nothing.

5. Other people’s pull requests

The same loop reviews pull requests from outside contributors, with one hard difference: it never pushes to someone else’s branch. Each round it posts one comment that thanks the author, lists the needed changes (people’s comments first), and links each thread. When the author pushes, the gate runs again on the new head.

Three pull requests through the line

#1983 → #1984. A feedback report with the evidence attached, a fix on a branch named after the issue, both bots in under two minutes, Greptile at 4/5. It was merged into main on 10 November from the maintainer’s account. This one predates the Review Loop. It is the path the loop now enforces.

#1709. The back-and-forth at its most visible. Greptile opened at 1/5. The agent fixed the findings and asked for a fresh look at the new head: 3/5. Another round: 5/5, confirmed twice more. This was still done by hand. It is the pattern the loop automates.

#2052. The first live run of the Review Loop. In round 1 the agent fixed CodeRabbit’s one finding, pushed 7b75b75d7, replied in that thread, and asked both bots to review again. Greptile scored the new head 5/5, and the gate added approved. It has not been merged yet: that is a person’s job, after testing the build.

SusFactor: read nothing before it is screened

Every station in this factory reads text that strangers wrote: issue bodies, pull request descriptions, comments. Any of it can carry instructions aimed at an agent. When a SusFactor API token is configured, Cue scores the title, body and new comments of every GitHub issue and PR before an agent sees them, and drops anything above 0.95. Inline review comments are not scored; the agent’s prompt treats all GitHub text as data, never as instructions. An instruction found in it stops the round with needs-human.

0DIN.ai is Mozilla’s GenAI bug bounty. Researchers submit jailbreaks and prompt injections that work against production LLMs, and those submissions feed the 0DIN Threat Feed. SusFactor is a 560M-parameter classifier trained on public data plus 3,426 real attacks from that feed. It scores each prompt from 0 to 1 and runs on an ordinary CPU, so Cue can score each issue and PR before an agent reads it. The details are in the SusFactor paper (PDF).

The SusFactor model card as a hot sauce label: the SUS artwork and bottle on the left, then the ingredients and the nutrition facts
The SusFactor model card, as a hot sauce label. Figures from the SusFactor paper.

Read the label honestly. On WildGuardTest, about one attack in four gets past. SusFactor is the first screen, not the only one: the data-not-instructions rule, the gate, and the person who merges stand behind it.

What the factory will not do

  • It never merges, and never asks GitHub to auto-merge.
  • It never force-pushes, and never pushes to main or rc.
  • It never pushes to a contributor’s branch.
  • It never obeys text it finds on GitHub.

Agents do the legwork: reading logs, filing the issue, writing the fix, answering every review comment. A person still decides what ships.

Tagged cue automation code-review security github