Skip to content

feat: Add Ralph Loop executor mode to run command#41

Merged
etylsarin merged 1 commit intomainfrom
feat/ralph-loop-executor
Mar 7, 2026
Merged

feat: Add Ralph Loop executor mode to run command#41
etylsarin merged 1 commit intomainfrom
feat/ralph-loop-executor

Conversation

@etylsarin
Copy link
Owner

Summary

Implements the Ralph Loop pattern as a new execution mode for opencastle run.

Changes

  • New loop executor with backpressure gating
  • CLI flags: --mode loop, --max-iterations N
  • 23 new schema validation tests
  • 228/228 tests pass, TypeScript: 0 errors

Add loop execution mode (mode: loop) to opencastle run, implementing the
Ralph Loop pattern for autonomous iterative agent workflows.

New features:
- LoopConfig schema with max_iterations, prompt file, backpressure commands
- Loop executor with fresh session per iteration, prompt re-read from disk
- Backpressure gating (tests, typecheck, lint must pass between iterations)
- Graceful SIGINT shutdown with active task/process cleanup
- Loop reporter with iteration progress and JSON report output
- CLI flags: --mode loop, --max-iterations N
- Dry-run support for loop specs
- 23 new schema validation tests (69 total in schema.test.ts)
@etylsarin etylsarin merged commit 909350d into main Mar 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant