[PR #103] [MERGED] feat(prompt): add OBJECTIVE section to prevent goal drift #134

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

📋 Pull Request Information

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

Base: mainHead: feat/objective-section


📝 Commits (1)

  • 67ae634 feat(prompt): add OBJECTIVE section to prevent goal drift

📊 Changes

1 file changed (+222 additions, -26 deletions)

View changed files

📝 crates/ralph-core/src/hatless_ralph.rs (+222 -26)

📄 Description

Summary

  • Extract objective from task.start event and add prominent ## OBJECTIVE section at start of prompt
  • Reinforce objective in ## DONE section using bookend pattern
  • Prevents Ralph from losing sight of original user prompt that was getting buried in PENDING EVENTS

Problem

Ralph was losing sight of the original user prompt because it was buried in PENDING EVENTS alongside other events. The workflow mechanics and hat instructions dominated the prompt, causing the agent to focus on process over purpose.

Solution

The bookend pattern ensures the user's goal appears both early (for orientation) and late (for completion validation).

Test plan

  • Run smoke tests: cargo test -p ralph-core smoke_runner
  • Verify OBJECTIVE section appears in generated prompts

🔄 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/103 **Author:** [@mikeyobrien](https://github.com/mikeyobrien) **Created:** 1/24/2026 **Status:** ✅ Merged **Merged:** 1/24/2026 **Merged by:** [@mikeyobrien](https://github.com/mikeyobrien) **Base:** `main` ← **Head:** `feat/objective-section` --- ### 📝 Commits (1) - [`67ae634`](https://github.com/mikeyobrien/ralph-orchestrator/commit/67ae634285f24becbc2f79c51671b9c3f1206639) feat(prompt): add OBJECTIVE section to prevent goal drift ### 📊 Changes **1 file changed** (+222 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `crates/ralph-core/src/hatless_ralph.rs` (+222 -26) </details> ### 📄 Description ## Summary - Extract objective from `task.start` event and add prominent `## OBJECTIVE` section at start of prompt - Reinforce objective in `## DONE` section using bookend pattern - Prevents Ralph from losing sight of original user prompt that was getting buried in PENDING EVENTS ## Problem Ralph was losing sight of the original user prompt because it was buried in PENDING EVENTS alongside other events. The workflow mechanics and hat instructions dominated the prompt, causing the agent to focus on process over purpose. ## Solution The bookend pattern ensures the user's goal appears both early (for orientation) and late (for completion validation). ## Test plan - [x] Run smoke tests: `cargo test -p ralph-core smoke_runner` - [x] Verify OBJECTIVE section appears in generated prompts --- <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:22 +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#134
No description provided.