
Show HN: Devloops – Adversarial agent loops so humans only make the key decision
Reusable agent-loop skills for coding agents.
以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。
Reusable agent-loop skills for coding agents.
devloops gives a coding agent three loops: producer, worker, and gatekeeper. Each loop is a skill (SKILL.md plus helper scripts). You install the skills into a project's .agents/skills/ directory. A per-project file, devloops.config.yaml, holds the project values (repo, branches, commands, protected paths, labels).
Most maintenance work is routine: find a problem, write an issue, fix it, review the fix. devloops lets agents do that routine work in an adversarial loop:
The worker and the gatekeeper go back and forth until the gatekeeper approves. The human does not do this routine work. The human makes only the important decisions:
Agents never merge. A human always merges.
producer-loop ──► issue (auto:producer) │ gatekeeper-loop ──► validated | rejected (checks the issue against the code) │ human ───────────► approved (accepts the scope) │ worker-loop ─────► PR │ gatekeeper-loop ─► verdict comment + gatekeeper:* label │ changes-requested ─► worker responds ─► re-review ... ▼ approve (+ CI green) │ human ───────────► merge
The worker services its open PRs first (conflicts, gatekeeper findings, comments, failing CI). It picks a new issue only when no PR needs action.
The worker skips producer issues that do not have the approved label.
The worker and the gatekeeper can share one GitHub account. So verdicts are PR comments with a hidden marker, plus a gatekeeper:* label.
The gatekeeper adds gatekeeper:needs-human to security-sensitive PRs and PRs that touch protected_paths.
Tick gate
A scheduler starts each loop in ticks. Before a worker tick starts the agent, tick_gate.py decides if there is anything to do:
So a change that happens during a tick is never hidden, and only an idle, unchanged state gives NOOP.
Exit codes: 0 RUN, 1 NOOP, 2 BUSY, 3 ERROR (auth, network, or GraphQL failure).
The producer has its own gate, producer_gate.py. It picks the most overdue task (--next) from the task periods in the config.
Python 3.8 or later (no third-party packages; tested with 3.13)
git
GitHub CLI gh, logged in, with push permission to the project repo
A coding agent that can load skills from .agents/skills/
Install
git clone https://github.com/fritzprix/devloops.git devloops/scripts/install.sh /path/to/project # copy devloops/scripts/install.sh /path/to/project --link # symlink (follows updates)
The script installs:
It does not overwrite a skill that already exists. Add the state directory (default .devloops/) to .gitignore.
Check the prerequisites first (Python, GitHub API, git, gh auth, push permission):
python3 .agents/skills/worker-loop/scripts/doctor.py
Then tell your agent:
/gatekeeper-loop and /producer-loop use the same forms. /gatekeeper-loop 10m --pr N reviews one PR. /producer-loop <task> runs one producer task.
A cron example that starts the agent only when the gate says RUN:
*/10 * * * * cd /path/to/project && python3 .agents/skills/worker-loop/scripts/tick_gate.py --lock && /path/to/agent-runner "/worker-loop"
See skills/worker-loop/references/scheduling.md for the shell-loop and harness adapters.
Label Set by Meaning
auto:producer, auto:<task> producer Candidate issue from a producer task
validated / rejected gatekeeper The issue matches / does not match the code
approved human only Scope accepted; the worker can take a producer issue
gatekeeper:changes-requested gatekeeper The worker must answer the findings
gatekeeper:approved gatekeeper Ready for a human merge
gatekeeper:escalated gatekeeper Worker and gatekeeper disagree; a human must decide
gatekeeper:needs-human gatekeeper Security-sensitive or protected paths
Safety rules
The skills encode these rules:
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。