bmalph 2.7.2 โ†’ 2.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +14 -4
  2. package/dist/commands/doctor-checks.js +17 -10
  3. package/dist/commands/doctor-checks.js.map +1 -1
  4. package/dist/run/ralph-process.js +101 -7
  5. package/dist/run/ralph-process.js.map +1 -1
  6. package/dist/transition/artifact-collection.js +74 -0
  7. package/dist/transition/artifact-collection.js.map +1 -0
  8. package/dist/transition/artifacts.js +12 -1
  9. package/dist/transition/artifacts.js.map +1 -1
  10. package/dist/transition/context.js +17 -25
  11. package/dist/transition/context.js.map +1 -1
  12. package/dist/transition/fix-plan.js +8 -3
  13. package/dist/transition/fix-plan.js.map +1 -1
  14. package/dist/transition/orchestration.js +176 -111
  15. package/dist/transition/orchestration.js.map +1 -1
  16. package/dist/transition/preflight.js +21 -16
  17. package/dist/transition/preflight.js.map +1 -1
  18. package/dist/transition/section-patterns.js +56 -4
  19. package/dist/transition/section-patterns.js.map +1 -1
  20. package/dist/transition/specs-index.js +5 -2
  21. package/dist/transition/specs-index.js.map +1 -1
  22. package/dist/transition/specs-sync.js +23 -0
  23. package/dist/transition/specs-sync.js.map +1 -0
  24. package/dist/transition/sprint-status.js +91 -0
  25. package/dist/transition/sprint-status.js.map +1 -0
  26. package/dist/transition/story-parsing.js +4 -3
  27. package/dist/transition/story-parsing.js.map +1 -1
  28. package/dist/transition/tech-stack.js +1 -7
  29. package/dist/transition/tech-stack.js.map +1 -1
  30. package/package.json +1 -1
  31. package/ralph/RALPH-REFERENCE.md +50 -46
  32. package/ralph/drivers/cursor-agent-wrapper.sh +13 -0
  33. package/ralph/drivers/cursor.sh +168 -7
  34. package/ralph/lib/circuit_breaker.sh +5 -5
  35. package/ralph/lib/enable_core.sh +10 -10
  36. package/ralph/ralph_import.sh +14 -10
  37. package/ralph/ralph_loop.sh +94 -57
  38. package/ralph/ralph_monitor.sh +4 -4
  39. package/ralph/templates/AGENT.md +7 -7
  40. package/ralph/templates/PROMPT.md +13 -13
@@ -26,6 +26,7 @@ DOCS_DIR="$RALPH_DIR/docs/generated"
26
26
  STATUS_FILE="$RALPH_DIR/status.json"
27
27
  PROGRESS_FILE="$RALPH_DIR/progress.json"
28
28
  CLAUDE_CODE_CMD="claude"
29
+ DRIVER_DISPLAY_NAME="Claude Code"
29
30
  SLEEP_DURATION=3600 # 1 hour in seconds
30
31
  LIVE_OUTPUT=false # Show Claude Code output in real-time (streaming)
31
32
  LIVE_LOG_FILE="$RALPH_DIR/live.log" # Fixed file for live output monitoring
@@ -95,17 +96,36 @@ MAX_CONSECUTIVE_TEST_LOOPS=3
95
96
  MAX_CONSECUTIVE_DONE_SIGNALS=2
96
97
  TEST_PERCENTAGE_THRESHOLD=30 # If more than 30% of recent loops are test-only, flag it
97
98
 
98
- # .ralphrc configuration file
99
- RALPHRC_FILE=".ralphrc"
99
+ # Ralph configuration file
100
+ # bmalph installs .ralph/.ralphrc. Fall back to a project-root .ralphrc for
101
+ # older standalone Ralph layouts.
102
+ RALPHRC_FILE="${RALPHRC_FILE:-$RALPH_DIR/.ralphrc}"
100
103
  RALPHRC_LOADED=false
101
104
 
102
105
  # Platform driver (set from .ralphrc or environment)
103
106
  PLATFORM_DRIVER="${PLATFORM_DRIVER:-claude-code}"
107
+ RUNTIME_CONTEXT_LOADED=false
104
108
 
