← 返回
未分类 中文

autonomous-loops

Autonomous Claude Code loop patterns: sequential pipelines, persistent REPL sessions, parallel spec-driven generation, PR automation, cleanup passes, and RFC...
自主 Claude Code 循环模式:顺序流水线、持久 REPL 会话、并行规范驱动生成、PR 自动化、清理遍历以及 RFC...
djc00p djc00p 来源
未分类 clawhub v1.0.1 1 版本 99776.8 Key: 无需
★ 0
Stars
📥 447
下载
💾 3
安装
1
版本
#latest

概述

Autonomous Loops — Patterns for Claude Code Automation

Running Claude in loops enables spec-driven development, CI/CD-style pipelines, and iterative refinement without human intervention between steps.

Quick Start

Choose your pattern by complexity:

  1. Sequential Pipeline (simple) — Chain claude -p calls for linear workflows
  2. Persistent REPL (simple) — Interactive sessions with history
  3. Spec-Driven Parallel (medium) — Deploy N agents from spec, manage waves
  4. PR Automation Loop (medium) — PR creation, CI fix, auto-merge
  5. De-Sloppify Pass (add-on) — Cleanup step after any implementation
  6. RFC-Driven DAG (advanced) — Multi-unit parallel work with dependency graph

Pattern Spectrum

PatternSetupComplexityBest For
-------------------------------------
Sequential PipelineBash scriptLowDaily tasks, scripted workflows
REPLNode/CLILowInteractive development
Parallel AgentsClaude Code loopMediumContent generation, spec variations
PR LoopShell scriptMediumIterative multi-day projects
De-SloppifyAdd-on to anyOptionalQuality cleanup after implementation
DAG OrchestrationPython/NodeHighLarge features, parallel units, merge coordination

References

  • references/sequential-pipeline.md — Basic claude -p loops with examples
  • references/persistent-repl.md — NanoClaw-style session persistence
  • references/parallel-agents.md — Spec-driven deployment with wave management
  • references/pr-automation.md — Continuous Claude PR loop with CI gates
  • references/de-sloppify.md — Quality cleanup pattern
  • references/dag-orchestration.md — RFC-driven multi-unit coordination

Key Principles

  1. Isolation — Each loop iteration gets fresh context (no bleed-through)
  2. Context Persistence — Use files (SHARED_TASK_NOTES.md) to bridge iterations
  3. Exit Conditions — Always set max-runs, max-cost, max-duration, or completion signal
  4. No Blind Retries — Capture error context for next iteration
  5. Separate Concerns — Different loop patterns for different problem sizes

Decision Matrix

Is this a single focused change?
├─ Yes → Sequential Pipeline
└─ No → Do you have a spec/RFC?
         ├─ Yes → Do you need parallel work?
         │        ├─ Yes → DAG Orchestration
         │        └─ No → PR Automation Loop
         └─ No → Do you need many variations?
                  ├─ Yes → Parallel Agents + Spec
                  └─ No → Sequential Pipeline + De-Sloppify

Anti-Patterns

❌ Infinite loops without exit conditions

❌ No context bridge between iterations

❌ Retrying the same failure without capturing error context

❌ Negative instructions instead of cleanup passes

❌ All agents in one context window (reviewer should never be the author)

❌ Ignoring file overlap in parallel work


Adapted from everything-claude-code by @affaan-m (MIT)

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-05-03 09:49 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 195 📥 67,598
dev-programming

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 72 📥 181,725
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 677 📥 326,954