autonomous-loops

Solid

自主Claude代码循环的模式与架构——从简单的顺序管道到基于RFC的多智能体有向无环图系统。

AI & Automation 196,640 stars 30253 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 95/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 自主循环技能 > 兼容性说明 (v1.8.0): `autonomous-loops` 保留一个发布周期。 > 规范的技能名称现在是 `continuous-agent-loop`。新的循环指南应在此处编写,而此技能继续可用以避免破坏现有工作流。 在循环中自主运行 Claude Code 的模式、架构和参考实现。涵盖从简单的 `claude -p` 管道到完整的 RFC 驱动的多智能体 DAG 编排的一切。 ## 何时使用 * 建立无需人工干预即可运行的自主开发工作流 * 为你的问题选择正确的循环架构(简单与复杂) * 构建 CI/CD 风格的持续开发管道 * 运行具有合并协调的并行智能体 * 在循环迭代中实现上下文持久化 * 为自主工作流添加质量门和清理步骤 ## 循环模式谱系 从最简单到最复杂: | 模式 | 复杂度 | 最适合 | |---------|-----------|----------| | [顺序管道](#1-顺序管道-claude--p) | 低 | 日常开发步骤,脚本化工作流 | | [NanoClaw REPL](#2-nanoclaw-repl) | 低 | 交互式持久会话 | | [无限智能体循环](#3-无限智能体循环) | 中 | 并行内容生成,规范驱动的工作 | | [持续 Claude PR 循环](#4-持续-claude-pr-循环) | 中 | 具有 CI 门的跨天迭代项目 | | [去草率化模式](#5-去草率化模式) | 附加 | 任何实现者步骤后的质量清理 | | [Ralphinho / RFC 驱动的 DAG](#6-ralphinho--rfc-驱动的-dag-编排) | 高 | 大型功能,具有合并队列的多单元并行工作 | *** ## 1. 顺序管道 (`claude -p`) **最简单的循环。** 将日常开发分解为一系列非交互式 `claude -p` 调用。每次调用都是一个具有清晰提示的专注步骤。 ### 核心见解 > 如果你无法想出这样的循环,那意味着你甚至无法在交互模式下驱动 LLM 来修复你的代码。 `claude -p` 标志以非交互方式运行 Claude Code 并附带提示,完成后退出。链式调用来构建管道: ```bash #!/bin/bash # daily-dev.sh — Sequential pipeline for a feature branch set -e # Step 1: Implement the feature claude -p "Read the spec in docs/auth-spec.md. Implement OAuth2 login in src/auth/. Write tests first (TDD). Do NOT create any new documentation files." # Step 2: De-sloppify (cleanup pass) claude -p "Review all files changed by the previous commit. Remove any unnecessary type tests, overly defensive checks, or testing of language features (e.g., testing that TypeScript generics work). Keep real busines...

Details

Author
affaan-m
Repository
affaan-m/everything-claude-code
Created
4 months ago
Last Updated
2 days ago
Language
JavaScript
License
MIT

Integrates with

Related Skills