How to Set Up an Autonomous Software Factory in One Repository
Design a ticket-to-pull-request pipeline with clear task eligibility, isolated workspaces, independent CI, and a reviewable handoff.
Written for: Engineering managers and platform leads setting up their first agent-assisted delivery workflow.
Illustrative design
From approved task to evidence for review
- Scope the ticket
- Isolate the workspace
- Run independent checks
- Review the draft
An autonomous software factory is a repeatable path from an approved engineering task to a change that a maintainer can inspect. A practical first version begins with one repository, its current CI system, and a small class of changes with predictable review. The automation prepares the draft and gathers evidence. People set the scope and decide when a change is ready to merge or release.
Choose a task class with a clear finish line
Find repeated work with a named owner and a concrete before-and-after behavior. Documentation corrections, small application defects with an existing test fixture, and additional cases for a stable function are useful candidates. Sample recent tickets to estimate ordinary implementation and review effort before selecting the pilot queue.
Verify repository readiness by running the existing checks from a fresh checkout. If setup steps rely on an undocumented workstation or production data, capture the setup or supply a fixture first. DORA’s 2025 research describes AI as amplifying the strengths and weaknesses of the surrounding development system.
Reference: DORA 2025 State of AI-assisted Software Development
Give every assignment a testable brief
Pin the starting revision and include the desired behavior, expected checks, permitted paths, and the person who can answer questions. An illustrative task might ask the agent to sort displayed labels by name while preserving the stored configuration and adding a test for tied names. A maintainer should be able to evaluate that outcome from the brief and the diff.
If the implementation requires a new permission, an unrelated file, or a change in business meaning, return the task with the smallest useful explanation and ask the owner to rescope it.
Make retries and handoff explicit
Give each assignment a stable task identifier and record its active workspace and draft PR. A repeated issue event should find the existing assignment. If the target branch moves, run the relevant checks against the updated candidate. When the retry budget is spent, link the last useful diff and check output before returning ownership.
Use isolated workspaces, scoped identities, and a draft branch. GitHub’s cloud-agent documentation describes vendor-specific controls around branches and approvals. Confirm equivalent limits on the tool you choose before enabling unattended assignment.
| State | Evidence to retain | Next owner |
|---|---|---|
| Needs clarification | Open question and proposed scope | Ticket owner |
| Draft ready | Diff, candidate revision, and check results | Reviewer |
| Blocked | Last useful result and failed check | Maintainer |
| Accepted | Approval and the accepted revision | Existing merge and release process |
Implementation checklist
- Choose a repository owner and one repeatable, low-risk task class.
- Run the existing build and relevant tests from a clean checkout.
- Record the allowed paths, expected checks, retry budget, and escalation conditions.
- Confirm the draft PR links the issue, revision, and test evidence.
- Rehearse pausing intake and releasing an unfinished task back to a maintainer.
Common questions
Do we need multiple agents?
One agent plus predictable CI and an accountable reviewer is a workable first design. Add distinct roles when the pilot exposes a concrete bottleneck that a second role can address.
What if the repository has weak tests?
Start by making the build reproducible and adding a small set of reliable acceptance checks. Until then, use tasks that a maintainer can verify directly, such as documentation corrections.
What counts as a completed task?
A designated reviewer has accepted the change against the original criteria. Track draft-ready and merged as separate states when a team batches releases.
Your next step
The first production decision is whether one repeatable task class has a reliable route from intake to review. Rehearse a successful run, a blocked run, and a pause. Use what reviewers learn from real drafts to decide which task class, if any, to add next.
Sources and further reading
Primary references for the external guidance discussed above. Implementation examples and planning calculations are illustrative, not reported customer outcomes.