agentic-loop 3.2.6 → 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/ralph/verify/lint.sh +12 -6
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"
|
package/ralph/verify/lint.sh
CHANGED
|
@@ -114,11 +114,11 @@ verify_lint() {
|
|
|
114
114
|
if grep -q '"eslint"' package.json 2>/dev/null || [[ -f ".eslintrc.js" ]] || [[ -f "eslint.config.js" ]]; then
|
|
115
115
|
echo -n " ESLint check... "
|
|
116
116
|
local eslint_output
|
|
117
|
-
if eslint_output=$(npx eslint .
|
|
117
|
+
if eslint_output=$(npx eslint . 2>&1); then
|
|
118
118
|
print_success "passed"
|
|
119
119
|
else
|
|
120
120
|
# Check if it's real errors or just warnings
|
|
121
|
-
if echo "$eslint_output" | grep -qE "✖ [0-9]+ problems? \([1-9]"; then
|
|
121
|
+
if echo "$eslint_output" | grep -qE "✖ [0-9]+ problems? \([1-9][0-9]* errors?"; then
|
|
122
122
|
print_error "failed"
|
|
123
123
|
echo ""
|
|
124
124
|
echo " ESLint errors:"
|
|
@@ -130,7 +130,10 @@ verify_lint() {
|
|
|
130
130
|
} >> "$lint_log"
|
|
131
131
|
failed=1
|
|
132
132
|
else
|
|
133
|
-
|
|
133
|
+
# Warnings only - pass without showing them
|
|
134
|
+
local warning_count
|
|
135
|
+
warning_count=$(echo "$eslint_output" | grep -oE "[0-9]+ warnings?" | head -1 | grep -oE "[0-9]+" || echo "0")
|
|
136
|
+
print_success "passed ($warning_count warnings)"
|
|
134
137
|
fi
|
|
135
138
|
fi
|
|
136
139
|
fi
|
|
@@ -147,10 +150,10 @@ verify_lint() {
|
|
|
147
150
|
|
|
148
151
|
echo -n " ESLint check ($fe_dir)... "
|
|
149
152
|
local eslint_output
|
|
150
|
-
if eslint_output=$(cd "$fe_dir" && npx eslint .
|
|
153
|
+
if eslint_output=$(cd "$fe_dir" && npx eslint . 2>&1); then
|
|
151
154
|
print_success "passed"
|
|
152
155
|
else
|
|
153
|
-
if echo "$eslint_output" | grep -qE "✖ [0-9]+ problems? \([1-9]"; then
|
|
156
|
+
if echo "$eslint_output" | grep -qE "✖ [0-9]+ problems? \([1-9][0-9]* errors?"; then
|
|
154
157
|
print_error "failed"
|
|
155
158
|
echo ""
|
|
156
159
|
echo " ESLint errors in $fe_dir:"
|
|
@@ -162,7 +165,10 @@ verify_lint() {
|
|
|
162
165
|
} >> "$lint_log"
|
|
163
166
|
failed=1
|
|
164
167
|
else
|
|
165
|
-
|
|
168
|
+
# Warnings only - pass without showing them
|
|
169
|
+
local warning_count
|
|
170
|
+
warning_count=$(echo "$eslint_output" | grep -oE "[0-9]+ warnings?" | head -1 | grep -oE "[0-9]+" || echo "0")
|
|
171
|
+
print_success "passed ($warning_count warnings)"
|
|
166
172
|
fi
|
|
167
173
|
fi
|
|
168
174
|
done <<< "$fe_dirs"
|