Skip to content

Latest commit

 

History

History
526 lines (406 loc) · 16 KB

File metadata and controls

526 lines (406 loc) · 16 KB

Ralphing Examples & Output Samples

Visual examples of Ralphing's output and behavior in different modes.


Table of Contents

  1. Sequential Mode
  2. Parallel Mode
  3. Branch-per-Task Mode
  4. Status Indicators
  5. Error Handling
  6. Completion Summary

Sequential Mode

Basic Run

Command:

./ralphing.sh --verbose

Output:

[INFO] Found 5 tasks to process
[INFO] Base branch: main

>>> Task 1
    Completed: 0 | Remaining: 5
--------------------------------------------
  🔴⏺ ⠋ Reading code     │ Add user authentication [00:03]
  🟡⏺ ⠙ Implementing     │ Add user authentication [00:15]
  🟢⏺ ⠹ Writing tests    │ Add user authentication [00:28]
  🔵⏺ ⠸ Testing          │ Add user authentication [00:42]

  === Agent Status Update (0m 30s) ===
  Recent activity:
    Tool: Write
    File: auth.js
    Tool: Edit
    File: server.js
    Tool: Bash
    Cmd: npm test
  Current step: Testing

  🟣⏺ ⠼ Committing       │ Add user authentication [00:55]
  ✓ Done               │ Add user authentication

Successfully implemented user authentication with JWT tokens.
Created auth middleware, login/register endpoints, and tests.

>>> Task 2
    Completed: 1 | Remaining: 4
--------------------------------------------
  🔴⏺ ⠋ Thinking         │ Create database schema [00:01]
  ...

Key Features:

  • Colorful rotating ⏺ indicators (red → yellow → green → cyan → blue → magenta)
  • Real-time step detection (Reading code, Implementing, Testing, etc.)
  • 30-second detailed status updates
  • Elapsed time display [MM:SS]
  • Task completion counter

Parallel Mode

Running 3 Agents Concurrently

Command:

./ralphing.sh --parallel --max-parallel 3 --verbose

Output:

[INFO] Running 3 parallel agents (each in isolated worktree)...
[INFO] Found 6 tasks to process
[INFO] Base branch: main

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Batch 1: Spawning 3 parallel agents
Each agent runs in its own git worktree with isolated workspace
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ◉ Agent 1: Add user authentication
  ◉ Agent 2: Create database schema
  ◉ Agent 3: Build API endpoints

  ⠋ [🔴○ 🟢○ 🟡○ ] 3 setup | 0 running | 0 done | 0 failed | 00:05
  ⠙ [🔴⏺ 🟢⏺ 🟡⏺ ] 0 setup | 3 running | 0 done | 0 failed | 00:23

  === Parallel Agent Status Update (0m 30s) ===
  Agent 1: 🔴⏺ Running │ Add user authentication
  Agent 2: 🟢⏺ Running │ Create database schema
  Agent 3: 🟡⏺ Running │ Build API endpoints

  ⠹ [🔴⏺ 🟢⏺ 🟡⏺ ] 0 setup | 3 running | 0 done | 0 failed | 00:45

  === Parallel Agent Status Update (1m 0s) ===
  Agent 1: 🔴⏺ Running │ Add user authentication
  Agent 2: 🟢⏺ Running │ Create database schema
  Agent 3: 🟡⏺ Running │ Build API endpoints

  ⠸ [🔴⏺ 🟢✓ 🟡⏺ ] 0 setup | 2 running | 1 done | 0 failed | 01:18
  ⠼ [🔴⏺ 🟢✓ 🟡✓ ] 0 setup | 1 running | 2 done | 0 failed | 01:42
  ⠴ [🔴✓ 🟢✓ 🟡✓ ] 0 setup | 0 running | 3 done | 0 failed | 02:05

