agentic-loop 3.2.7 → 3.2.8
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.
- package/package.json +1 -1
- package/ralph/loop.sh +50 -1
package/package.json
CHANGED
package/ralph/loop.sh
CHANGED
|
@@ -413,7 +413,9 @@ run_loop() {
|
|
|
413
413
|
fi
|
|
414
414
|
|
|
415
415
|
log_progress "$story" "COMPLETED"
|
|
416
|
-
|
|
416
|
+
|
|
417
|
+
# Show completion summary
|
|
418
|
+
print_story_complete "$story" "$title"
|
|
417
419
|
|
|
418
420
|
# If running specific story, we're done
|
|
419
421
|
[[ -n "$specific_story" ]] && return 0
|
|
@@ -651,6 +653,53 @@ build_prompt() {
|
|
|
651
653
|
_inject_developer_dna
|
|
652
654
|
}
|
|
653
655
|
|
|
656
|
+
# Print story completion summary
|
|
657
|
+
print_story_complete() {
|
|
658
|
+
local story="$1"
|
|
659
|
+
local title="$2"
|
|
660
|
+
|
|
661
|
+
# Get stats
|
|
662
|
+
local passed_count total_count remaining
|
|
663
|
+
passed_count=$(jq '[.stories[] | select(.passes==true)] | length' "$RALPH_DIR/prd.json" 2>/dev/null || echo "0")
|
|
664
|
+
total_count=$(jq '[.stories[]] | length' "$RALPH_DIR/prd.json" 2>/dev/null || echo "0")
|
|
665
|
+
remaining=$((total_count - passed_count))
|
|
666
|
+
|
|
667
|
+
# Get commit info
|
|
668
|
+
local commit_hash=""
|
|
669
|
+
local files_changed="0"
|
|
670
|
+
if command -v git &>/dev/null && [[ -d ".git" ]]; then
|
|
671
|
+
commit_hash=$(git rev-parse --short HEAD 2>/dev/null || echo "")
|
|
672
|
+
files_changed=$(git diff --name-only HEAD~1 2>/dev/null | wc -l | tr -d ' ')
|
|
673
|
+
fi
|
|
674
|
+
|
|
675
|
+
# Build progress bar
|
|
676
|
+
local bar_filled=$((passed_count * 10 / total_count))
|
|
677
|
+
local bar_empty=$((10 - bar_filled))
|
|
678
|
+
local progress_bar=""
|
|
679
|
+
for ((i=0; i<bar_filled; i++)); do progress_bar+="█"; done
|
|
680
|
+
for ((i=0; i<bar_empty; i++)); do progress_bar+="░"; done
|
|
681
|
+
|
|
682
|
+
# Truncate title if too long
|
|
683
|
+
local display_title="$story: $title"
|
|
684
|
+
[[ ${#display_title} -gt 50 ]] && display_title="${display_title:0:47}..."
|
|
685
|
+
|
|
686
|
+
echo ""
|
|
687
|
+
echo " ┌──────────────────────────────────────────────────────┐"
|
|
688
|
+
echo " │ ✅ STORY COMPLETE │"
|
|
689
|
+
echo " ├──────────────────────────────────────────────────────┤"
|
|
690
|
+
printf " │ %-52s│\n" "$display_title"
|
|
691
|
+
echo " ├──────────────────────────────────────────────────────┤"
|
|
692
|
+
printf " │ Progress: [%s] %d/%d stories │\n" "$progress_bar" "$passed_count" "$total_count"
|
|
693
|
+
[[ -n "$commit_hash" ]] && printf " │ Commit: %-42s│\n" "$commit_hash ($files_changed files)"
|
|
694
|
+
if [[ $remaining -eq 0 ]]; then
|
|
695
|
+
echo " │ Status: All stories complete! │"
|
|
696
|
+
else
|
|
697
|
+
printf " │ Remaining: %-41s│\n" "$remaining stories"
|
|
698
|
+
fi
|
|
699
|
+
echo " └──────────────────────────────────────────────────────┘"
|
|
700
|
+
echo ""
|
|
701
|
+
}
|
|
702
|
+
|
|
654
703
|
# Print progress summary at end of run
|
|
655
704
|
print_progress_summary() {
|
|
656
705
|
local start_time="$1"
|