105
- # load_ralphrc - Load project-specific configuration from .ralphrc
109
+ # resolve_ralphrc_file - Resolve the Ralph config path
110
+ resolve_ralphrc_file() {
111
+ if [[ -f "$RALPHRC_FILE" ]]; then
112
+ echo "$RALPHRC_FILE"
113
+ return 0
114
+ fi
115
+
116
+ if [[ "$RALPHRC_FILE" != ".ralphrc" && -f ".ralphrc" ]]; then
117
+ echo ".ralphrc"
118
+ return 0
119
+ fi
120
+
121
+ echo "$RALPHRC_FILE"
122
+ }
123
+
124
+ # load_ralphrc - Load project-specific configuration from .ralph/.ralphrc
106
125
  #
107
- # This function sources .ralphrc if it exists, applying project-specific
108
- # settings. Environment variables take precedence over .ralphrc values.
126
+ # This function sources the bundled .ralph/.ralphrc file when present, falling
127
+ # back to a project-root .ralphrc for older standalone Ralph layouts.
128
+ # Environment variables take precedence over config values.
109
129
  #
110
130
  # Configuration values that can be overridden:
111
131
  # - MAX_CALLS_PER_HOUR
@@ -120,15 +140,18 @@ PLATFORM_DRIVER="${PLATFORM_DRIVER:-claude-code}"
120
140
  # - RALPH_VERBOSE
121
141
  #
