aq.dev / playbooks / which-jobs-to-automate-first-in-a-software-factory

Playbook8 min read

Which jobs should your team automate first in a software factory?

Start with jobs that come up every week, touch little, already have tests that prove them done, and have one person who owns the result: patch-level dependency bumps, lint and type fixes, small labeled bugs with a failing test, flaky-test diagnosis and docs that have drifted from the code. Keep sign-in, billing, migrations and infrastructure human-led until your review records show the factory gets the easy jobs right.

Pick jobs your team does every week that touch few files, have tests or a check that says when the job is done, and have one person who will read the result. Dependency bumps that CI covers, lint and type errors, small labeled bugs with a failing test, flaky-test diagnosis and docs that have drifted from the code usually qualify. Keep authentication, billing, database migrations and infrastructure with people until your records show the factory gets the easy jobs right. Run one job for a week before you add the next.

AQ is where a team turns its first software factory jobs into work items: each one runs in its own branch and worktree, starts from a person, a Linear label, a GitHub event or a schedule, and is reviewed by the team in one place before it merges.

This playbook covers only which jobs go first and how one team runs its first month. For what a software factory is and the tools that run one, start at the software factory overview. The step-by-step setup is in how to build a software factory with Claude Code and Codex, how much autonomy to give is in software factory levels, what to count is in software factory metrics, and which agent and model run each job is in its own playbook.

Score each candidate job

List the jobs your team did by hand in the last month, then score each one from 0 to 2 on six questions. Score from your own tracker and Git history, not from memory.

Question012
Frequency. How often does it come up?A few times a yearMonthlyWeekly or more
Blast radius. What breaks if a bad change merges?Money, sign-in, customer data or production infrastructureOne feature for some usersNothing users see, or one internal tool
Done check. Can a machine say the job is finished?Only a person can judge itTests exist nearby but do not cover this caseA test, build, type check or linter fails before and passes after
Context. How much must the agent know beyond the brief?Unwritten product decisions or historySeveral files and one written conventionThe brief and the files it names
Reviewer. Is there a person who will read it this week?No one owns this areaSomeone, when they have timeA named reviewer with time set aside
Reversibility. How hard is it to undo?Data changed or messages sentA revert plus a redeployA revert of one pull request

The rule: add the six scores, out of 12. Any job with a 0 for blast radius, done check or reversibility stays out of the first month, whatever its total. Of the rest, start with the highest total, and break ties toward the job that comes up most often, because a weekly job gives you a verdict in a month and a monthly one does not.

A worked example with a hypothetical backlog, to show the arithmetic. Scores run in the table's order: frequency, blast radius, done check, context, reviewer, reversibility. These are not results from a real team.

Hypothetical jobScores, in table orderTotalDecision
Patch-level dependency bumps in the web app2 · 2 · 2 · 2 · 1 · 211Start here
Type errors after a strict-mode setting change2 · 2 · 2 · 1 · 2 · 211Start here
Bugs labeled "small" in the issue tracker2 · 1 · 1 · 1 · 2 · 29Week 2, once each bug comes with a failing test
Renaming a column used by three services0 · 0 · 1 · 0 · 1 · 02Human-led
Updating the Stripe webhook handler1 · 0 · 1 · 1 · 2 · 16Human-led: blast radius is 0

The scores are only as honest as the done check. If a job "has tests" but the tests never fail when the code is wrong, score it 1, not 2.

Good first jobs

Each of these tends to score well on the table above. For each one, write down the done check before the first run, and the one question the reviewer must answer before merging.

JobDone checkThe reviewer's question
Patch and minor dependency bumpsInstall, build and the full test suite pass on the bump branchDoes the changelog between the two versions mention anything this code relies on?
Lint and type errorsThe linter or type checker reports zero new errors and the tests still passDid it fix the cause, or silence the warning with an ignore comment or a cast?
Small labeled bugsA test that reproduces the bug fails before the change and passes afterDoes the test describe the bug from the issue, or only the code the agent wrote?
Flaky-test diagnosisA written report: the failing test, how often it failed in N reruns, and the likely causeIs the cause backed by a rerun or a log line, or is it a guess?
Docs driftEvery command and flag in the changed doc runs as writtenDoes the doc now describe what the code does, rather than what the agent assumed?

Start flaky tests as diagnosis only: the agent reruns and reports, and a person decides the fix. An agent asked to "fix" a flaky test can make it pass by loosening the assertion, which hides the problem the test was meant to catch.

Jobs to keep human-led for now

These areas fail the blast radius or reversibility question for most teams. Agents can still help a person here, for example by reading code or drafting a plan, but a person does the change and the review.

  • Authentication and permissions. A wrong check can pass every test and still let the wrong person in. Move it into the factory only after your review records show the reviewer catching real defects in easier jobs.
  • Billing and payments. Mistakes cost customers money and are slow to undo. Tests rarely cover every provider state.
  • Database migrations and data backfills. A revert of the code does not revert the data. Keep these with a person until you have a rehearsal step on a copy of the data.
  • Infrastructure and deploy configuration. A change can take down every service at once, and staging rarely matches production exactly.
  • Large refactors and vague features. There is no machine-checkable done state, and the context lives in people's heads. Write the spec first; a well-specified slice can become a factory job later.

What guards to put around agents once they do touch riskier code (scoped tokens, secrets, plan and review gates, spend limits) is covered in software factory security.

The first month for one team

Start with one team and one repository with good test coverage. Before day one, name three things: who owns intake (writes or approves each brief), who reviews (by name, with time on their calendar), and where a job's record lives (the issue, the pull request or both).