Batch 1 Results:
  ✓ Agent 1: Add user authentication → ralphing/agent-1-add-user-authentication
  ✓ Agent 2: Create database schema → ralphing/agent-2-create-database-schema
  ✓ Agent 3: Build API endpoints → ralphing/agent-3-build-api-endpoints

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Merging agent branches into main...

  Merging ralphing/agent-1-add-user-authentication... ✓ (merged)
  Merging ralphing/agent-2-create-database-schema... ✓ (merged)
  Merging ralphing/agent-3-build-api-endpoints... ✓ (merged)

All branches merged successfully!

Per-Agent Indicators:

  • = Setting up (colored by agent: red, green, yellow, blue, cyan, magenta)
  • = Running (colored by agent)
  • = Done (green)
  • = Failed (red)
  • · = Waiting (dim)

Branch-per-Task Mode

With Pull Request Creation

Command:

./ralphing.sh --branch-per-task --create-pr --draft-pr --base-branch main

Output:

>>> Task 1
    Completed: 0 | Remaining: 3
--------------------------------------------
[INFO] Working on branch: ralphing/add-user-authentication
  🔴⏺ ⠋ Implementing     │ Add user authentication [00:15]
  ✓ Done               │ Add user authentication

[INFO] Creating pull request for ralphing/add-user-authentication...
✓ PR created: https://github.com/user/repo/pull/123

>>> Task 2
    Completed: 1 | Remaining: 2
--------------------------------------------
[INFO] Working on branch: ralphing/create-database-schema
  🔴⏺ ⠋ Implementing     │ Create database schema [00:12]
  ✓ Done               │ Create database schema

[INFO] Creating pull request for ralphing/create-database-schema...
✓ PR created: https://github.com/user/repo/pull/124

>>> Task 3
    Completed: 2 | Remaining: 1
--------------------------------------------
[INFO] Working on branch: ralphing/build-api-endpoints
  🔴⏺ ⠋ Implementing     │ Build API endpoints [00:18]
  ✓ Done               │ Build API endpoints

[INFO] Creating pull request for ralphing/build-api-endpoints...
✓ PR created: https://github.com/user/repo/pull/125

✅ All tasks complete!

=== Session Summary ===
Tasks completed: 3
Branches created:
  • ralphing/add-user-authentication
  • ralphing/create-database-schema
  • ralphing/build-api-endpoints
Pull requests:
  • https://github.com/user/repo/pull/123
  • https://github.com/user/repo/pull/124
  • https://github.com/user/repo/pull/125

Status Indicators

Sequential Mode Progress

  🔴⏺ ⠋ Reading code     │ Task name [00:05]
  🟡⏺ ⠙ Implementing     │ Task name [00:15]
  🟢⏺ ⠹ Writing tests    │ Task name [00:25]
  🔵⏺ ⠸ Testing          │ Task name [00:35]
  🟣⏺ ⠼ Linting          │ Task name [00:45]
  🔴⏺ ⠴ Staging          │ Task name [00:50]
  🟡⏺ ⠦ Committing       │ Task name [00:55]
  ✓ Done               │ Task name

Color Scheme:

  • Cyan (Reading code, Thinking): Information gathering
  • Magenta (Implementing, Writing tests): Code generation
  • Yellow (Testing, Linting): Quality checks
  • Green (Staging, Committing): Git operations
  • Blue (Updating PRD, Logging): Housekeeping

Parallel Mode Progress

  ⠋ [🔴○ 🟢○ 🟡○ ] 3 setup | 0 running | 0 done | 0 failed | 00:05
  ⠙ [🔴⏺ 🟢⏺ 🟡⏺ ] 0 setup | 3 running | 0 done | 0 failed | 00:15
  ⠹ [🔴⏺ 🟢✓ 🟡⏺ ] 0 setup | 2 running | 1 done | 0 failed | 00:45
  ⠸ [🔴✓ 🟢✓ 🟡⏺ ] 0 setup | 1 running | 2 done | 0 failed | 01:15
  ⠼ [🔴✓ 🟢✓ 🟡✓ ] 0 setup | 0 running | 3 done | 0 failed | 01:35

