Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
pixel-process-ug avatar

Autonomous Loop

  • 76 installs
  • 1 repo stars
  • Updated March 16, 2026
  • pixel-process-ug/superkit-agents

Helps with ai & agent building tasks.

About

autonomous-loop is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.

  • autonomous-loop
  • AI & Agent Building
  • AI-coding skill

Autonomous Loop by the numbers

  • 76 all-time installs (skills.sh)
  • +2 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #5,442 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/pixel-process-ug/superkit-agents --skill autonomous-loop

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs76
repo stars1
Last updatedMarch 16, 2026
Repositorypixel-process-ug/superkit-agents

What it does

Helps with ai & agent building tasks.

Files

SKILL.mdMarkdownGitHub ↗

Autonomous Loop

Overview

The autonomous loop implements Ralph's iterative development methodology. Each iteration loads identical context (PROMPT + AGENTS files), executes one focused task, reports structured status, and persists state to disk for the next iteration. The loop continues until the dual-condition exit gate is satisfied. The core innovation is that deterministic conditions allow Claude to autonomously plan, build, and iterate toward quality without human intervention in the loop.

Announce at start: "I'm starting the autonomous loop. Loading context and beginning PLANNING mode."

Trigger Conditions

  • /ralph or /loop command invoked
  • Project has specs and is ready for iterative autonomous development
  • Multi-task implementation that benefits from autonomous iteration
  • User requests autonomous execution without per-task approval

---

Architecture

+--------------------------------------------------+
|                 AUTONOMOUS LOOP                    |
|                                                    |
|  +----------+    +----------+    +-----------+    |
|  | PLANNING |---→| BUILDING |---→|  STATUS   |    |
|  |   MODE   |    |   MODE   |    |  CHECK    |    |
|  +----------+    +----------+    +-----+-----+    |
|       ^                               |           |
|       |            +-----------+      |           |
|       +------------|  EXIT GATE|←-----+           |
|                    |  (dual)   |                   |
|                    +-----+-----+                   |
|                          |                         |
|                    PASS: EXIT                      |
|                    FAIL: LOOP                      |
+--------------------------------------------------+

---

Phase 1: PLANNING MODE (Gap Analysis)

Goal: Analyze specs against implementation to identify and prioritize remaining work.

<HARD-GATE> Planning mode produces NO implementation code. It is analysis and planning ONLY. </HARD-GATE>

Steps

