Building an Agent Factory: From Jira Ticket to Pull Request
I’ve spent a fair amount of side-project time on a system I call Agent Factory: automation, built around Claude Code, that takes a Jira ticket and turns it into a pull request without me touching the keyboard for most of the process.
Why build this
A single AI-assisted PR is a nice trick. A repeatable pipeline is a different thing entirely — it means the automation has to handle ticket parsing, context gathering, implementation, and self-review consistently, not just once under ideal conditions.
How it’s structured
The pipeline has three rough stages:
- Ingest — pull the ticket, its acceptance criteria, and any linked context
- Isolate — spin up a git worktree so the agent’s changes don’t collide with other work in progress, including other tickets running through the same pipeline in parallel
- Deliver — implement against the spec, run tests, and open a PR with a summary a human reviewer can actually use
Slash commands drive each stage manually when I want to, or the whole thing can run end to end for well-scoped tickets.
What I’ve learned
The worktree isolation turned out to matter more than I expected — running multiple tickets through the pipeline concurrently is only safe because each one gets its own isolated working directory. Without that, “automation” quickly turns into “automation that occasionally clobbers your other branch.”
The other lesson: this only works well on tickets with a spec worth automating against. Which loops back to the point of the previous post — the pipeline is a multiplier on good spec-writing, not a substitute for it.