WeekJobs runningWho starts the workWho reviewsMove on when
1Your top-scoring jobThe intake owner, by hand, one task at a timeThe named reviewer reads every change in fullAt least five runs are merged or closed, and each closed one has a written reason
2Add the second jobThe intake ownerSame reviewer; a second person reviews a few changes to compare notesThe first job's merged changes have not been reworked or reverted
3The same two jobsA label, a schedule or an event starts the first job, so nobody has to rememberThe reviewer still reads every change; a reviewer agent from another vendor can read firstWork arrives on its own and the review queue is not growing
4The same two jobsAs in week 3As in week 3Decide, per job, keep, change or stop, using the check below; then pick the next job from the table

Keep the old way of doing each job available all month. If a factory run fails, the person who would have done the job by hand still does it, and the failure goes in the record. Widen to a second team only after a job has run for a full month on the first one.

When the first month stalls

What you seeWhat it usually meansFix
The review queue grows every weekAgents produce changes faster than one reviewer reads themRun fewer tasks at once, or add a second named reviewer; never merge unread work to clear the queue
Merged changes come back for reworkThe done check passes on incomplete workTighten the check (add the missing test case) before running the job again
Tasks sit with no one starting or reviewing themNobody owns the lineName one intake owner and one reviewer per job, in writing
The same correction is made by hand in several changesThe brief or the repository instructions miss a ruleAdd the rule to the brief template or the agent instructions file, then rerun one task to confirm
Only trivial tasks are sent to the factoryPeople do not trust it with the job as scopedScore the job again; either fix what scored low or pick a different job

To track these over time with formulas for rework, revert rate and cost per merged change, use software factory metrics.

Check your choice: one job, five runs

Before you commit to a job, run it five times on real tasks and record each outcome. Five runs will not prove a rate, but they show whether the job is worth a month.

  1. Write the brief template and the done check for the job.
  2. Run it on five separate tasks, each in its own branch, by the method you plan to use for the month.
  3. For each run, record: merged as is, merged after review changes, closed without merging, and later reverted or reworked (check again after two weeks).
  4. Note how long the reviewer spent on each one.
  5. Decide. Keep the job if most runs merged and none were reverted. Change the brief or the done check if runs failed the same way twice. Stop if review took longer than doing the job by hand, or any run was reverted for a reason the done check should have caught.

We ran this check on a toy job on November 23, 2026: a small bug in a ten-line JavaScript function, given to Claude Code in print mode with the issue text as the brief and a test suite as the done check, five times on fresh copies of the repository. All five runs passed every test in about ten seconds each, and none touched the test file. They did not write the same function: three dropped punctuation and joined words with hyphens, two turned every run of other characters into one hyphen. The two versions give different slugs for inputs the tests never tried, such as "a_b" ("ab" in one, "a-b" in the other) or a title with accented letters. A done check that passes five times still leaves the reviewer's question open: which behavior did the issue ask for? A run this small proves nothing about your codebase; it shows what the record looks like.

Where AQ fits

AQ is where teams put AI agents to work on everything they do: code that lands as a reviewed pull request, bots that run the jobs that repeat, and an assistant that starts each day, all on the agents and subscriptions they already have, like Claude Code and Codex, on private cloud machines of their own or on their own Mac.

  • Each job as a work item. Every task gets a work item with its own branch and git worktree on a machine the team controls, so five runs of a job never collide.
  • Intake without anyone remembering. A bot's routine can start work on a schedule, when a Linear issue gets a label, or on a new issue, pull request, push or release on a connected GitHub repository (bots and routines). Linear's ai-task label creates a work item through a teammate's connected Linear account (Linear integration).
  • A plan to approve. In a crew with the plan gate on, the Lead proposes its steps and no role that can edit code starts until you approve (crews and roles).
  • Review on another vendor. When Auto chooses the reviewer, it prefers another vendor and account than the builder's.
  • One place to review and merge. The Changes panel shows the diff and line comments, and merging from AQ is refused while checks are pending or failing or the review is older than the latest commit (changes, review and merge).

Bots, work items and crews are on every plan: the Free plan runs agents on your own Mac, and the AQ Pro plan adds cloud machines and shared workspaces for the team. AQ runs its own website this way; the details are in how AQ runs its website as a software factory.

Frequently asked questions

What should a software factory automate first?

Jobs that come up every week, touch few files, have a test or check that says when they are done, and have a named reviewer: patch-level dependency bumps, lint and type fixes, small labeled bugs with a failing test, flaky-test diagnosis and docs drift. Score your own candidates on frequency, blast radius, done check, context, reviewer and reversibility, and leave out any job with a 0 on blast radius, done check or reversibility.

How long does a software factory rollout take?

For one team and two jobs, plan on a month: one job in week 1, a second in week 2, automatic intake in week 3 and a keep, change or stop decision per job in week 4. Widening to more teams and riskier areas depends on what those records show, so it has no fixed date.

Should we start with one team or the whole organization?

One team, one repository with good tests and one or two jobs. A month on one team gives you a brief template, a done check and a reviewer routine that the next team can copy. Starting everywhere at once spreads the review load across people who have not agreed on what a good change looks like.

Does a software factory replace CI/CD?

No. The factory feeds your existing pipeline: agents open changes, and your CI, branch protection and required reviews decide whether they merge and deploy. A factory with weak CI produces more broken pull requests, faster.

What if the team is not ready?

Use the scoring table to find out why. If no job scores 2 on done check, the first project is tests for one area. If no job scores 2 on reviewer, the first step is naming one. Agents can help write those tests, with a person reviewing them, before any job goes into the factory.