Indicator Legend:

  • [🔴○ 🟢○ 🟡○] = All agents setting up
  • [🔴⏺ 🟢⏺ 🟡⏺] = All agents running
  • [🔴✓ 🟢✓ 🟡✓] = All agents done
  • [🔴✗ 🟢✓ 🟡⏺] = Agent 1 failed, Agent 2 done, Agent 3 running

30-Second Status Updates

Sequential Mode Update

  === Agent Status Update (0m 30s) ===
  Recent activity:
    Tool: Write
    File: auth.js
    Tool: Edit
    File: server.js
    Tool: Bash
    Cmd: npm test
  Current step: Testing

Parallel Mode Update

  === Parallel Agent Status Update (1m 30s) ===
  Agent 1: 🔴⏺ Running │ Add user authentication
  Agent 2: 🟢⏺ Running │ Create database schema
  Agent 3: 🟡✓ Completed │ Build API endpoints
  Agent 4: 🔵⏺ Running │ Add frontend components
  Agent 5: 🟣○ Setting up │ Write tests

Error Handling

API Error with Retry

>>> Task 1
    Completed: 0 | Remaining: 5
--------------------------------------------
  🔴⏺ ⠋ Implementing     │ Add user authentication [00:15]
[ERROR] API error: Rate limit exceeded (attempt 1/3)
[INFO] Retrying in 5s...
  🔴⏺ ⠋ Implementing     │ Add user authentication [00:20]
  ✓ Done               │ Add user authentication

Task Failure

>>> Task 3
    Completed: 2 | Remaining: 3
--------------------------------------------
  🔴⏺ ⠋ Implementing     │ Deploy to production [00:10]
[ERROR] Empty response (attempt 1/3)
[INFO] Retrying in 5s...
  🔴⏺ ⠋ Implementing     │ Deploy to production [00:15]
[ERROR] Empty response (attempt 2/3)
[INFO] Retrying in 5s...
  🔴⏺ ⠋ Implementing     │ Deploy to production [00:20]
[ERROR] Empty response (attempt 3/3)
[ERROR] Task failed after 3 attempts

Skipping to next task...

Parallel Mode Failure

Batch 1 Results:
  ✓ Agent 1: Add user authentication → ralphing/agent-1-add-user-authentication
  ✗ Agent 2: Create database schema (error below)
    ┌─ Agent 2 log:
    │ ERROR: Could not connect to database
    │ Connection refused at localhost:5432
    │ Ensure PostgreSQL is running
    └─
  ✓ Agent 3: Build API endpoints → ralphing/agent-3-build-api-endpoints

Conflict Resolution

Merge Conflict Menu

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Merging agent branches into main...

  Merging ralphing/agent-1-add-auth... ✓ (merged)
  Merging ralphing/agent-2-add-db... ✗ (conflict)
  Merging ralphing/agent-3-add-api... ✗ (conflict)

┌─────────────────────────────────────────────────────────────┐
│  🔀 Merge conflicts detected in 2 branch(es)                │
├─────────────────────────────────────────────────────────────┤
│    • ralphing/agent-2-add-db                                  │
│    • ralphing/agent-3-add-api                                 │
├─────────────────────────────────────────────────────────────┤
│  What would you like to do?                                 │
│                                                             │
│  [1] 🤖 Retry AI resolution for all (safest)                │
│  [2] 🔧 Resolve manually one-by-one (full control)          │
│  [3] 🗑️  Delete all conflicting branches (destructive)      │
│  [4] ↩️  Abort & reset to clean state (preserves branches)  │
│  [5] 📋 Skip - keep branches for later (default)            │
│                                                             │
└─────────────────────────────────────────────────────────────┘
Enter choice [1-5]: 1

Retrying AI resolution for 2 branch(es)...

  Resolving ralphing/agent-2-add-db... ✓ (AI resolved)
  Resolving ralphing/agent-3-add-api... ✓ (AI resolved)

All branches merged successfully!

Completion Summary

Sequential Mode Summary

✅ All tasks complete!

=== Session Summary ===
Tasks completed: 12
Total input tokens: 45,230
Total output tokens: 12,890
Estimated cost: $0.87
Total time: 12m 34s

