[PR #97] [MERGED] Modularize codebase, fix TUI mode, and add documentation #132

Closed
opened 2026-02-27 10:22:21 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mikeyobrien/ralph-orchestrator/pull/97
Author: @mikeyobrien
Created: 1/22/2026
Status: Merged
Merged: 1/22/2026
Merged by: @mikeyobrien

Base: mainHead: feat/modularization-and-docs


📝 Commits (6)

  • fb41da3 feat: add prompt guidance for task breakdown and state management
  • 46dc5fc refactor: modularize ralph-cli and ralph-core for improved code organization
  • a2d0e4b fix(adapters): use TUI mode for opencode_interactive backend
  • 9cc59c9 docs: add Custom Backends and Per-Hat Configuration section to README
  • b004258 docs: add orchestration patterns documentation and bugfix preset
  • 555340a Merge branch 'main' into feat/modularization-and-docs

📊 Changes

19 files changed (+5342 additions, -4249 deletions)

View changed files

📝 .agent/memories.md (+12 -0)
.agent/summary.md (+0 -34)
📝 .agent/tasks.jsonl (+13 -0)
.claude/skills/create-hat-collection/SKILL.md (+227 -0)
.claude/skills/creating-hat-collections/SKILL.md (+0 -207)
📝 .gitignore (+5 -0)
📝 AGENTS.md (+1 -0)
📝 README.md (+482 -0)
📝 crates/ralph-adapters/src/cli_backend.rs (+44 -9)
crates/ralph-cli/src/display.rs (+427 -0)
crates/ralph-cli/src/loop_runner.rs (+1013 -0)
📝 crates/ralph-cli/src/main.rs (+42 -1353)
crates/ralph-core/src/event_loop.rs (+0 -2646)
crates/ralph-core/src/event_loop/loop_state.rs (+77 -0)
crates/ralph-core/src/event_loop/mod.rs (+1230 -0)
crates/ralph-core/src/event_loop/tests.rs (+1367 -0)
📝 crates/ralph-core/src/hatless_ralph.rs (+68 -0)
presets/bugfix.yml (+188 -0)
tasks/context-file-injection.code-task.md (+146 -0)

📄 Description

Summary

  • Refactor: Modularize ralph-cli and ralph-core for improved code organization - splits monolithic files into focused modules (display.rs, loop_runner.rs, event_loop submodules)
  • Fix: Use TUI mode for opencode_interactive backend adapter
  • Docs: Add comprehensive Custom Backends and Per-Hat Configuration section to README
  • Docs: Add orchestration patterns documentation and new bugfix.yml preset
  • Feat: Add prompt guidance for task breakdown and state management

Changes

Code Organization

  • Split ralph-cli/src/main.rs (1394 lines) into focused modules:
    • display.rs - Display and formatting logic
    • loop_runner.rs - Loop execution logic
  • Split ralph-core/src/event_loop.rs (2646 lines) into:
    • event_loop/mod.rs - Core event loop logic
    • event_loop/loop_state.rs - Loop state management
    • event_loop/tests.rs - Unit tests
  • Added hatless_ralph.rs for non-hat Ralph functionality

Bug Fixes

  • Fixed opencode_interactive backend to use TUI mode instead of stream mode

Documentation

  • Added Custom Backends and Per-Hat Configuration section to README
  • Added new bugfix.yml preset for debugging workflows
  • Renamed skill folder from creating-hat-collections to create-hat-collection

New Files

  • presets/bugfix.yml - Preset for debugging and bugfix workflows
  • tasks/context-file-injection.code-task.md - Task spec for context injection

Test plan

  • Run cargo build - verify compilation succeeds
  • Run cargo test - verify all tests pass
  • Run cargo test -p ralph-core smoke_runner - verify smoke tests pass
  • Verify ralph run works with existing configs

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mikeyobrien/ralph-orchestrator/pull/97 **Author:** [@mikeyobrien](https://github.com/mikeyobrien) **Created:** 1/22/2026 **Status:** ✅ Merged **Merged:** 1/22/2026 **Merged by:** [@mikeyobrien](https://github.com/mikeyobrien) **Base:** `main` ← **Head:** `feat/modularization-and-docs` --- ### 📝 Commits (6) - [`fb41da3`](https://github.com/mikeyobrien/ralph-orchestrator/commit/fb41da3fdbdb78c79ca55a259489693ed4f693b2) feat: add prompt guidance for task breakdown and state management - [`46dc5fc`](https://github.com/mikeyobrien/ralph-orchestrator/commit/46dc5fc4bba33935a5a7a5689deb7446432e9601) refactor: modularize ralph-cli and ralph-core for improved code organization - [`a2d0e4b`](https://github.com/mikeyobrien/ralph-orchestrator/commit/a2d0e4bb5452c849bfe7b353c504bcc9013e053a) fix(adapters): use TUI mode for opencode_interactive backend - [`9cc59c9`](https://github.com/mikeyobrien/ralph-orchestrator/commit/9cc59c90a137ea08bc4e12446b44c4fe29afe9c9) docs: add Custom Backends and Per-Hat Configuration section to README - [`b004258`](https://github.com/mikeyobrien/ralph-orchestrator/commit/b004258f8d9f1301478f2d92c1b9459ad3e0f203) docs: add orchestration patterns documentation and bugfix preset - [`555340a`](https://github.com/mikeyobrien/ralph-orchestrator/commit/555340a0d3669f5ce6ea577683aa37846fd8707d) Merge branch 'main' into feat/modularization-and-docs ### 📊 Changes **19 files changed** (+5342 additions, -4249 deletions) <details> <summary>View changed files</summary> 📝 `.agent/memories.md` (+12 -0) ➖ `.agent/summary.md` (+0 -34) 📝 `.agent/tasks.jsonl` (+13 -0) ➕ `.claude/skills/create-hat-collection/SKILL.md` (+227 -0) ➖ `.claude/skills/creating-hat-collections/SKILL.md` (+0 -207) 📝 `.gitignore` (+5 -0) 📝 `AGENTS.md` (+1 -0) 📝 `README.md` (+482 -0) 📝 `crates/ralph-adapters/src/cli_backend.rs` (+44 -9) ➕ `crates/ralph-cli/src/display.rs` (+427 -0) ➕ `crates/ralph-cli/src/loop_runner.rs` (+1013 -0) 📝 `crates/ralph-cli/src/main.rs` (+42 -1353) ➖ `crates/ralph-core/src/event_loop.rs` (+0 -2646) ➕ `crates/ralph-core/src/event_loop/loop_state.rs` (+77 -0) ➕ `crates/ralph-core/src/event_loop/mod.rs` (+1230 -0) ➕ `crates/ralph-core/src/event_loop/tests.rs` (+1367 -0) 📝 `crates/ralph-core/src/hatless_ralph.rs` (+68 -0) ➕ `presets/bugfix.yml` (+188 -0) ➕ `tasks/context-file-injection.code-task.md` (+146 -0) </details> ### 📄 Description ## Summary - **Refactor**: Modularize `ralph-cli` and `ralph-core` for improved code organization - splits monolithic files into focused modules (`display.rs`, `loop_runner.rs`, event_loop submodules) - **Fix**: Use TUI mode for `opencode_interactive` backend adapter - **Docs**: Add comprehensive Custom Backends and Per-Hat Configuration section to README - **Docs**: Add orchestration patterns documentation and new `bugfix.yml` preset - **Feat**: Add prompt guidance for task breakdown and state management ## Changes ### Code Organization - Split `ralph-cli/src/main.rs` (1394 lines) into focused modules: - `display.rs` - Display and formatting logic - `loop_runner.rs` - Loop execution logic - Split `ralph-core/src/event_loop.rs` (2646 lines) into: - `event_loop/mod.rs` - Core event loop logic - `event_loop/loop_state.rs` - Loop state management - `event_loop/tests.rs` - Unit tests - Added `hatless_ralph.rs` for non-hat Ralph functionality ### Bug Fixes - Fixed `opencode_interactive` backend to use TUI mode instead of stream mode ### Documentation - Added Custom Backends and Per-Hat Configuration section to README - Added new `bugfix.yml` preset for debugging workflows - Renamed skill folder from `creating-hat-collections` to `create-hat-collection` ### New Files - `presets/bugfix.yml` - Preset for debugging and bugfix workflows - `tasks/context-file-injection.code-task.md` - Task spec for context injection ## Test plan - [x] Run `cargo build` - verify compilation succeeds - [x] Run `cargo test` - verify all tests pass - [x] Run `cargo test -p ralph-core smoke_runner` - verify smoke tests pass - [x] Verify `ralph run` works with existing configs --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 10:22:21 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ralph-orchestrator#132
No description provided.