jcarlosrodicio/opencode-agent-orchestration-kit/autonomous-loops
Claude Code and agent skill by jcarlosrodicio/opencode-agent-orchestration-kit
- community
- ext:[{"type":"plugin","description":"Custom plugin integration"}]
Checking that the SKILL.md file is still in the repository.
Patterns and architectures for autonomous loops — from simple sequential pipelines to RFC-driven multi-agent DAG systems. Use when setting up autonomous development workflows, choosing the right loop architecture, or building CI/CD-style continuous development pipelines.
Install
npx vskill@latest install jcarlosrodicio/opencode-agent-orchestration-kit/autonomous-loopsSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as jcarlosrodicio/opencode-agent-orchestration-kit/autonomous-loops.
Autonomous Loops
Patterns, architectures, and reference implementations for running autonomous loops. Covers everything from simple sequential pipelines to full RFC-driven multi-agent DAG orchestration.
When to Use
- Setting up autonomous development workflows that run without human intervention
- Choosing the right loop architecture for your problem (simple vs complex)
- Building CI/CD-style continuous development pipelines
- Running parallel agents with merge coordination
- Implementing context persistence across loop iterations
- Adding quality gates and cleanup passes to autonomous workflows
Loop Pattern Spectrum
From simplest to most sophisticated:
| Pattern | Complexity | Best For | |
|---|---|---|---|
| Sequential Pipeline | Low | Daily dev steps, scripted workflows | |
| Infinite Agentic Loop | Medium | Parallel content generation, spec-driven work | |
| Continuous PR Loop | Medium | Multi-day iterative projects with CI gates | |
| De-Sloppify Pattern | Add-on | Quality cleanup after any implementer step | |
| RFC-Driven DAG | High | Large features, multi-unit parallel work with merge queue |
1. Sequential Pipeline
The simplest loop. Break daily development into a sequence of non-interactive calls. Each call is a focused step with a clear prompt.
Core Insight
If you can't figure out a loop like this, it means you can't even drive the LLM to fix your code in interactive mode.
Chain calls to build a pipeline:
Key Design Principles
- Each step is isolated — A fresh context window per call means no context bleed between steps.
- Order matters — Steps execute sequentially. Each builds on the filesystem state left by the previous.
- Negative instructions are dangerous — Don't say "don't test type systems." Instead, add a separate cleanup step.
- Exit codes propagate —
set -estops the pipeline on failure.
2. Infinite Agentic Loop
A two-prompt system that orchestrates parallel sub-agents for specification-driven generation.
Architecture: Two-Prompt System
The Pattern
- Spec Analysis — Orchestrator reads a specification file defining what to generate
- Directory Recon — Scans existing output to find the highest iteration number
- Parallel Deployment — Launches N sub-agents, each with:
- The full spec
- A unique creative direction
- A specific iteration number (no conflicts)
- A snapshot of existing iterations (for uniqueness)
- Wave Management — For infinite mode, deploys waves of 3-5 agents until context is exhausted
Batching Strategy
| Count | Strategy | |
|---|---|---|
| 1-5 | All agents simultaneously | |
| 6-20 | Batches of 5 | |
| infinite | Waves of 3-5, progressive sophistication |
Key Insight: Uniqueness via Assignment
Don't rely on agents to self-differentiate. The orchestrator assigns each agent a specific creative direction and iteration number.
3. Continuous PR Loop
A production-grade loop that runs code in a continuous loop, creating PRs, waiting for CI, and merging automatically.
Core Loop
Cross-Iteration Context: SHARED_TASK_NOTES.md
The critical innovation: a SHARED_TASK_NOTES.md file persists across iterations:
Read this file at iteration start and update it at iteration end. This bridges the context gap between independent invocations.
CI Failure Recovery
When PR checks fail:
- Fetch the failed run ID via
gh run list - Spawn a new implementation run with CI fix context
- Inspect logs via
gh run view, fix code, commit, push - Re-wait for checks (up to retry max)
Completion Signal
Signal "I'm done" by outputting a magic phrase. Three consecutive iterations signaling completion stops the loop.
4. The De-Sloppify Pattern
An add-on pattern for any loop. Add a dedicated cleanup/refactor step after each implementer step.
The Problem
When you ask an LLM to implement with TDD, it takes "write tests" too literally:
- Tests that verify TypeScript's type system works
- Overly defensive runtime checks the type system already guarantees
- Tests for framework behavior rather than business logic
- Excessive error handling that obscures the actual code
The Solution: Separate Pass
Instead of constraining the implementer, let it be thorough. Then add a focused cleanup agent:
Key Insight
Rather than adding negative instructions which have downstream quality effects, add a separate de-sloppify pass. Two focused agents outperform one constrained agent.
5. RFC-Driven DAG Orchestration
The most sophisticated pattern. An RFC-driven, multi-agent pipeline that decomposes a spec into a dependency DAG, runs each unit through a tiered quality pipeline, and lands them via an agent-driven merge queue.
Architecture Overview
Complexity Tiers
| Tier | Pipeline Stages | |
|---|---|---|
| trivial | implement → test | |
| small | implement → test → code-review | |
| medium | research → plan → implement → test → review → review-fix | |
| large | research → plan → implement → test → review → review-fix → final-review |
Key Design Principles
- Deterministic execution — Upfront decomposition locks in parallelism and ordering
- Human review at leverage points — The work plan is the single highest-leverage intervention point
- Separate concerns — Each stage in a separate context window with a separate agent
- Conflict recovery with context — Full eviction context enables intelligent re-runs
- Tier-driven depth — Trivial changes skip research/review; large changes get maximum scrutiny
Choosing the Right Pattern
Decision Matrix
Combining Patterns
These patterns compose well:
- Sequential Pipeline + De-Sloppify — The most common combination. Every implement step gets a cleanup pass.
- Continuous Loop + De-Sloppify — Add a de-sloppify directive to each iteration.
- Any loop + Verification — Use
verification-loopskill as a gate before commits.
Anti-Patterns
- Infinite loops without exit conditions — Always have a max-runs, max-cost, max-duration, or completion signal.
- No context bridge between iterations — Each call starts fresh. Use
SHARED_TASK_NOTES.mdor filesystem state to bridge context. - Retrying the same failure — If an iteration fails, capture the error context and feed it to the next attempt.
- Negative instructions instead of cleanup passes — Don't say "don't do X." Add a separate pass that removes X.
- All agents in one context window — For complex workflows, separate concerns into different agent processes.
Verification
After applying autonomous-loops:
- [ ] The chosen pattern matches the complexity of the task
- [ ] Exit conditions are defined (max-runs, max-cost, max-duration, or completion signal)
- [ ] Context is bridged between iterations (SHARED_TASK_NOTES.md or equivalent)
- [ ] Failure recovery captures error context for the next attempt
- [ ] De-sloppify pass is separate from the implementer pass (not negative instructions)
- [ ] Verification runs before commits
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingopencode/skills/autonomous-loops/SKILL.md
Popularity
- Repository stars
- 116
- Repository forks
- 11
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
pluginCustom plugin integration
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jcarlosrodicio/opencode-agent-orchestration-kit/autonomous-loops)