Branches created: 0
Pull requests: 0

Final status:
  ✓ All PRD tasks marked complete
  ✓ All changes committed
  ✓ progress.txt updated

Parallel Mode Summary

✅ All tasks complete!

=== Session Summary ===
Tasks completed: 12
Total input tokens: 52,100
Total output tokens: 15,200
Estimated cost: $1.05
Total time: 4m 18s (3x speedup!)

Branches created: 12
  • ralphing/agent-1-task-1
  • ralphing/agent-2-task-2
  • ... (10 more)

Branches merged: 12
Pull requests: 0

Parallel execution stats:
  • 4 batches
  • Max concurrency: 3 agents
  • Average batch time: 1m 4s

Final status:
  ✓ All PRD tasks marked complete
  ✓ All branches merged to main
  ✓ All worktrees cleaned up
  ✓ progress.txt updated

With Pull Requests

✅ All tasks complete!

=== Session Summary ===
Tasks completed: 12
Total input tokens: 48,500
Total output tokens: 13,200
Estimated cost: $0.94
Total time: 14m 12s

Branches created: 12
Pull requests created: 12
  • https://github.com/user/repo/pull/101
  • https://github.com/user/repo/pull/102
  • ... (10 more)

Next steps:
  1. Review draft PRs on GitHub
  2. Mark PRs as ready for review
  3. Request team review
  4. Merge PRs when approved

Real-World Example

Full E-Commerce Project (45 tasks)

Command:

./ralphing.sh --parallel --max-parallel 5 --verbose

Output (abbreviated):

[INFO] Running 5 parallel agents
[INFO] Found 45 tasks to process
[INFO] Base branch: main

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Batch 1/9: Spawning 5 parallel agents
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ⠋ [🔴⏺ 🟢⏺ 🟡⏺ 🔵⏺ 🟣⏺ ] 0 setup | 5 running | 0 done | 0 failed | 01:23

  ... (agents complete) ...

Batch 1 Results:
  ✓ Agent 1: Initialize Node.js project
  ✓ Agent 2: Set up PostgreSQL
  ✓ Agent 3: Configure environment
  ✓ Agent 4: Create logging system
  ✓ Agent 5: Set up CORS and security

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Batch 2/9: Spawning 5 parallel agents
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ... (continues for all batches) ...

✅ All tasks complete!

=== Session Summary ===
Tasks completed: 45
Total input tokens: 234,500
Total output tokens: 67,800
Estimated cost: $4.25
Total time: 18m 42s

Parallel execution stats:
  • 9 batches
  • Max concurrency: 5 agents
  • Average batch time: 2m 4s
  • Speedup vs sequential: ~5x

Final status:
  ✓ Complete e-commerce app implemented
  ✓ All tests passing
  ✓ All branches merged
  ✓ Ready for deployment

Tips for Reading Output

Understanding the Progress Line

  🔴⏺ ⠋ Implementing     │ Add user authentication [00:15]
  ││  │  └─ Step         └─ Task name          └─ Time elapsed
  ││  └─ Spinner (animation)
  │└─ Blinking indicator (rotates colors)
  └─ Current indicator color

Monitoring Long-Running Tasks

Watch for 30-second updates to see if agent is stuck:

  • If activity is changing: Agent is working
  • If same activity repeats: May be stuck, wait for next update
  • If no activity >2 minutes: Consider canceling (Ctrl+C)

Interpreting Parallel Status

  ⠋ [🔴⏺ 🟢✓ 🟡✗ 🔵⏺ 🟣○ ] 1 setup | 2 running | 1 done | 1 failed | 02:15
     └─┬─┘ └─┬┘ └─┬┘ └─┬┘ └─┬┘   └──────┬──────┘  └───┬───┘  └───┬───┘
   Agent 1  A2   A3   A4   A5      Status counts   Completion  Failed
   (run)   (done)(fail)(run)(setup)                  count      count

For more examples, see the examples/ directory with sample run scripts.