[PR #125] [MERGED] feat(config): add args support for per-hat backend configurations #151

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

📋 Pull Request Information

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

Base: mainHead: feat/hat-backend-args


📝 Commits (7)

  • 1453774 feat: Improve ralph tools task list CLI
  • 94533c8 docs(tasks): mark context injection and event isolation tasks as completed
  • cdc88ce docs: persist new memories
  • 9885418 feat(cli): add custom backend args support for ralph run
  • 4c10b18 Merge branch 'ralph/ralph-20260126-010840-e328'
  • e9cf17c Merge branch 'ralph/ralph-20260126-143849-3ce8'
  • d4345bd feat(config): add args support for per-hat backend configurations

📊 Changes

11 files changed (+463 additions, -70 deletions)

View changed files

📝 .agent/memories.md (+12 -0)
📝 .agent/tasks.jsonl (+1 -0)
📝 crates/ralph-adapters/src/cli_backend.rs (+106 -6)
📝 crates/ralph-cli/src/loop_runner.rs (+7 -1)
📝 crates/ralph-cli/src/main.rs (+9 -1)
📝 crates/ralph-cli/src/task_cli.rs (+240 -51)
📝 crates/ralph-cli/src/tools.rs (+1 -1)
📝 crates/ralph-core/src/config.rs (+80 -4)
📝 crates/ralph-core/src/hatless_ralph.rs (+1 -0)
📝 tasks/context-file-injection.code-task.md (+3 -3)
📝 tasks/event-isolation-e2e-tests.code-task.md (+3 -3)

📄 Description

Summary

  • Add the ability to specify additional CLI arguments for named backends (claude, gemini, kiro, etc.) at the per-hat level, not just for custom backends
  • Backwards compatible - existing string form still works

New YAML Syntax

# Named backend with args (NEW)
hats:
  builder:
    backend:
      type: "claude"
      args: ["--model", "claude-sonnet-4"]

# KiroAgent with args (NEW)
hats:
  reviewer:
    backend:
      type: "kiro"
      agent: "reviewer"
      args: ["--verbose"]

# Existing formats still work
hats:
  simple:
    backend: "claude"

Changes

  • Add NamedWithArgs variant to HatBackend enum for named backends with args
  • Add args field to KiroAgent variant
  • Update kiro_with_agent() to accept extra_args parameter
  • Add from_name_with_args() helper method to CliBackend
  • Update from_hat_backend() to handle new variants

Test plan

  • Unit tests for new parsing variants pass
  • Backwards compatibility tests pass (string form still works)
  • Smoke tests pass
  • Clippy passes with no warnings

🔄 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/125 **Author:** [@mikeyobrien](https://github.com/mikeyobrien) **Created:** 1/27/2026 **Status:** ✅ Merged **Merged:** 1/27/2026 **Merged by:** [@mikeyobrien](https://github.com/mikeyobrien) **Base:** `main` ← **Head:** `feat/hat-backend-args` --- ### 📝 Commits (7) - [`1453774`](https://github.com/mikeyobrien/ralph-orchestrator/commit/1453774df4ec713d90ab74e5c4cbe39a1a8fd3a2) feat: Improve ralph tools task list CLI - [`94533c8`](https://github.com/mikeyobrien/ralph-orchestrator/commit/94533c83692cd420339b3c8b223cb912b7e9b898) docs(tasks): mark context injection and event isolation tasks as completed - [`cdc88ce`](https://github.com/mikeyobrien/ralph-orchestrator/commit/cdc88ce88c36c22c6f239bf66f9ef26828faec68) docs: persist new memories - [`9885418`](https://github.com/mikeyobrien/ralph-orchestrator/commit/988541883f328b897b034cbb0f8dbc8bc6046a9c) feat(cli): add custom backend args support for ralph run - [`4c10b18`](https://github.com/mikeyobrien/ralph-orchestrator/commit/4c10b180e5bd9fff9e93c961b0dbb80129ba567e) Merge branch 'ralph/ralph-20260126-010840-e328' - [`e9cf17c`](https://github.com/mikeyobrien/ralph-orchestrator/commit/e9cf17ca9ee73ba1dfffd96dc58b5886486be86f) Merge branch 'ralph/ralph-20260126-143849-3ce8' - [`d4345bd`](https://github.com/mikeyobrien/ralph-orchestrator/commit/d4345bd702ebbb86d5fac18b095f501be82b6b14) feat(config): add args support for per-hat backend configurations ### 📊 Changes **11 files changed** (+463 additions, -70 deletions) <details> <summary>View changed files</summary> 📝 `.agent/memories.md` (+12 -0) 📝 `.agent/tasks.jsonl` (+1 -0) 📝 `crates/ralph-adapters/src/cli_backend.rs` (+106 -6) 📝 `crates/ralph-cli/src/loop_runner.rs` (+7 -1) 📝 `crates/ralph-cli/src/main.rs` (+9 -1) 📝 `crates/ralph-cli/src/task_cli.rs` (+240 -51) 📝 `crates/ralph-cli/src/tools.rs` (+1 -1) 📝 `crates/ralph-core/src/config.rs` (+80 -4) 📝 `crates/ralph-core/src/hatless_ralph.rs` (+1 -0) 📝 `tasks/context-file-injection.code-task.md` (+3 -3) 📝 `tasks/event-isolation-e2e-tests.code-task.md` (+3 -3) </details> ### 📄 Description ## Summary - Add the ability to specify additional CLI arguments for named backends (claude, gemini, kiro, etc.) at the per-hat level, not just for custom backends - Backwards compatible - existing string form still works ## New YAML Syntax ```yaml # Named backend with args (NEW) hats: builder: backend: type: "claude" args: ["--model", "claude-sonnet-4"] # KiroAgent with args (NEW) hats: reviewer: backend: type: "kiro" agent: "reviewer" args: ["--verbose"] # Existing formats still work hats: simple: backend: "claude" ``` ## Changes - Add `NamedWithArgs` variant to `HatBackend` enum for named backends with args - Add `args` field to `KiroAgent` variant - Update `kiro_with_agent()` to accept `extra_args` parameter - Add `from_name_with_args()` helper method to `CliBackend` - Update `from_hat_backend()` to handle new variants ## Test plan - [x] Unit tests for new parsing variants pass - [x] Backwards compatibility tests pass (string form still works) - [x] Smoke tests pass - [x] Clippy passes with no warnings --- <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:25 +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#151
No description provided.