continuous-agent-loop
affaan-m/everything-claude-code
Patterns for continuous autonomous agent loops with quality gates, evals, and recovery controls.
What is continuous-agent-loop?
Implements canonical patterns for running autonomous agent loops in production, including loop selection strategies, quality gates, and failure recovery. Use this when building systems that need to run agents continuously with measurable progress, cost control, and safe fallback mechanisms.
- Select appropriate loop type (sequential, RFC-DAG, parallel, or PR-based) based on your control requirements
- Integrate quality gates and code evaluation to prevent degradation
- Implement session persistence and replay for debugging and recovery
- Detect and recover from failure modes like loop churn, repeated retries, and cost drift
- Audit loop behavior with built-in harness diagnostics
How to install continuous-agent-loop
npx skills add https://github.com/affaan-m/everything-claude-code --skill continuous-agent-loop- Claude Code or Cursor with agent capabilities
- Optional: ralphinho-rfc-pipeline for RFC decomposition
- Optional: plankton-code-quality for quality gates
- Optional: eval-harness for evaluation loops
- Optional: nanoclaw-repl for session persistence
How to use continuous-agent-loop
- 1.Choose your loop type using the Loop Selection Flow (sequential, RFC-DAG, infinite/parallel, or continuous-pr)
- 2.Integrate quality gates using plankton-code-quality and /quality-gate commands
- 3.Set up eval loop with eval-harness to measure progress
- 4.Enable session persistence with nanoclaw-repl for replay and debugging
- 5.Monitor for failure modes (loop churn, repeated retries, merge stalls, cost drift)
- 6.If loop fails, freeze it, run /harness-audit, reduce scope, and replay with explicit acceptance criteria
Use cases
- Building CI/CD pipelines where agents autonomously refactor or improve code with PR controls
- Decomposing complex tasks into RFC-driven agent workflows with parallel exploration
- Running long-lived agent sessions that need to maintain quality standards and track progress
- Recovering from agent loops that are stuck in retry loops or generating low-quality outputs
- Monitoring and controlling costs in continuous agent deployments
- DevOps engineers building autonomous code improvement systems
- ML engineers deploying long-running agent workflows
- Teams needing strict quality gates on agent-generated code
- Developers debugging agent loop failures and cost overruns
continuous-agent-loop FAQ
Use continuous-pr for strict CI/PR control, rfc-dag for complex decomposition, infinite for exploratory parallel generation, or sequential as the default for most cases.
Implement quality gates with plankton-code-quality, use eval-harness to track measurable progress, and set explicit acceptance criteria before running the loop.
Freeze the loop, run /harness-audit to diagnose the issue, reduce scope to the failing unit, and replay with explicit acceptance criteria.
Yes, the continuous-pr pattern is designed for strict CI/PR control and integrates with merge queues and PR workflows.
This is v1.8+ canonical pattern that supersedes autonomous-loops while maintaining compatibility for one release.
Full instructions (SKILL.md)
Source of truth, from affaan-m/everything-claude-code.
name: continuous-agent-loop description: Patterns for continuous autonomous agent loops with quality gates, evals, and recovery controls. metadata: origin: ECC
Continuous Agent Loop
This is the v1.8+ canonical loop skill name. It supersedes autonomous-loops while keeping compatibility for one release.
Loop Selection Flow
Start
|
+-- Need strict CI/PR control? -- yes --> continuous-pr
|
+-- Need RFC decomposition? -- yes --> rfc-dag
|
+-- Need exploratory parallel generation? -- yes --> infinite
|
+-- default --> sequential
Combined Pattern
Recommended production stack:
- RFC decomposition (
ralphinho-rfc-pipeline) - quality gates (
plankton-code-quality+/quality-gate) - eval loop (
eval-harness) - session persistence (
nanoclaw-repl)
Failure Modes
- loop churn without measurable progress
- repeated retries with same root cause
- merge queue stalls
- cost drift from unbounded escalation
Recovery
- freeze loop
- run
/harness-audit - reduce scope to failing unit
- replay with explicit acceptance criteria
Related skills
More from affaan-m/everything-claude-code and the wider catalog.
security-review
Security checklist and patterns for authentication, input validation, secrets, and sensitive features.
golang-patterns
Idiomatic Go patterns, best practices, and conventions for building robust, efficient, and maintainable applications.
coding-standards
Baseline coding conventions for naming, readability, immutability, and quality across projects.
frontend-patterns
React and Next.js patterns for components, state management, performance, and modern frontend practices.
backend-patterns
REST/GraphQL API design, database optimization, and server-side patterns for Node.js, Express, and Next.js.
golang-testing
Go testing patterns: table-driven tests, subtests, benchmarks, fuzzing, and TDD methodology.