golem-cc 0.1.24 → 0.1.26
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/bin/golem +36 -2
- package/package.json +1 -1
package/bin/golem
CHANGED
|
@@ -145,6 +145,15 @@ is_plan_complete() {
|
|
|
145
145
|
return $EXIT_INCOMPLETE
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
+
# Get the current (first incomplete) task from the plan
|
|
149
|
+
get_current_task() {
|
|
150
|
+
local plan=".golem/IMPLEMENTATION_PLAN.md"
|
|
151
|
+
if [[ -f "$plan" ]]; then
|
|
152
|
+
# Find first unchecked task and extract its title
|
|
153
|
+
grep -E '^\s*-\s*\[ \]' "$plan" | head -1 | sed 's/.*\[ \] //' | sed 's/^[0-9]*\.\s*//' | cut -c1-60
|
|
154
|
+
fi
|
|
155
|
+
}
|
|
156
|
+
|
|
148
157
|
# Get task counts for display
|
|
149
158
|
get_task_counts() {
|
|
150
159
|
local plan=".golem/IMPLEMENTATION_PLAN.md"
|
|
@@ -484,6 +493,9 @@ run_build_loop() {
|
|
|
484
493
|
local max_iterations="$1"
|
|
485
494
|
local simplify="$2"
|
|
486
495
|
|
|
496
|
+
# Handle Ctrl+C gracefully
|
|
497
|
+
trap 'echo ""; echo -e "${YELLOW} Build interrupted by user${NC}"; log_event "BUILD_INTERRUPTED" "User cancelled"; exit 130' INT
|
|
498
|
+
|
|
487
499
|
print_banner
|
|
488
500
|
|
|
489
501
|
# Verify prerequisites
|
|
@@ -539,8 +551,10 @@ run_build_loop() {
|
|
|
539
551
|
break
|
|
540
552
|
fi
|
|
541
553
|
|
|
542
|
-
# Get task counts for display
|
|
554
|
+
# Get task counts and current task for display
|
|
543
555
|
read -r remaining checked <<< "$(get_task_counts)"
|
|
556
|
+
local current_task
|
|
557
|
+
current_task=$(get_current_task)
|
|
544
558
|
|
|
545
559
|
echo ""
|
|
546
560
|
hr "─" "$BLUE"
|
|
@@ -548,6 +562,9 @@ run_build_loop() {
|
|
|
548
562
|
local progress_pct=0
|
|
549
563
|
[[ $total -gt 0 ]] && progress_pct=$((checked * 100 / total))
|
|
550
564
|
echo -e "${BLUE} ▸ Iteration ${BOLD}$iteration${NC}${BLUE} Tasks: ${GREEN}$checked${BLUE}/${total} ${DIM}($progress_pct%)${NC}"
|
|
565
|
+
if [[ -n "$current_task" ]]; then
|
|
566
|
+
echo -e "${CYAN} ▸ Task:${NC} ${current_task}"
|
|
567
|
+
fi
|
|
551
568
|
hr "─" "$BLUE"
|
|
552
569
|
|
|
553
570
|
local iter_start=$(date +%s)
|
|
@@ -562,8 +579,25 @@ run_build_loop() {
|
|
|
562
579
|
|
|
563
580
|
local iter_end=$(date +%s)
|
|
564
581
|
local iter_duration=$((iter_end - iter_start))
|
|
582
|
+
local iter_mins=$((iter_duration / 60))
|
|
583
|
+
local iter_secs=$((iter_duration % 60))
|
|
565
584
|
log_event "ITERATION_END" "iteration=$iteration exit_code=$claude_exit duration=${iter_duration}s"
|
|
566
585
|
|
|
586
|
+
# Show iteration summary
|
|
587
|
+
echo ""
|
|
588
|
+
if [[ $claude_exit -eq 0 ]]; then
|
|
589
|
+
echo -e " ${GREEN}✓${NC} Iteration $iteration completed ${DIM}(${iter_mins}m ${iter_secs}s)${NC}"
|
|
590
|
+
else
|
|
591
|
+
echo -e " ${YELLOW}!${NC} Iteration $iteration exited with code $claude_exit ${DIM}(${iter_mins}m ${iter_secs}s)${NC}"
|
|
592
|
+
fi
|
|
593
|
+
|
|
594
|
+
# Show what changed
|
|
595
|
+
local files_changed
|
|
596
|
+
files_changed=$(git diff --name-only HEAD~1 2>/dev/null | wc -l | tr -d ' ')
|
|
597
|
+
if [[ "$files_changed" -gt 0 ]]; then
|
|
598
|
+
echo -e " ${DIM}Files changed: $files_changed${NC}"
|
|
599
|
+
fi
|
|
600
|
+
|
|
567
601
|
# Push changes after each iteration (like Ralph)
|
|
568
602
|
local current_branch=$(git branch --show-current)
|
|
569
603
|
git push origin "$current_branch" 2>/dev/null || {
|
|
@@ -572,7 +606,7 @@ run_build_loop() {
|
|
|
572
606
|
}
|
|
573
607
|
|
|
574
608
|
echo ""
|
|
575
|
-
|
|
609
|
+
hr "─" "$DIM"
|
|
576
610
|
echo ""
|
|
577
611
|
done
|
|
578
612
|
|