1. Knowledge Gathering — Deploy up to 250 parallel subagents via the Agent tool (with subagent_type="Explore" and model="sonnet") to study specs, existing implementation plans, and utility libraries 2. Code Analysis — Deploy up to 500 parallel subagents via the Agent tool (with subagent_type="Explore") to study src/* against specs/*, identifying gaps between specification and implementation 3. Synthesis — Deploy a synthesis subagent via the Agent tool (with model="opus") to synthesize findings and prioritize incomplete work 4. Plan Refresh — Update IMPLEMENTATION_PLAN.md as organized, prioritized bullet list

Planning Mode Constraints

ConstraintRationale
Verify ALL assumptions through code searchNever assume something is absent
Treat src/lib as authoritative standard libraryConsolidate, do not duplicate
Output is a prioritized task listNot code, not designs — tasks only
Identify missing specsSpecs gaps are blockers, not things to guess about

Planning Mode Output

IMPLEMENTATION_PLAN.md updated:
- [x] Completed tasks (checked off)
- [ ] Remaining task 1 (highest priority)
- [ ] Remaining task 2
- [ ] Remaining task 3
...
Missing specs identified: [list or "none"]

STOP — Do NOT proceed to Phase 2 until:

  • [ ] All specs have been read and analyzed
  • [ ] Code has been compared against specs
  • [ ] IMPLEMENTATION_PLAN.md is updated with prioritized tasks
  • [ ] Missing specs are identified (if any)

---

Phase 2: BUILDING MODE (Implementation)

Goal: Select and complete exactly ONE task per iteration.

"ONE Task Per Loop" Principle

Each iteration selects and completes exactly one task from IMPLEMENTATION_PLAN.md. This reduces context switching, enables clear progress measurement, and makes debugging easier.

Steps

1. Study — Read specs and current IMPLEMENTATION_PLAN.md 2. Select — Choose the most important remaining task 3. Search — Find existing code patterns (do NOT assume implementations are missing) 4. Implement — Write complete, production-quality code (no placeholders, no stubs) 5. Test — Run tests immediately after implementation 6. Update — Refresh IMPLEMENTATION_PLAN.md with findings and progress 7. Commit — Descriptive conventional commit message with rationale

Task Selection Decision Table

ConditionWhich Task to Select
Blocker exists for other tasksSelect the blocker task
Test failures existSelect task that fixes the failure
All tasks independentSelect highest priority task
Multiple tasks at same prioritySelect the one with clearest spec
Spec is missing for top taskRun PLANNING mode to identify gap

Subagent Rules During Building

ResourceBudgetRationale
Read/search subagentsUp to 500 parallel SonnetFast context gathering
Build subagentOnly 1 Sonnet at a timeSerialize builds to detect failures
Main context40-60% utilizationThe "smart zone" — enough room to think

Building Mode Constraints

ConstraintRationale
No placeholders or stubsEvery line of code is production-quality
Search before implementingCode may already exist elsewhere
Run tests immediatelyBackpressure catches errors early
Update plan after every taskKeep plan current with reality
Commit after every taskSmall atomic commits, easy to revert

STOP — Do NOT proceed to Phase 3 until:

  • [ ] Task is fully implemented (no stubs)
  • [ ] Tests have been run
  • [ ] IMPLEMENTATION_PLAN.md is updated
  • [ ] Changes are committed

---

Phase 3: STATUS CHECK

Goal: Produce a RALPH_STATUS block and evaluate exit conditions.

After each BUILD iteration, invoke the ralph-status skill to produce a structured status block.

Exit Evaluation

CheckConditionResult
Tasks remaining?IMPLEMENTATION_PLAN.md has unchecked itemsContinue loop
Tests passing?Full test suite passesRequired for exit
Errors in iteration?Clean execution, no unresolved exceptionsRequired for exit
Meaningful work remains?No TODOs, no incomplete featuresRequired for exit

Loop Decision

StatusTasks RemainingTestsAction
IN_PROGRESSYesAnyLoop back to Phase 1 or 2
IN_PROGRESSNoFAILINGLoop — fix failures first
BLOCKEDAnyAnyReport blocker, wait for input
COMPLETENoPASSINGEvaluate exit gate

---

Exit Conditions — Dual-Condition Gate

<HARD-GATE> Both conditions must be true simultaneously to exit the loop: </HARD-GATE>

ConditionThresholdVerification
Completion indicators>= 2 recent occurrences of "done" languageHeuristic detection in output
Explicit EXIT_SIGNALEXIT_SIGNAL: true in status blockIntentional declaration

EXIT_SIGNAL May Only Be true When ALL Of:

  • IMPLEMENTATION_PLAN.md has no remaining tasks
  • All tests pass
  • No errors in latest iteration
  • No meaningful work remains

This prevents false positives where completion language appears while productive work continues.

Exit Decision Table

Completion LanguageEXIT_SIGNALAction
< 2 occurrencesfalseContinue loop
>= 2 occurrencesfalseContinue — may be casual language
< 2 occurrencestrueContinue — signal without evidence
>= 2 occurrencestrueEXIT the loop

---

Context Efficiency

ResourceBudgetStrategy
Main context40-60% of windowKeep focused; delegate heavy lifting
Read subagentsUp to 500 parallelSearching, file reading, pattern matching
Build subagents1 at a timeImplementation, test execution
Token formatMarkdown over JSON~30% more efficient

---

Steering Mechanisms

Upstream Steering (Shaping Inputs)

MechanismPurpose
First ~5,000 tokens for detailed specsFront-load specification context
Identical files each iterationDeterministic context loading
Existing code patterns as guidesGenerate consistent code

Downstream Steering (Validation Gates)

GateWhat It Catches
TestsInvalid implementations
BuildsCompilation errors
LintersStyle inconsistencies
TypecheckersContract violations
LLM-as-judgeSubjective quality issues

---

State Persistence

The only persistent state between iterations is the file system:

FilePurposeManaged By
IMPLEMENTATION_PLAN.mdTask list and progressPlanning and Building modes
specs/*.mdSpecification filesspec-writing skill
AGENTS.mdOperational notes and learningsBuilding mode
Source code + testsThe actual implementationBuilding mode

IMPLEMENTATION_PLAN.md is disposable — it can be regenerated from specs at any time by running a planning iteration.

---

Anti-Patterns / Common Mistakes

Anti-PatternWhy It FailsCorrect Approach
Multiple tasks per iterationContext switching, unclear progressONE task per loop
Assuming code is missingMay exist elsewhere, leads to duplicationAlways search first
Skipping tests after implementationBugs accumulate, no backpressureRun tests IMMEDIATELY
Modifying plan only during planningPlan drifts from realityUpdate during BOTH planning and building
Keeping stale plansTasks based on outdated assumptionsRegenerate liberally — planning is cheap
Manual context managementMain context overflowsTrust subagent delegation
Exiting without dual-conditionPremature exit, work incompleteBoth conditions must be true
Not committing after each taskLarge changesets, hard to revertCommit every iteration
Placeholder or stub codeIncomplete implementations accumulateProduction-quality code only
Skipping STATUS CHECKNo exit evaluation, loop runs foreverEvery iteration ends with status

---

Anti-Rationalization Guards

<HARD-GATE> Do NOT exit the loop without the dual-condition gate passing. Do NOT implement more than one task per iteration. Do NOT write placeholder or stub code. Do NOT skip the STATUS CHECK. </HARD-GATE>

If you catch yourself thinking:

  • "I can do two quick tasks in this iteration..." — No. ONE task per loop.
  • "The plan is probably fine, skip planning mode..." — Verify. Plans drift.
  • "Tests can wait until the next iteration..." — Run tests NOW. Backpressure is essential.
  • "Everything is done, I can exit..." — Check the dual-condition gate. Both must be true.

---

Subagent Dispatch Opportunities

Task PatternDispatch ToWhen
Independent file reads across codebaseAgent tool with subagent_type="Explore"When loop iteration needs context from multiple areas
Test execution during build phaseBash tool with run_in_background=trueWhen tests can validate work without blocking progress
Code review between iterationsAgent tool dispatching code-reviewer agentAfter completing a build iteration, before next planning

Follow the dispatching-parallel-agents skill protocol when dispatching.

---

Integration Points

SkillRelationshipWhen
ralph-statusPer-iteration — produces status blocksPhase 3: STATUS CHECK
circuit-breakerSafety net — monitors loop healthHalts on stagnation
spec-writingUpstream — creates specs consumed by planningBefore loop starts
acceptance-testingValidation — validates behavioral outcomesDuring building mode
resilient-executionPer-task — retry on failureWhen task implementation fails
task-managementTracking — tracks individual tasksWithin iterations
llm-as-judgeQuality — evaluates subjective criteriaDownstream steering
verification-before-completionFinal gate — verifies completion claimBefore EXIT_SIGNAL: true

---

Concrete Examples

Example: Planning Mode Output

IMPLEMENTATION_PLAN.md:
- [x] Set up project structure
- [x] Implement core data types
- [ ] Implement user authentication (P0 — blocks 3 other tasks)
- [ ] Add API rate limiting (P1)
- [ ] Implement webhook handlers (P1)
- [ ] Add monitoring and logging (P2)

Missing specs: Rate limiting spec needs error response format defined.

Example: Building Mode Iteration

Task selected: Implement user authentication
Searched: Found existing password hashing in src/lib/crypto.ts
Implemented: src/auth/service.ts, src/auth/middleware.ts
Tests: 8 passing, 0 failing
Committed: feat(auth): implement JWT-based user authentication

Updated IMPLEMENTATION_PLAN.md:
- [x] Implement user authentication

Example: Status Block

---RALPH_STATUS---
STATUS: IN_PROGRESS
TASKS_COMPLETED_THIS_LOOP: 1
FILES_MODIFIED: 4
TESTS_STATUS: PASSING
WORK_TYPE: IMPLEMENTATION
EXIT_SIGNAL: false
RECOMMENDATION: Next: implement API rate limiting (P1)
---END_RALPH_STATUS---

---

Skill Type

RIGID — Follow this process exactly. The determinism of the loop depends on consistent execution. ONE task per loop. Status block every iteration. Dual-condition exit gate. No exceptions.

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.