agentic-loop 3.2.8 → 3.2.10

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 (2) hide show
  1. package/package.json +1 -1
  2. package/ralph/loop.sh +30 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-loop",
3
- "version": "3.2.8",
3
+ "version": "3.2.10",
4
4
  "description": "Autonomous AI coding loop - PRD-driven development with Claude Code",
5
5
  "author": "Allie Jones <allie@allthrive.ai>",
6
6
  "license": "MIT",
package/ralph/loop.sh CHANGED
@@ -251,8 +251,8 @@ run_loop() {
251
251
  last_story="$story"
252
252
  fi
253
253
 
254
- # 2. Session startup checklist (Anthropic best practice)
255
- startup_checklist
254
+ # 2. Session startup checklist (skip on retries)
255
+ [[ $consecutive_failures -gt 1 ]] && startup_checklist "true" || startup_checklist "false"
256
256
 
257
257
  # 3. Build prompt with current story context (including failure context if any)
258
258
  print_info "Preparing prompt for $story..."
@@ -439,28 +439,43 @@ run_loop() {
439
439
  return 1
440
440
  }
441
441
 
442
- # Display startup checklist (Anthropic best practice)
442
+ # Display startup checklist (only full version on first iteration)
443
+ # Usage: startup_checklist [is_retry]
443
444
  startup_checklist() {
445
+ local is_retry="${1:-false}"
446
+
447
+ # On retries, just show minimal info
448
+ if [[ "$is_retry" == "true" ]]; then
449
+ return 0
450
+ fi
451
+
444
452
  echo "--- Startup Checklist ---"
445
453
  echo "Working directory: $(pwd)"
446
454
  echo ""
447
455
 
448
- echo "Recent progress:"
449
- if [[ -f "$RALPH_DIR/progress.txt" ]]; then
450
- tail -"$MAX_PROGRESS_LINES" "$RALPH_DIR/progress.txt" | sed 's/^/ /'
451
- else
452
- echo " (no progress yet)"
453
- fi
456
+ # Show progress summary instead of full list
457
+ local passed_count total_count
458
+ passed_count=$(jq '[.stories[] | select(.passes==true)] | length' "$RALPH_DIR/prd.json" 2>/dev/null || echo "0")
459
+ total_count=$(jq '[.stories[]] | length' "$RALPH_DIR/prd.json" 2>/dev/null || echo "0")
460
+ echo "Progress: $passed_count/$total_count stories complete"
454
461
  echo ""
455
462
 
456
- echo "Stories:"
457
- jq -r '.stories[] | " \(.id): \(.title) [\(if .passes then "DONE" else "TODO" end)]"' "$RALPH_DIR/prd.json" 2>/dev/null || echo " (none)"
458
- echo ""
463
+ # Only show last few progress entries
464
+ if [[ -f "$RALPH_DIR/progress.txt" ]]; then
465
+ echo "Recent:"
466
+ tail -3 "$RALPH_DIR/progress.txt" | sed 's/^/ /'
467
+ echo ""
468
+ fi
459
469
 
470
+ # Show git status only if there are changes
460
471
  if command -v git &>/dev/null && [[ -d ".git" ]]; then
461
- echo "Git status:"
462
- git status --short | head -"$MAX_GIT_STATUS_LINES" | sed 's/^/ /'
463
- echo ""
472
+ local git_changes
473
+ git_changes=$(git status --short 2>/dev/null | head -5)
474
+ if [[ -n "$git_changes" ]]; then
475
+ echo "Uncommitted:"
476
+ echo "$git_changes" | sed 's/^/ /'
477
+ echo ""
478
+ fi
464
479
  fi
465
480
  }
466
481