122
142
  load_ralphrc() {
123
- if [[ ! -f "$RALPHRC_FILE" ]]; then
143
+ local config_file
144
+ config_file="$(resolve_ralphrc_file)"
145
+
146
+ if [[ ! -f "$config_file" ]]; then
124
147
  return 0
125
148
  fi
126
149
 
127
- # Source .ralphrc (this may override default values)
150
+ # Source config (this may override default values)
128
151
  # shellcheck source=/dev/null
129
- source "$RALPHRC_FILE"
152
+ source "$config_file"
130
153
 
131
- # Map .ralphrc variable names to internal names
154
+ # Map config variable names to internal names
132
155
  if [[ -n "${ALLOWED_TOOLS:-}" ]]; then
133
156
  CLAUDE_ALLOWED_TOOLS="$ALLOWED_TOOLS"
134
157
  fi
@@ -155,6 +178,7 @@ load_ralphrc() {
155
178
  [[ -n "$_env_CB_COOLDOWN_MINUTES" ]] && CB_COOLDOWN_MINUTES="$_env_CB_COOLDOWN_MINUTES"
156
179
  [[ -n "$_env_CB_AUTO_RESET" ]] && CB_AUTO_RESET="$_env_CB_AUTO_RESET"
157
180
 
181
+ RALPHRC_FILE="$config_file"
158
182
  RALPHRC_LOADED=true
159
183
  return 0
160
184
  }
@@ -175,8 +199,25 @@ load_platform_driver() {
175
199
 
176
200
  # Set CLI binary from driver
177
201
  CLAUDE_CODE_CMD="$(driver_cli_binary)"
202
+ DRIVER_DISPLAY_NAME="$(driver_display_name)"
178
203
 
179
- log_status "INFO" "Platform driver: $(driver_display_name) ($(driver_cli_binary))"
204
+ log_status "INFO" "Platform driver: $DRIVER_DISPLAY_NAME ($CLAUDE_CODE_CMD)"
205
+ }
206
+
207
+ initialize_runtime_context() {
208
+ if [[ "$RUNTIME_CONTEXT_LOADED" == "true" ]]; then
209
+ return 0
210
+ fi
211
+
212
+ if load_ralphrc; then
213
+ if [[ "$RALPHRC_LOADED" == "true" ]]; then
214
+ log_status "INFO" "Loaded configuration from $RALPHRC_FILE"
215
+ fi
216
+ fi
217
+
218
+ # Load platform driver after config so PLATFORM_DRIVER can be overridden.
219
+ load_platform_driver
220
+ RUNTIME_CONTEXT_LOADED=true
180
221
  }
181
222
 
182
223
  # Colors for terminal output
@@ -217,6 +258,8 @@ setup_tmux_session() {
217
258
  local ralph_home="${RALPH_HOME:-$HOME/.ralph}"
218
259
  local project_dir="$(pwd)"
219
260
 
261
+ initialize_runtime_context
262
+
220
263
  # Get the tmux base-index to handle custom configurations (e.g., base-index 1)
221
264
  local base_win
222
265
  base_win=$(get_tmux_base_index)
@@ -235,7 +278,7 @@ setup_tmux_session() {
235
278
  # Split right pane horizontally (top: Claude output, bottom: status)
236
279
  tmux split-window -v -t "$session_name:${base_win}.1" -c "$project_dir"
237
280
 
238
- # Right-top pane (pane 1): Live Claude Code output
281
+ # Right-top pane (pane 1): Live driver output
239
282
  tmux send-keys -t "$session_name:${base_win}.1" "tail -f '$project_dir/$LIVE_LOG_FILE'" Enter
240
283
 
241
284
  # Right-bottom pane (pane 2): Ralph status monitor
@@ -304,7 +347,7 @@ setup_tmux_session() {
304
347
 
305
348
  # Set pane titles (requires tmux 2.6+)
306
349
  tmux select-pane -t "$session_name:${base_win}.0" -T "Ralph Loop"
307
- tmux select-pane -t "$session_name:${base_win}.1" -T "Claude Output"
350
+ tmux select-pane -t "$session_name:${base_win}.1" -T "$DRIVER_DISPLAY_NAME Output"
308
351
  tmux select-pane -t "$session_name:${base_win}.2" -T "Status"
309
352
 
310
353
  # Set window title
@@ -312,7 +355,7 @@ setup_tmux_session() {
312
355
 
313
356
  log_status "SUCCESS" "Tmux session created with 3 panes:"
314
357
  log_status "INFO" " Left: Ralph loop"
315
- log_status "INFO" " Right-top: Claude Code live output"
358
+ log_status "INFO" " Right-top: $DRIVER_DISPLAY_NAME live output"
316
359
  log_status "INFO" " Right-bottom: Status monitor"
317
360
  log_status "INFO" ""
318
361
  log_status "INFO" "Use Ctrl+B then D to detach from session"
@@ -996,9 +1039,9 @@ execute_claude_code() {
996
1039
  fi
997
1040
  echo "$loop_start_sha" > "$RALPH_DIR/.loop_start_sha"
998
1041
 
999
- log_status "LOOP" "Executing Claude Code (Call $calls_made/$MAX_CALLS_PER_HOUR)"
1042
+ log_status "LOOP" "Executing $DRIVER_DISPLAY_NAME (Call $calls_made/$MAX_CALLS_PER_HOUR)"
1000
1043
  local timeout_seconds=$((CLAUDE_TIMEOUT_MINUTES * 60))
1001
- log_status "INFO" "โณ Starting Claude Code execution... (timeout: ${CLAUDE_TIMEOUT_MINUTES}m)"
1044
+ log_status "INFO" "โณ Starting $DRIVER_DISPLAY_NAME execution... (timeout: ${CLAUDE_TIMEOUT_MINUTES}m)"
1002
1045
 
1003
1046
  # Build loop context for session continuity
1004
1047
  local loop_context=""
@@ -1070,8 +1113,8 @@ execute_claude_code() {
1070
1113
  fi
1071
1114
 
1072
1115
  if [[ "$LIVE_OUTPUT" == "true" ]]; then
1073
- log_status "INFO" "๐Ÿ“บ Live output mode enabled - showing Claude Code streaming..."
1074
- echo -e "${PURPLE}โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” Claude Code Output โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”${NC}"
1116
+ log_status "INFO" "๐Ÿ“บ Live output mode enabled - showing $DRIVER_DISPLAY_NAME streaming..."
1117
+ echo -e "${PURPLE}โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” ${DRIVER_DISPLAY_NAME} Output โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”${NC}"
1075
1118
 
1076
1119
  # Modify CLAUDE_CMD_ARGS: replace --output-format value with stream-json
1077
1120
  # and add streaming-specific flags
@@ -1182,7 +1225,7 @@ execute_claude_code() {
1182
1225
  then
1183
1226
  : # Continue to wait loop
1184
1227
  else
1185
- log_status "ERROR" "โŒ Failed to start Claude Code process (modern mode)"
1228
+ log_status "ERROR" "โŒ Failed to start $DRIVER_DISPLAY_NAME process (modern mode)"
1186
1229
  # Fall back to legacy mode
1187
1230
  log_status "INFO" "Falling back to legacy mode..."
1188
1231
  use_modern_cli=false
@@ -1197,7 +1240,7 @@ execute_claude_code() {
1197
1240
  then
1198
1241
  : # Continue to wait loop
1199
1242
  else
1200
- log_status "ERROR" "โŒ Failed to start Claude Code process"
1243
+ log_status "ERROR" "โŒ Failed to start $DRIVER_DISPLAY_NAME process"
1201
1244
  return 1
1202
1245
  fi
1203
1246
  fi
@@ -1238,9 +1281,9 @@ EOF
1238
1281
  # Only log if verbose mode is enabled
1239
1282
  if [[ "$VERBOSE_PROGRESS" == "true" ]]; then
1240
1283
  if [[ -n "$last_line" ]]; then
1241
- log_status "INFO" "$progress_indicator Claude Code: $last_line... (${progress_counter}0s)"
1284
+ log_status "INFO" "$progress_indicator $DRIVER_DISPLAY_NAME: $last_line... (${progress_counter}0s)"
1242
1285
  else
1243
- log_status "INFO" "$progress_indicator Claude Code working... (${progress_counter}0s elapsed)"
1286
+ log_status "INFO" "$progress_indicator $DRIVER_DISPLAY_NAME working... (${progress_counter}0s elapsed)"
1244
1287
  fi
1245
1288
  fi
1246
1289
 
@@ -1259,7 +1302,7 @@ EOF
1259
1302
  # Clear progress file
1260
1303
  echo '{"status": "completed", "timestamp": "'$(date '+%Y-%m-%d %H:%M:%S')'"}' > "$PROGRESS_FILE"
1261
1304
 
1262
- log_status "SUCCESS" "โœ… Claude Code execution completed successfully"
1305
+ log_status "SUCCESS" "โœ… $DRIVER_DISPLAY_NAME execution completed successfully"
1263
1306
 
1264
1307
  # Save session ID from JSON output (Phase 1.1)
1265
1308
  if [[ "$CLAUDE_USE_CONTINUE" == "true" ]]; then
@@ -1267,7 +1310,7 @@ EOF
1267
1310
  fi
1268
1311
 
1269
1312
  # Analyze the response
1270
- log_status "INFO" "๐Ÿ” Analyzing Claude Code response..."
1313
+ log_status "INFO" "๐Ÿ” Analyzing $DRIVER_DISPLAY_NAME response..."
1271
1314
  analyze_response "$output_file" "$loop_count"
1272
1315
  local analysis_exit_code=$?
1273
1316
 
@@ -1356,7 +1399,7 @@ EOF
1356
1399
  log_status "ERROR" "๐Ÿšซ Claude API 5-hour usage limit reached"
1357
1400
  return 2 # Special return code for API limit
1358
1401
  else
1359
- log_status "ERROR" "โŒ Claude Code execution failed, check: $output_file"
1402
+ log_status "ERROR" "โŒ $DRIVER_DISPLAY_NAME execution failed, check: $output_file"
1360
1403
  return 1
1361
1404
  fi
1362
1405
  fi
@@ -1378,22 +1421,14 @@ loop_count=0
1378
1421
 
1379
1422
  # Main loop
1380
1423
  main() {
1381
- # Load project-specific configuration from .ralphrc
1382
- if load_ralphrc; then
1383
- if [[ "$RALPHRC_LOADED" == "true" ]]; then
1384
- log_status "INFO" "Loaded configuration from .ralphrc"
1385
- fi
1386
- fi
1387
-
1388
- # Load platform driver (after .ralphrc so PLATFORM_DRIVER can be overridden)
1389
- load_platform_driver
1424
+ initialize_runtime_context
1390
1425
 
1391
1426
  # Validate --allowed-tools now that platform-specific VALID_TOOL_PATTERNS are loaded
1392
1427
  if [[ "${_CLI_ALLOWED_TOOLS:-}" == "true" ]] && ! validate_allowed_tools "$CLAUDE_ALLOWED_TOOLS"; then
1393
1428
  exit 1
1394
1429
  fi
1395
1430
 
1396
- log_status "SUCCESS" "๐Ÿš€ Ralph loop starting with Claude Code"
1431
+ log_status "SUCCESS" "๐Ÿš€ Ralph loop starting with $DRIVER_DISPLAY_NAME"
1397
1432
  log_status "INFO" "Max calls per hour: $MAX_CALLS_PER_HOUR"
1398
1433
  log_status "INFO" "Logs: $LOG_DIR/ | Docs: $DOCS_DIR/ | Status: $STATUS_FILE"
1399
1434
 
@@ -1417,19 +1452,19 @@ main() {
1417
1452
  echo ""
1418
1453
 
1419
1454
  # Check if this looks like a partial Ralph project
1420
- if [[ -f "$RALPH_DIR/@fix_plan.md" ]] || [[ -d "$RALPH_DIR/specs" ]] || [[ -f "$RALPH_DIR/AGENT.md" ]]; then
1421
- echo "This appears to be a Ralph project but is missing .ralph/PROMPT.md."
1455
+ if [[ -f "$RALPH_DIR/@fix_plan.md" ]] || [[ -d "$RALPH_DIR/specs" ]] || [[ -f "$RALPH_DIR/@AGENT.md" ]]; then
1456
+ echo "This appears to be a bmalph/Ralph project but is missing .ralph/PROMPT.md."
1422
1457
  echo "You may need to create or restore the PROMPT.md file."
1423
1458
  else
1424
- echo "This directory is not a Ralph project."
1459
+ echo "This directory is not a bmalph/Ralph project."
1425
1460
  fi
1426
1461
 
1427
1462
  echo ""
1428
1463
  echo "To fix this:"
1429
- echo " 1. Enable Ralph in existing project: ralph-enable"
1430
- echo " 2. Create a new project: ralph-setup my-project"
1431
- echo " 3. Import existing requirements: ralph-import requirements.md"
1432
- echo " 4. Navigate to an existing Ralph project directory"
1464
+ echo " 1. Initialize bmalph in this project: bmalph init"
1465
+ echo " 2. Restore bundled Ralph files in an existing project: bmalph upgrade"
1466
+ echo " 3. Generate Ralph task files after planning: bmalph implement"
1467
+ echo " 4. Navigate to an existing bmalph/Ralph project directory"
1433
1468
  echo " 5. Or create .ralph/PROMPT.md manually in this directory"
1434
1469
  echo ""
1435
1470
  echo "Ralph projects should contain: .ralph/PROMPT.md, .ralph/@fix_plan.md, .ralph/specs/, src/, etc."
@@ -1496,7 +1531,7 @@ main() {
1496
1531
  echo -e "${RED}โ•‘ PERMISSION DENIED - Loop Halted โ•‘${NC}"
1497
1532
  echo -e "${RED}โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•${NC}"
1498
1533
  echo ""
1499
- echo -e "${YELLOW}Claude Code was denied permission to execute commands.${NC}"
1534
+ echo -e "${YELLOW}$DRIVER_DISPLAY_NAME was denied permission to execute commands.${NC}"
1500
1535
  echo ""
1501
1536
  echo -e "${YELLOW}To fix this:${NC}"
1502
1537
  echo " 1. Edit .ralphrc and update ALLOWED_TOOLS to include the required tools"
@@ -1507,8 +1542,8 @@ main() {
1507
1542
  echo " - Bash(yarn *) - All yarn commands"
1508
1543
  echo ""
1509
1544
  echo -e "${YELLOW}After updating .ralphrc:${NC}"
1510
- echo " ralph --reset-session # Clear stale session state"
1511
- echo " ralph --monitor # Restart the loop"
1545
+ echo " bash .ralph/ralph_loop.sh --reset-session # Clear stale session state"
1546
+ echo " bmalph run # Restart the loop"
1512
1547
  echo ""
1513
1548
 
1514
1549
  # Show current ALLOWED_TOOLS if .ralphrc exists
@@ -1553,7 +1588,7 @@ main() {
1553
1588
  reset_session "circuit_breaker_trip"
1554
1589
  update_status "$loop_count" "$(cat "$CALL_COUNT_FILE")" "circuit_breaker_open" "halted" "stagnation_detected"
1555
1590
  log_status "ERROR" "๐Ÿ›‘ Circuit breaker has opened - halting loop"
1556
- log_status "INFO" "Run 'ralph --reset-circuit' to reset the circuit breaker after addressing issues"
1591
+ log_status "INFO" "Run 'bash .ralph/ralph_loop.sh --reset-circuit' to reset the circuit breaker after addressing issues"
1557
1592
  break
1558
1593
  elif [ $exec_result -eq 2 ]; then
1559
1594
  # API 5-hour limit reached - handle specially
@@ -1605,12 +1640,12 @@ main() {
1605
1640
  # Help function
1606
1641
  show_help() {
1607
1642
  cat << HELPEOF
1608
- Ralph Loop for Claude Code
1643
+ Ralph Loop
1609
1644
 
1610
1645
  Usage: $0 [OPTIONS]
1611
1646
 
1612
- IMPORTANT: This command must be run from a Ralph project directory.
1613
- Use 'ralph-setup project-name' to create a new project first.
1647
+ IMPORTANT: This command must be run from a bmalph/Ralph project directory.
1648
+ Use 'bmalph init' in your project first.
1614
1649
 
1615
1650
  Options:
1616
1651
  -h, --help Show this help message
@@ -1619,15 +1654,15 @@ Options:
1619
1654
  -s, --status Show current status and exit
1620
1655
  -m, --monitor Start with tmux session and live monitor (requires tmux)
1621
1656
  -v, --verbose Show detailed progress updates during execution
1622
- -l, --live Show Claude Code output in real-time (auto-switches to JSON output)
1623
- -t, --timeout MIN Set Claude Code execution timeout in minutes (default: $CLAUDE_TIMEOUT_MINUTES)
1657
+ -l, --live Show live driver output in real-time (auto-switches to JSON output)
1658
+ -t, --timeout MIN Set driver execution timeout in minutes (default: $CLAUDE_TIMEOUT_MINUTES)
1624
1659
  --reset-circuit Reset circuit breaker to CLOSED state
1625
1660
  --circuit-status Show circuit breaker status and exit
1626
1661
  --auto-reset-circuit Auto-reset circuit breaker on startup (bypasses cooldown)
1627
1662
  --reset-session Reset session state and exit (clears session continuity)
1628
1663
 
1629
1664
  Modern CLI Options (Phase 1.1):
1630
- --output-format FORMAT Set Claude output format: json or text (default: $CLAUDE_OUTPUT_FORMAT)
1665
+ --output-format FORMAT Set driver output format: json or text (default: $CLAUDE_OUTPUT_FORMAT)
1631
1666
  Note: --live mode requires JSON and will auto-switch
1632
1667
  --allowed-tools TOOLS Comma-separated list of allowed tools (default: $CLAUDE_ALLOWED_TOOLS)
1633
1668
  --no-continue Disable session continuity across loops
@@ -1643,15 +1678,17 @@ Files created:
1643
1678
  - .ralph/.last_reset: Timestamp of last rate limit reset
1644
1679
 
1645
1680
  Example workflow:
1646
- ralph-setup my-project # Create project
1647
- cd my-project # Enter project directory
1648
- $0 --monitor # Start Ralph with monitoring
1681
+ cd my-project # Enter project directory
1682
+ bmalph init # Install bmalph + Ralph files
1683
+ bmalph implement # Generate Ralph task files
1684
+ $0 --monitor # Start Ralph with monitoring
1649
1685
 
1650
1686
  Examples:
1687
+ bmalph run # Start Ralph via the bmalph CLI
1651
1688
  $0 --calls 50 --prompt my_prompt.md
1652
- $0 --monitor # Start with integrated tmux monitoring
1653
- $0 --live # Show Claude Code output in real-time (streaming)
1654
- $0 --live --verbose # Live streaming + verbose logging
1689
+ $0 --monitor # Start with integrated tmux monitoring
1690
+ $0 --live # Show live driver output in real-time (streaming)
1691
+ $0 --live --verbose # Live streaming + verbose logging
1655
1692
  $0 --monitor --timeout 30 # 30-minute timeout for complex tasks
1656
1693
  $0 --verbose --timeout 5 # 5-minute timeout with detailed progress
1657
1694
  $0 --output-format text # Use legacy text output format
@@ -2,8 +2,8 @@
2
2
 
3
3
  # Ralph Status Monitor - Live terminal dashboard for the Ralph loop
4
4
  #
5
- # DEPRECATED: Use `bmalph watch` instead, which provides a more capable
6
- # TypeScript-based live dashboard with full test coverage.
5
+ # DEPRECATED: Use `bmalph run` instead, which starts Ralph and shows the
6
+ # supported live dashboard.
7
7
  # This script is kept for backward compatibility in tmux sessions.
8
8
  set -e
9
9
 
@@ -77,7 +77,7 @@ display_status() {
77
77
  echo
78
78
  fi
79
79
 
80
- # Claude Code Progress section
80
+ # Driver Progress section
81
81
  if [[ -f ".ralph/progress.json" ]]; then
82
82
  local progress_data=$(cat ".ralph/progress.json" 2>/dev/null)
83
83
  local progress_status=$(echo "$progress_data" | jq -r '.status // "idle"' 2>/dev/null || echo "idle")
@@ -87,7 +87,7 @@ display_status() {
87
87
  local elapsed=$(echo "$progress_data" | jq -r '.elapsed_seconds // "0"' 2>/dev/null || echo "0")
88
88
  local last_output=$(echo "$progress_data" | jq -r '.last_output // ""' 2>/dev/null || echo "")
89
89
 
90
- echo -e "${YELLOW}โ”Œโ”€ Claude Code Progress โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”${NC}"
90
+ echo -e "${YELLOW}โ”Œโ”€ Driver Progress โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”${NC}"
91
91
  echo -e "${YELLOW}โ”‚${NC} Status: ${indicator} Working (${elapsed}s elapsed)"
92
92
  if [[ -n "$last_output" && "$last_output" != "" ]]; then
93
93
  # Truncate long output for display
@@ -94,8 +94,8 @@ Before moving to the next feature, ALL changes must be:
94
94
  - Create pull requests for all significant changes
95
95
 
96
96
  4. **Ralph Integration**:
97
- - Update .ralph/fix_plan.md with new tasks before starting work
98
- - Mark items complete in .ralph/fix_plan.md upon completion
97
+ - Update .ralph/@fix_plan.md with new tasks before starting work
98
+ - Mark items complete in .ralph/@fix_plan.md upon completion
99
99
  - Update .ralph/PROMPT.md if development patterns change
100
100
  - Test features work within Ralph's autonomous loop
101
101
 
@@ -109,7 +109,7 @@ Before moving to the next feature, ALL changes must be:
109
109
  - Remove outdated comments immediately
110
110
 
111
111
  2. **Implementation Documentation**:
112
- - Update relevant sections in this AGENT.md file
112
+ - Update relevant sections in this @AGENT.md file
113
113
  - Keep build and test commands current
114
114
  - Update configuration examples when defaults change
115
115
  - Document breaking changes prominently
@@ -120,7 +120,7 @@ Before moving to the next feature, ALL changes must be:
120
120
  - Maintain accurate command examples
121
121
  - Update version compatibility information
122
122
 
123
- 4. **AGENT.md Maintenance**:
123
+ 4. **@AGENT.md Maintenance**:
124
124
  - Add new build patterns to relevant sections
125
125
  - Update "Key Learnings" with new insights
126
126
  - Keep command examples accurate and tested
@@ -137,10 +137,10 @@ Before marking ANY feature as complete, verify:
137
137
  - [ ] Type checking passes (if applicable)
138
138
  - [ ] All changes committed with conventional commit messages
139
139
  - [ ] All commits pushed to remote repository
140
- - [ ] .ralph/fix_plan.md task marked as complete
140
+ - [ ] .ralph/@fix_plan.md task marked as complete
141
141
  - [ ] Implementation documentation updated
142
142
  - [ ] Inline code comments updated or added
143
- - [ ] .ralph/AGENT.md updated (if new patterns introduced)
143
+ - [ ] .ralph/@AGENT.md updated (if new patterns introduced)
144
144
  - [ ] Breaking changes documented
145
145
  - [ ] Features tested within Ralph loop (if applicable)
146
146
  - [ ] CI/CD pipeline passes
@@ -149,7 +149,7 @@ Before marking ANY feature as complete, verify:
149
149
 
150
150
  These standards ensure:
151
151
  - **Quality**: High test coverage and pass rates prevent regressions
152
- - **Traceability**: Git commits and .ralph/fix_plan.md provide clear history of changes
152
+ - **Traceability**: Git commits and .ralph/@fix_plan.md provide clear history of changes
153
153
  - **Maintainability**: Current documentation reduces onboarding time and prevents knowledge loss
154
154
  - **Collaboration**: Pushed changes enable team visibility and code review
155
155
  - **Reliability**: Consistent quality gates maintain production stability
@@ -5,18 +5,18 @@ You are Ralph, an autonomous AI development agent working on a [YOUR PROJECT NAM
5
5
 
6
6
  ## Current Objectives
7
7
  1. Study .ralph/specs/* to learn about the project specifications
8
- 2. Review .ralph/fix_plan.md for current priorities
8
+ 2. Review .ralph/@fix_plan.md for current priorities
9
9
  3. Implement the highest priority item using best practices
10
10
  4. Use parallel subagents for complex tasks (max 100 concurrent)
11
11
  5. Run tests after each implementation
12
- 6. Update documentation and fix_plan.md
12
+ 6. Update documentation and @fix_plan.md
13
13
 
14
14
  ## Key Principles
15
15
  - ONE task per loop - focus on the most important thing
16
16
  - Search the codebase before assuming something isn't implemented
17
17
  - Use subagents for expensive operations (file searching, analysis)
18
18
  - Write comprehensive tests with clear documentation
19
- - Update .ralph/fix_plan.md with your learnings
19
+ - Update .ralph/@fix_plan.md with your learnings
20
20
  - Commit working changes with descriptive messages
21
21
 
22
22
  ## ๐Ÿงช Testing Guidelines (CRITICAL)
@@ -31,7 +31,7 @@ You are Ralph, an autonomous AI development agent working on a [YOUR PROJECT NAM
31
31
  - Before making changes: search codebase using subagents
32
32
  - After implementation: run ESSENTIAL tests for the modified code only
33
33
  - If tests fail: fix them as part of your current work
34
- - Keep .ralph/AGENT.md updated with build/run instructions
34
+ - Keep .ralph/@AGENT.md updated with build/run instructions
35
35
  - Document the WHY behind tests and implementations
36
36
  - No placeholder implementations - build it properly
37
37
 
@@ -54,7 +54,7 @@ RECOMMENDATION: <one line summary of what to do next>
54
54
  ### When to set EXIT_SIGNAL: true
55
55
 
56
56
  Set EXIT_SIGNAL to **true** when ALL of these conditions are met:
57
- 1. โœ… All items in fix_plan.md are marked [x]
57
+ 1. โœ… All items in @fix_plan.md are marked [x]
58
58
  2. โœ… All tests are passing (or no tests exist for valid reasons)
59
59
  3. โœ… No errors or warnings in the last execution
60
60
  4. โœ… All requirements from specs/ are implemented
@@ -71,7 +71,7 @@ FILES_MODIFIED: 5
71
71
  TESTS_STATUS: PASSING
72
72
  WORK_TYPE: IMPLEMENTATION
73
73
  EXIT_SIGNAL: false
74
- RECOMMENDATION: Continue with next priority task from fix_plan.md
74
+ RECOMMENDATION: Continue with next priority task from @fix_plan.md
75
75
  ---END_RALPH_STATUS---
76
76
  ```
77
77
 
@@ -115,7 +115,7 @@ Each scenario shows the exact conditions and expected behavior.
115
115
 
116
116
  ### Scenario 1: Successful Project Completion
117
117
  **Given**:
118
- - All items in .ralph/fix_plan.md are marked [x]
118
+ - All items in .ralph/@fix_plan.md are marked [x]
119
119
  - Last test run shows all tests passing
120
120
  - No errors in recent logs/
121
121
  - All requirements from .ralph/specs/ are implemented
@@ -192,7 +192,7 @@ RECOMMENDATION: Stuck on [error description] - human intervention needed
192
192
 
193
193
  ### Scenario 4: No Work Remaining
194
194
  **Given**:
195
- - All tasks in fix_plan.md are complete
195
+ - All tasks in @fix_plan.md are complete
196
196
  - You analyze .ralph/specs/ and find nothing new to implement
197
197
  - Code quality is acceptable
198
198
  - Tests are passing
@@ -218,7 +218,7 @@ RECOMMENDATION: No remaining work, all .ralph/specs implemented
218
218
 
219
219
  ### Scenario 5: Making Progress
220
220
  **Given**:
221
- - Tasks remain in .ralph/fix_plan.md
221
+ - Tasks remain in .ralph/@fix_plan.md
222
222
  - Implementation is underway
223
223
  - Files are being modified
224
224
  - Tests are passing or being fixed
@@ -234,7 +234,7 @@ FILES_MODIFIED: 7
234
234
  TESTS_STATUS: PASSING
235
235
  WORK_TYPE: IMPLEMENTATION
236
236
  EXIT_SIGNAL: false
237
- RECOMMENDATION: Continue with next task from .ralph/fix_plan.md
237
+ RECOMMENDATION: Continue with next task from .ralph/@fix_plan.md
238
238
  ---END_RALPH_STATUS---
239
239
  ```
240
240
 
@@ -270,8 +270,8 @@ RECOMMENDATION: Blocked on [specific dependency] - need [what's needed]
270
270
  ## File Structure
271
271
  - .ralph/: Ralph-specific configuration and documentation
272
272
  - specs/: Project specifications and requirements
273
- - fix_plan.md: Prioritized TODO list
274
- - AGENT.md: Project build and run instructions
273
+ - @fix_plan.md: Prioritized TODO list
274
+ - @AGENT.md: Project build and run instructions
275
275
  - PROMPT.md: This file - Ralph development instructions
276
276
  - logs/: Loop execution logs
277
277
  - docs/generated/: Auto-generated documentation
@@ -279,7 +279,7 @@ RECOMMENDATION: Blocked on [specific dependency] - need [what's needed]
279
279
  - examples/: Example usage and test cases
280
280
 
281
281
  ## Current Task
282
- Follow .ralph/fix_plan.md and choose the most important item to implement next.
282
+ Follow .ralph/@fix_plan.md and choose the most important item to implement next.
283
283
  Use your judgment to prioritize what will have the biggest impact on project progress.
284
284
 
285
285
  Remember: Quality over speed. Build it right the first time. Know when you're done.