Back to blog

Turn a Linear ticket into a reviewed PR from Slack

A repeatable loop for turning Linear tickets into reviewable PRs with an OpenCode agent, with Slack as the receipt.

Posted by

80% of the PRs I opened last week were created by my agent while I was asleep.

The reason is that I've started running a software factory. If you're not familiar: a software factory is a repeatable system that takes raw work in, puts finished work out on a cadence, and never makes you the middleware.

With OpenCode, the Pipa package, your task tracker of choice (I use Linear), and GitHub access, you can build one of your own. Here's how:

The short version

Hand your agent a prompt and point it at your Linear project. Take a ticket, implement it on a branch, run a second review, and open the PR for your review. Set up Pipa Local first: the Pipa Local install guide covers installation and Slack credentials, and the OpenCode Slack integration page explains the working folder and trusted-channel setup.

What you need

  • A list of Linear tickets you want to implement. Ideally each one has an end state or acceptance criteria so the agent can check its own work.
  • A repo checkout where OpenCode can read code, run tests, and create a branch.
  • GitHub access to the repositories you need, set up through the GitHub CLI.
  • One Slack channel where the PR should arrive for your review.
  • Pipa for running routines with OpenCode and making this automatic (it's actually one of a few routines I run in my agents' night shift, example here).

How to turn a ticket into a PR

All of this starts with a runbook I keep in my agent's company brain.

Turn STU-123 into a PR from the acme-web repo.
Use a feature branch, run the repo checks,
and post the ticket link and PR link here.

Step 1. Pick a ticket

For this process I actually keep it quite simple. I take the first manually ordered Up Next issue in my container project for all of my software factory work. I added a few guidelines having the agent reach out if the intent of the ticket is too ambiguous, blocked, or it's for something they don't have access to. I explicitly let it stop the run in those cases, so it's not merely creating work to fill a run.

Step 2. Implement

I use the lfg skill by Compound Engineering, which takes the ticket and decomposes it into a loop: turn it into an implementation plan, work the plan, review, then compound any lessons.

git checkout -b feat/YOUR-TICKET-short-scope
node --test tests/app/YOUR-FOCUSED-TEST.test.js
npm run lint
npm run build

Step 3. Review

I then typically have it run a second review with ponytail: a second pass through the code to catch overengineering or anything we might not need.

Step 4. Post the PR for approval

As a final Slack step I have it post in my product channel in Slack and tag me to review. Then when I run my day shift reviewing the agents' work, I can take a look at the PR, make any edits if I so choose. For certain kinds of easier changes I let them merge automatically.

Local limits

Pipa Local is customer-operated: this runs on your computer, not on hosted infrastructure. Your machine stays awake with the agent process running while work executes. When it sleeps, scheduled or long-running work pauses with it. Managed is maintained for you by Lunch Pail Labs.

FAQ

Can Pipa manage Linear by itself?

Yeah, if you wire it up. Put it on a routine, on a fixed cadence like every 30 minutes or every 20 minutes, and give it context on what it should do with Linear. Then it runs that for you.

What makes a good product ticket?

A clear definition of what you want, what you're trying to achieve, and especially what success looks like and what a good end state is. If it's all still in your head, talk it out first with the huddle skill (how to add voice chat to OpenCode sessions), voice input, or Wispr Flow, and give the agent that context before it plans.

Can I run this 24/7?

Yeah. My routines run on a regular cadence because I run them in the cloud. On Local, same deal, just keep your computer on and awake.

Where can I learn more about Pipa?

Start at usepipa.com: install guide, voice setup, and the rest of these tutorials. The Pipa repo and the Pipa skills repo are open source.

Turn a Linear Ticket Into a Reviewed PR From Slack | Pipa