← gpuflo · Mikeroysoft/gpuflo · scripts/factory_*

The gpuflo Agent Factory

A label-driven autonomous pipeline that triages GitHub issues, dispatches coding agents into git worktrees, gates their work deterministically, and publishes reviewed pull requests — humans keep the merge button.

Diagram A — system architecture

Nine components, twelve directed edges. GitHub on the left, the controller in the center, the per-ticket workbench on the right.

gpuflo agent factory — system architecture GitHub issues labeled needs-triage are triaged by a local LLM; a systemd timer runs factory_dispatch.py, which claims ready-for-agent issues into .factory git worktrees, runs omp or droid workers, gates each diff with agent_gate.py, requests a codex review, and opens a pull request that a human merges. GITHUB CONTROLLER WORKBENCH · .FACTORY/WT-<N> NEEDS-TRIAGE LABEL+COMMENT EVERY 10 MIN FRONTIER WORKTREE ADD PROMPT RUN ≤3× SIGNED COMMITS FAIL REPORT PUSH + PR DIFF REVIEW FINDINGS GitHub Issues labels: needs-triage ready-for-agent factory_triage.py 199 loc · local LLM (FACTORY_LLM_URL) systemd timer gpuflo-factory.timer boot +5m · every 10m factory_dispatch.py 356 loc · MAX_ACTIVE=2 · 90 min budget claim · lock · worker/gate/review loop .factory/wt-<n> git worktree · branch agent/<n> · .lock worker omp -p · droid exec (chore) agent_gate.py 133 loc · 6 deterministic checks codex review codex exec · APPROVE / REVISE GitHub PR agent/<n> · Closes #n human merges LEGEND FOCAL PROCESS STORE EXTERNAL INPUT GATE GITHUB CALL PIPELINE RETURN/RETRY

Diagram B — ticket lifecycle

One ticket, start to terminal: triage decision, worker attempts under the gate, one codex bounce, then human merge or escalation.

gpuflo agent factory — ticket lifecycle Flowchart of one ticket: a triage decision routes agent-ready issues into a claimed worktree; a worker is gated up to three times with one codex review bounce, ending in a pull request awaiting human merge or escalation to ready-for-human. AGENT-READY NOT READY PASS ≤3 ATTEMPTS 3 FAILS/90 MIN APPROVE 1 BOUNCE 2ND REVISE needs-triage issue open on GitHub triage local LLM claim + worktree assign @me · agent/<n> worker attempt omp -p / droid exec gate 6 checks codex diff review PR awaits human merge no auto-merge · Closes #n escalate ready-for-human · unassign comment + log path LEGEND START / END STEP DECISION HAPPY TERMINAL FORWARD LOOP / HANDOFF

agent_gate.py

The gate's six checks

  • conflict markers — git grep for the seven-char markers
  • cargo fmt --check
  • cargo clippy --all-targets --locked -- -D warnings
  • cargo test --all-targets --locked
  • notices drift — notices.py must not change THIRD_PARTY_NOTICES.txt
  • leak scan of base..HEAD — internal / confidential / Jira-style terms

factory_dispatch.py

Budgets & escalation

  • MAX_ACTIVE=2 lock-held worktrees
  • MAX_ATTEMPTS=3 worker+gate rounds
  • 90-minute wall clock per ticket
  • 1 codex review bounce, then escalate
  • escalation = unassign + ready-for-human + comment with log path
  • no auto-merge anywhere

.factory/ · gitignored

State on disk

  • wt-<n>/ + .lock + .factory-prompt.md
  • logs/<n>-attempt-<a>.log
  • pr-body-<n>.md
  • review-<n>.md
  • gate-report-<n>.md