james@feldmayer:~$ tickets --list // no open tickets right now — the queue is empty // file one at github.com/James-Feldmayer0/Adsplosion/issues // label it “read” — it gets picked up within ~30 seconds // tickets in “backlog” are filed but left alone by the loop
A systemd service (ticket-loop.service) runs a bash loop that wakes every 30 seconds, lists open issues on James-Feldmayer0/Adsplosion via the GitHub API, and skips anything that's a PR — or anything not labeled read. Tickets filed in backlog sit untouched until a human triages them. No new tickets → one cheap API call, zero tokens, back to sleep.
Each new issue is handed to a headless pi -p run: an AI agent with shell access, the site files, the repo, and the GitHub token. It reads the ticket, makes the change, and talks back to the issue it came from.
Fresh context per ticket: every run starts with --no-session, so each ticket gets a clean, empty context — nothing carries over from previous tickets. This keeps prompts small and saves tokens: the agent only ever pays for its own ticket, never the history of every run before it.
backlog filed, not triaged — the loop will not touch it │ human triages read ready — the loop picks these up, nothing else │ loop in progress agent is working on it (fresh context per ticket) │ agent, after live verification review done & verified by the agent — still open, waiting on a human │ human closes done
# every 30 seconds: 1. fetch GET /issues?state=open (PRs + non-“read” filtered out) 2. guard flock — a slow run never overlaps the next poll 3. label read → in progress 4. dispatch pi -p (one agent session per ticket, fresh context each run) 5. agent implement → verify live → comment on the issue 6. label in progress → review — only if verified; a human closes it
The agent must check its own work — curl the live site or run the app — before a ticket may move to review. No "edited the file, done." And it never closes tickets: closing is the human's call.
Ambiguous ticket? The agent posts a comment asking for clarification and stops — labels stay on in progress and it does not improvise a guess.
Each ticket gets max 2 agent attempts. Repeated failures leave the issue open and untouched, flagged for a human.
Site pages (/var/www/vibe) deploy directly; repo changes are committed and pushed via SSH. Unrelated systems stay untouched.
A headless pi agent audits the whole site. It starts with a deterministic scanner — pure python, no deps: index card titles vs post <h1>s, CSS classes used but never defined (the bug that made one blog card render in the wrong colour), missing dates, broken internal links, duplicate <h1>s — then reads the site the way a human would, looking for what rules can't catch: styling drift between pages, inconsistent date formats, docs that contradict the code they describe. It knows which paths Caddy proxies or redirects, so those aren't false positives, and it parses HTML with a real parser so escaped markup inside rendered transcripts can't fool it. The agent never fixes anything — it files a backlog ticket, deduplicated so a rerun updates the existing ticket instead of opening a new one. Nothing found → no ticket, no noise. Runs on demand or on a schedule, controlled from a private admin page on this box.
james@feldmayer:~$ /root/consistency-check.py // (silent — exit 0, site is consistent) // findings print as: SEVERITY | file | description
# where things live /root/ticket-loop.sh # poller: discover + dispatch /root/ticket-daemon.sh # 30s wrapper loop /etc/systemd/system/ticket-loop.service /root/ticket-loop.log # poll feed (auto-trimmed) /root/ticket-loop/issue-N.log # full agent transcript per ticket /root/consistency-check.py # rule-based baseline scan /root/consistency-check.sh # dispatches the pi agent + files backlog tickets /root/consistency-ctl.py # helper daemon: spawns runs, schedule (crontab) # commands systemctl status ticket-loop # is it alive? tail -f /root/ticket-loop.log # watch polls live
Every poll cycle pumps the poller log, service journal, and agent transcripts to the /hidden/logs page — regenerated automatically, so it's never more than 30 seconds stale. Failures show as a red banner; historic ones stay highlighted but don't trip the alarm. Secrets are redacted.