loop

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package loop provides the command for generating Ralph loop scripts.

A Ralph loop is an iterative development technique where an AI assistant runs repeatedly with the same prompt until a completion signal is detected. This enables autonomous development where the AI builds on its previous work across multiple iterations.

How It Works

The generated script:

  1. Reads the prompt file (default: PROMPT.md)
  2. Runs the AI tool with the prompt
  3. Checks output for a completion signal
  4. Repeats until signal is detected or max iterations reached

Supported Tools

The loop command generates scripts for different AI tools:

  • claude: Claude Code CLI (default)
  • aider: Aider AI pair programming tool
  • generic: Template for custom tools

Completion Signal

The completion signal (default: "SYSTEM_CONVERGED") indicates the AI has finished its work. The AI should output this signal when it determines that the task is complete. The loop script watches for this signal and exits when detected.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmd

func Cmd() *cobra.Command

Cmd returns the "ctx loop" command for generating Ralph loop scripts.

Types

This section is empty.

Directories

Path Synopsis
cmd
root
Package root implements the ctx loop command.
Package root implements the ctx loop command.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL