Wink Pings

Throw GitHub Issues at AI: Scan Requirements Hourly, Run at Most 3 Tasks at Once, Open PRs Automatically

Piotr Mińkowski runs a self-hosted AI software factory on Kubernetes and OpenShift. When a GitHub issue comes in, the planning agent breaks it into tasks; the coding agent writes a plan first and then changes code; after tests pass, it opens a PR. Code and issue text never leave the cluster, and the model runs Qwen via vLLM.

In a tweet, Piotr Mińkowski shared an update to a self-hosted AI software factory. The entry point is a GitHub issue, and the exit point is a pull request. A developer files an issue; the bot first replies with a checklist plan, then changes code on a new branch, runs builds and tests, and finally opens a PR for a human to review and merge.

The tweet lists four changes: a CronJob scans requirement issues; the planning agent breaks tasks down and defines dependencies; at most 3 issues are open at the same time; the coding agent generates an implementation plan before writing code.

This system does not rely on one all-purpose agent to handle everything. It splits the workflow into four triggers: a new issue, an issue comment, a PR review comment, and a PR review. Each trigger first verifies the GitHub webhook signature, then filters with CEL. Only repository OWNER, MEMBER, and COLLABORATOR can start it; bot events are ignored, and PRs from forks are rejected.

Factory overview

Underneath, Tekton Triggers turns webhooks into PipelineRuns. The three pipelines are issue-agent, issue-comment-agent, and pr-comment-agent. Each PipelineRun has its own workspace, and the steps are print-event, fetch-skills, prepare, plan, agent, verify, and publish; on failure, finally runs report-failure. The agent image contains OpenCode, GitHub CLI, JDK, Maven, skaffold, and kubectl. Skills and subagents are packaged as OCI artifacts and pulled with oras. The README also leaves a Claude Code image variant, but the pipeline does not use it by default.

Event flow for a new issue

The model does not use an external API. vLLM serves Qwen3.8 Flash inside the cluster, with 2 GPUs, 128k context, and an OpenAI-compatible interface. The README says generation speed is about 13 tokens/s, and one requirements analysis takes about 15 to 20 minutes. Code and issue text do not leave the cluster, except for calls to GitHub. The model name and address are stored in the agent ConfigMap, so swapping models means changing one configuration.

The requirements agent is a more special part of this factory. It is not triggered by a webhook; instead, a CronJob runs once an hour and scans open issues with the requirements label. The flow has three cases: if a requirement has been edited or was never analyzed, analyze it; if a task dependency is complete, release the new task; if all tasks are complete but not reviewed, review them. State is written in the bot's issue comments, and task issues carry a req-<number> label and a hidden marker. create-issues only creates tasks when all dependencies are closed, and the default max-open is 3.

Why 3? The tweet does not explain. The README shows this default value as well as the dependency constraints. This number controls parallelism and also controls how many issues enter the model context at the same time. For a small self-hosted cluster, 3 parallel agents can already consume a fair amount of GPU and waiting time. It is more appropriate to see it as a cost valve.

PipelineRun in the OpenShift console

The security model has a clear boundary: the plan step gets a one-hour installation token and can only run gh issue comment or gh pr comment. The agent step has no GitHub credentials, and opencode.json denies git commit, git push, and gh. publish then mints a new token and is responsible for committing, pushing, and opening the PR. This design acknowledges that agents run for a long time, tokens expire, and issue text is untrusted input.

Verification is not romantic. verify-build runs mvn -B -ntp verify by default; on failure, it gives the tail of the log to the agent, which can make at most 3 fixes within a total budget of 45 minutes. If it cannot fix it, it opens a draft PR, does not enable auto-merge, and pastes the build log in a comment. The repository must also have an AGENTS.md that clearly states build, test, and coding conventions. The README literally says that after the agent finishes, there is nothing else to verify the code, so these rules are the quality gate.

The plan checklist the bot posts in the issue

The PR opened by the bot and human approval

The demo repository is a ticketing system: Spring Boot microservices plus a Vue 3 frontend. event-service lists shows, booking-service manages bookings, and the frontend is built with Maven. Looking at closed issues and merged PRs shows the complete process: plan comments, PRs opened by the bot, human approval, and auto-merge.

Webhook delivery records

The limitations are also stated plainly. verify only runs the repository build and tests; it does not replace branch protection and human review. The 3 hours are shared across the entire run, including clone, plan, agent, verify, and publish; if it times out, no PR is opened. The context is 128k, so long issues and large repositories will reduce quality. Comments on a PR that start with @ai are not handled by issue-comment-agent; they go through the review trigger. The README also lists next steps such as evaluation set, reviewer agent, preview environment, and model routing, all marked as not implemented.

Several real questions came up in the replies. Someone asked whether the requirements were generated by another AI tool; the tweet did not elaborate. Someone asked why 3. Someone suggested adding a pr-revive agent that scans PRs with comments or CI failures and pushes them back to the agent; the author listed self-healing after CI in next steps, but it is not done yet. Another reply mentioned that splitting work across more agents gives limited speedup, and step-by-step checks matter more than finer decomposition. This judgment is consistent with the factory's design: plan, verify, and publish are all broken into observable steps, and one agent is not allowed to run black-box from issue all the way to merge.

The focus of this workflow is permissions and checkpoints, not making AI freer. The agent does not get GitHub credentials; the plan is posted as a comment first; build failures degrade to a draft; tasks are not created when dependencies are not closed; and duplicate webhooks do not produce a second PipelineRun with the same name.

Project: https://github.com/piomin/ai-software-factory

Demo repository: https://github.com/piomin/ai-software-factory-showcase

Original tweet: https://x.com/piotr_minkowski/status/2125346335046119426

发布时间: 2026-11-25 15:32