Claude Cycle Loop
NBTDx/claude-cycle-loop
Loop autônomo plan → build → verify com três modelos de supervisão
Ver no GitHubSistema de três variantes para executar Claude Code como um loop autônomo de planejamento → construção → verificação. Cada variante oferece um trade-off diferente entre supervisão humana e autonomia, permitindo escolher a abordagem que melhor se adequa ao seu fluxo de trabalho e tipo de tarefa.
Instalação
npx convez-ai NBTDx/claude-cycle-loop1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Desenvolvimento autônomo de software com diferentes níveis de revisão humana
- Ciclos de iteração rápida para projetos de baixo risco
- Fluxos de engenharia onde você precisa balancear autonomia com inspeção de artefatos intermediários
Veredito

Ferramenta madura e bem documentada para quem quer automatizar ciclos de desenvolvimento com Claude Code. Excelente para engenheiros com mindset PM que precisam equilibrar supervisão vs. autonomia; requer cuidado com permissões e melhor testada em projetos descartáveis antes de usar em produção crítica.
README
A tradução para o português deste README ainda está na fila.
claude-cycle-loop
Three takes on running Claude Code as an autonomous plan → build → verify → log cycle on your project. Pick the trade-off that fits how you work.
How this got built
I'm an engineer with a project management background. I'd never shipped production software before. The trigger was a government contract — could I deliver real software through Claude Code alone, with no developer experience to fall back on? I shipped the demo. The workflow that got me there is in this repo.
The three variants below are the points on the supervised-vs-autonomous axis I actually used (or seriously considered) at different phases of that work. None is "the answer" — they're three closed loops between an engineering mindset and shippable code, each with a different review/autonomy trade-off. If you have engineering thinking and PM instinct but haven't shipped production code before, this is the system that closed that gap for me.
The three variants
claude-cycle-loop/
├── variant-a-supervised/ # human-reviewed planner + autonomous builder
├── variant-b-dual-cli/ # two `claude -p` calls per cycle (planner + builder)
└── variant-c-single-agent/ # one `claude -p` call per cycle, two phases inside
Each variant is a self-contained folder. Pull the one you want; ignore the others.
| A — Supervised | B — Dual CLI | C — Single agent | |
|---|---|---|---|
| Agents per cycle | 2 (different surfaces) | 2 claude -p calls | 1 claude -p call |
| Human in the loop | Yes — every cycle | No | No |
Files in workflow/ | 6 | 5 | 3 |
| Mid-cycle artifact to inspect | Yes — NEXT_TASK.md | Yes — NEXT_TASK.md | No (spec is inline + ephemeral) |
| Per-cycle cost | One CLI call + your time | Two CLI calls | One CLI call |
| Best for | Novel/risky tasks | Autonomy with phase visibility | Lean overnight cycling |
See docs/COMPARISON.md for the full table and docs/DESIGN_NOTES.md for the why behind each shape.
Which one should I pick?
- Want a human reviewing every plan before code is written? → A.
- Want full autonomy, but a clean separation between planning and building you can inspect mid-cycle? → B.
- Want the leanest setup, run-and-walk-away? → C.
- Not sure? Start with B. It's the middle of the spectrum and gives you the most legibility per token. Downgrade to A if planning quality slips on hard tasks. Upgrade to C if cycles get cheap and reliable.
Common to all three
Prerequisites
- Claude Code installed and authenticated (
claude --version). jqandgiton PATH. (bcis optional — only used in C's loop banner.)- A project directory you're willing to
git reset --hardif a cycle goes sideways.
⚠️ --dangerously-skip-permissions
Every variant's loop.sh runs claude with --dangerously-skip-permissions. That flag does what it says — it lets the agent run shell commands without asking. It's what makes the loop autonomous and what makes it risky on a non-throwaway machine.
The shipped claude-settings/settings.local.json has two halves, and only one of them is enforced under the bypass flag:
permissions.deny— always enforced, even with--dangerously-skip-permissions. Ships pre-populated with universally dangerous patterns:rm -rf /,rm -rf ~,sudo *,git push --force*,curl * | sh, etc. The agent cannot run these regardless of the flag.permissions.allow— takes effect only if you remove--dangerously-skip-permissionsfromloop.sh. With the flag present, the allow-list is bypassed; with the flag removed, it constrains the agent to listed patterns and Claude Code prompts for anything else.
Other mitigations baked in:
- Every
loop.shcds into$PROJECTfor every call. The blast radius is intended to be that directory. - Run this in a project working directory you're willing to throw away. A container, a dev VM, or a server is ideal.
If you want a stricter safety net, you have two options. (1) Add more patterns to permissions.deny — those are always enforced. (2) Drop --dangerously-skip-permissions from loop.sh to make the allow-list authoritative — but then a human has to approve any shell call outside the allow-list, which makes overnight runs impractical.
Placeholders to fill in
Each variant's CLAUDE.md ships with {{PLACEHOLDERS}} for project name, architecture, build-verify commands, and coding patterns. Each loop.sh has {{PROJECT_DIR}} and {{AGENT_MODEL}}. Grep for {{ in the variant you chose to find them all:
grep -rn '{{' variant-c-single-agent/
License
MIT. See LICENSE.