Awesome-omni-skill autonomous-loop

Autonomous development loop patterns for iterative self-improvement. Auto-triggers when implementing features autonomously, fixing bugs in a loop, or running until completion. Based on frankbria/ralph-claude-code.

install
source · Clone the upstream repo
git clone https://github.com/diegosouzapw/awesome-omni-skill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/product/autonomous-loop" ~/.claude/skills/diegosouzapw-awesome-omni-skill-autonomous-loop && rm -rf "$T"
manifest: skills/product/autonomous-loop/SKILL.md
source content

Autonomous Development Loop

Based on @ghuntley's Ralph technique for Claude Code.

For full autonomous mode, use

/ralph
. This skill provides the underlying patterns.

Core Principle: Dual-Condition Exit Gate

Never exit prematurely. Exit requires BOTH conditions:

  1. Completion Indicators ≥ 2 - Heuristic detection from your work
  2. Explicit EXIT_SIGNAL: true - Your conscious declaration

If only ONE is true → KEEP GOING

This innovation (introduced in ralph-claude-code v0.9.9) prevents false exits when completion language appears during productive work.

Completion Indicators

Count how many apply each loop:

IndicatorPattern
Tests passing100% pass rate
Fix plan completeAll
- [ ]
- [x]
"Done" language"done", "complete", "finished"
"Nothing to do""no changes needed", "already implemented"
"Ready" language"ready for review", "ready to merge"
No errorsZero execution errors

Need ≥2 indicators + explicit EXIT_SIGNAL: true to exit

Circuit Breaker Pattern

Track your own progress and halt when stuck:

StateConditionAction
CLOSEDNormal operationContinue executing
HALF_OPEN2 loops without progressIncrease scrutiny
OPENThreshold exceededHALT immediately

Halt Thresholds

TriggerThresholdMeaning
No progress loops3 consecutiveSpinning wheels
Identical errors5 consecutiveStuck on same issue
Test-only loops3 consecutiveNot implementing
Output decline>70% dropSomething's wrong

Progress Detection

Track mentally each loop:

  • Files modified (0 = no progress)
  • Tests changed (pass/fail delta)
  • Tasks completed (fix plan updates)
  • Errors encountered (same vs different)

Structured Status Reporting

Every response MUST end with:

## Status Report

STATUS: IN_PROGRESS | COMPLETE | BLOCKED
LOOP: [N]
CIRCUIT: CLOSED | HALF_OPEN | OPEN
EXIT_SIGNAL: false | true

TASKS_COMPLETED: [what you finished]
FILES_MODIFIED: [count and list]
TESTS: [X/Y passing]
ERRORS: [count or "none"]

PROGRESS_INDICATORS:
- [x] Files changed this loop
- [ ] Tests improved
- [ ] Tasks marked complete
- [ ] No repeated errors

NEXT: [next action or "done"]

Exit Signal Checklist

Before setting

EXIT_SIGNAL: true
, verify ALL:

□ All fix_plan.md items complete (or task done if no plan)
□ All tests passing (or code works if no tests)
□ No execution errors
□ All requirements implemented
□ No meaningful work remaining

If ANY unchecked → EXIT_SIGNAL: false

Work Focus Hierarchy

ActivityEffortPriority
Implementation60-70%PRIMARY
Testing15-20%Secondary
Fix Plan Updates5-10%Tracking
Documentation0-5%Only if needed
Cleanup0-10%After core work

Anti-Patterns to Avoid

  • Premature exit: Tests pass but tasks remain
  • Infinite loops: Not detecting repeated failures
  • Busy work: Testing without implementing
  • Silent failures: Not reporting errors clearly
  • Scope creep: Adding unplanned work
  • Analysis paralysis: Over-researching instead of implementing

Fix Plan Integration

Maintain

fix_plan.md
:

## High Priority

- [ ] Critical task

## Medium Priority

- [ ] Supporting task

## Completed

- [x] Done item

Empty fix plan + passing tests = consider exit

Example: Why Dual-Gate Matters

Loop 5:
  Output: "Auth complete! Moving to sessions."
  Indicators: 3 (tests pass, "complete", no errors)
  EXIT_SIGNAL: false (Claude continuing)
  Result: CONTINUE ✅ (respects intent)

Loop 8:
  Output: "All done, tests green, ready for review."
  Indicators: 4 (all signals present)
  EXIT_SIGNAL: true (Claude done)
  Result: EXIT ✅ (both conditions met)

Recovery Protocols

If BLOCKED

  1. State: "I am blocked because [reason]"
  2. List what you tried (min 2 approaches)
  3. Suggest alternatives
  4. Set STATUS: BLOCKED, EXIT_SIGNAL: false
  5. Wait for input

If Circuit Breaker OPENS

  1. State: "Circuit breaker OPEN - halting"
  2. Summarize accomplishments
  3. Describe stagnation pattern
  4. Set CIRCUIT: OPEN, EXIT_SIGNAL: false
  5. Recommend next steps

Never infinite loop on a blocker.