Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .agent/scripts/commands/full-loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,31 @@

Task/Prompt: $ARGUMENTS

## Step 0: Resolve Task ID and Set Session Title

**IMPORTANT**: Before proceeding, check if the argument is a task ID (matches pattern `t\d+` like `t061`).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If users run /full-loop t061 --max-task-iterations 30, $ARGUMENTS may include flags, so the t\d+ check and TODO lookup could fail or produce a noisy session title. Consider clarifying that the check/lookup should use only the first positional token (the task ID) rather than the entire raw argument string.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎


If the argument is a task ID:

1. Look up the task description from TODO.md:
```bash

Check notice on line 18 in .agent/scripts/commands/full-loop.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.agent/scripts/commands/full-loop.md#L18

Fenced code blocks should be surrounded by blank lines
grep "^- \[ \] $ARGUMENTS " TODO.md 2>/dev/null | head -1 | sed 's/^- \[ \] [^ ]* //'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The current grep command only finds open tasks (- [ ]). This might be too restrictive if a user wants to re-run a loop on a completed (- [x]) or declined (- [-]) task. Using grep -E with an extended regular expression would make this more robust by matching any of these task states. The sed command should also be updated accordingly to handle these cases.

Suggested change
grep "^- \[ \] $ARGUMENTS " TODO.md 2>/dev/null | head -1 | sed 's/^- \[ \] [^ ]* //'
grep -E "^- \[( |x|-)\] $ARGUMENTS " TODO.md 2>/dev/null | head -1 | sed -E 's/^- \[( |x|-)\] [^ ]* //'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This grep will return empty if the task is marked complete (- [x]) or if the TODO line doesn’t match the exact spacing, which would leave the session title without a description. Consider documenting a fallback behavior when no description is found (e.g., keep the ID-only title) to avoid blank/incorrect titles.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

```
Comment thread
coderabbitai[bot] marked this conversation as resolved.

2. Use the task description (not just the ID) for the session title. Call the `session-rename` tool with a descriptive title like:
- Good: `"t061: Improve session title to include task description"`
- Bad: `"Full loop development for t061"`

Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
3. Store the full task description for use in subsequent steps.

If the argument is NOT a task ID (it's a description):
- Use the description directly for the session title
- Call `session-rename` with a concise version if the description is very long (truncate to ~60 chars)

**Example session titles:**
- Task ID `t061` with description "Improve session title format" → `"t061: Improve session title format"`
- Description "Add JWT authentication" → `"Add JWT authentication"`

## Full Loop Phases

```text
Expand Down
11 changes: 9 additions & 2 deletions .agent/scripts/generate-opencode-commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,8 @@ Start a Ralph loop for iterative development.

Arguments: $ARGUMENTS

**Session Title**: Set a descriptive session title using `session-rename` tool. Use a concise version of the prompt (truncate to ~60 chars if needed).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since /ralph-task already sets the session title to t042: …, this /ralph-loop instruction may overwrite that more specific title when the loop is started. Consider clarifying precedence (don’t rename if a task-prefixed title is already set) so task IDs remain visible.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎


**Usage:**
```bash
/ralph-loop "<prompt>" --max-iterations <n> --completion-promise "<text>"
Expand Down Expand Up @@ -1358,7 +1360,8 @@ Task ID: $ARGUMENTS
**Workflow:**
1. Find task in TODO.md by ID (e.g., t042)
2. Extract ralph metadata (promise, verify command, max iterations)
3. Start Ralph loop with extracted parameters
3. **Set session title** using `session-rename` tool with format: `"t042: Task description here"`
4. Start Ralph loop with extracted parameters

**Task format in TODO.md:**
```markdown
Expand All @@ -1381,7 +1384,8 @@ Task ID: $ARGUMENTS
This will:
1. Read TODO.md and find task t042
2. Extract the ralph-promise, ralph-verify, ralph-max values
3. Start: `/ralph-loop "{task description}" --completion-promise "{promise}" --max-iterations {max}`
3. Set session title to `"t042: {task description}"` using `session-rename` tool
4. Start: `/ralph-loop "{task description}" --completion-promise "{promise}" --max-iterations {max}`

**Requirements:**
- Task must have `#ralph` tag
Expand All @@ -1405,6 +1409,8 @@ Read ~/.aidevops/agents/scripts/commands/full-loop.md and follow its instruction

Start a full development loop for: $ARGUMENTS

**IMPORTANT - Session Title**: If the argument is a task ID (like `t061`), look up the task description from TODO.md and use it for the session title. Call `session-rename` with format: `"t061: Task description here"` instead of just `"Full loop development for t061"`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This instruction about the session title duplicates the information recently added to .agent/scripts/commands/full-loop.md. To maintain a single source of truth and avoid potential inconsistencies in the future, it would be better to remove this summary. The existing instruction on line 1404 (Read ~/.aidevops/agents/scripts/commands/full-loop.md...) is sufficient to guide the agent.


**Full Loop Phases:**
```text
Task Development → Preflight → PR Create → PR Review → Postflight → Deploy
Expand All @@ -1414,6 +1420,7 @@ Task Development → Preflight → PR Create → PR Review → Postflight → De
```bash
/full-loop "Implement feature X with tests"
/full-loop "Fix bug Y" --max-task-iterations 30
/full-loop t061 # Will look up task description from TODO.md
```

**Options:**
Expand Down
Loading