agentic-loop 3.4.5 → 3.4.7
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 +10 -4
- package/ralph/verify/lint.sh +20 -11
package/package.json
CHANGED
package/ralph/loop.sh
CHANGED
|
@@ -311,13 +311,19 @@ run_loop() {
|
|
|
311
311
|
passed_stories=$(jq '[.stories[] | select(.passes==true)] | length' "$RALPH_DIR/prd.json")
|
|
312
312
|
current_num=$((passed_stories + 1))
|
|
313
313
|
|
|
314
|
-
# Display dynamic banner
|
|
314
|
+
# Display dynamic banner (truncate long text to fit box)
|
|
315
|
+
local max_width=53
|
|
316
|
+
local display_title="$story_title"
|
|
317
|
+
local display_desc="$story_desc"
|
|
318
|
+
[[ ${#display_title} -gt $max_width ]] && display_title="${display_title:0:$((max_width-3))}..."
|
|
319
|
+
[[ ${#display_desc} -gt $max_width ]] && display_desc="${display_desc:0:$((max_width-3))}..."
|
|
320
|
+
|
|
315
321
|
echo ""
|
|
316
322
|
echo "┌─────────────────────────────────────────────────────────┐"
|
|
317
323
|
printf "│ %s %-14s [%d/%d] %s │\n" "$story_emoji" "$story" "$current_num" "$total_stories" "$(progress_bar $current_num $total_stories)"
|
|
318
|
-
printf "│ %-55s
|
|
319
|
-
printf "│ %-55s
|
|
320
|
-
printf "│ Type: %-49s
|
|
324
|
+
printf "│ %-55s│\n" "$display_title"
|
|
325
|
+
printf "│ %-55s│\n" "$display_desc"
|
|
326
|
+
printf "│ Type: %-49s│\n" "$story_type"
|
|
321
327
|
echo "└─────────────────────────────────────────────────────────┘"
|
|
322
328
|
echo ""
|
|
323
329
|
|
package/ralph/verify/lint.sh
CHANGED
|
@@ -3,18 +3,27 @@
|
|
|
3
3
|
# lint.sh - Lint and auto-fix verification module for ralph
|
|
4
4
|
|
|
5
5
|
# Auto-fix lint issues before running checks
|
|
6
|
+
# Usage: run_auto_fix [story_type]
|
|
6
7
|
run_auto_fix() {
|
|
8
|
+
local story_type="${1:-general}"
|
|
7
9
|
echo " Auto-fixing lint issues..."
|
|
8
10
|
|
|
9
|
-
# Python: ruff fix (
|
|
10
|
-
if
|
|
11
|
-
|
|
11
|
+
# Python: ruff fix (skip for frontend-only stories)
|
|
12
|
+
if [[ "$story_type" != "frontend" ]]; then
|
|
13
|
+
if command -v ruff &>/dev/null; then
|
|
14
|
+
ruff check --fix . >/dev/null 2>&1 || true
|
|
15
|
+
fi
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
# Skip JS/TS auto-fix for backend stories
|
|
19
|
+
if [[ "$story_type" == "backend" ]]; then
|
|
20
|
+
return 0
|
|
12
21
|
fi
|
|
13
22
|
|
|
14
|
-
# JavaScript/TypeScript: eslint fix (root)
|
|
23
|
+
# JavaScript/TypeScript: eslint fix (root) - suppress all output
|
|
15
24
|
if [[ -f "package.json" ]] && command -v npx &>/dev/null; then
|
|
16
25
|
if grep -q '"eslint"' package.json 2>/dev/null || [[ -f ".eslintrc.js" ]] || [[ -f "eslint.config.js" ]]; then
|
|
17
|
-
npx eslint --fix .
|
|
26
|
+
npx eslint --fix . >/dev/null 2>&1 || true
|
|
18
27
|
fi
|
|
19
28
|
fi
|
|
20
29
|
|
|
@@ -25,25 +34,25 @@ run_auto_fix() {
|
|
|
25
34
|
while IFS= read -r fe_dir; do
|
|
26
35
|
[[ -z "$fe_dir" ]] && continue
|
|
27
36
|
[[ ! -f "$fe_dir/package.json" ]] && continue
|
|
28
|
-
# ESLint fix
|
|
37
|
+
# ESLint fix - suppress output
|
|
29
38
|
if grep -q '"eslint"' "$fe_dir/package.json" 2>/dev/null; then
|
|
30
|
-
(cd "$fe_dir" && npx eslint --fix .
|
|
39
|
+
(cd "$fe_dir" && npx eslint --fix . >/dev/null 2>&1) || true
|
|
31
40
|
fi
|
|
32
41
|
|
|
33
42
|
# Next.js lint fix
|
|
34
43
|
if grep -q '"next"' "$fe_dir/package.json" 2>/dev/null; then
|
|
35
|
-
(cd "$fe_dir" && npx next lint --fix
|
|
44
|
+
(cd "$fe_dir" && npx next lint --fix >/dev/null 2>&1) || true
|
|
36
45
|
fi
|
|
37
46
|
|
|
38
47
|
# Prettier fix (common in frontend)
|
|
39
48
|
if grep -q '"prettier"' "$fe_dir/package.json" 2>/dev/null; then
|
|
40
|
-
(cd "$fe_dir" && npx prettier --write .
|
|
49
|
+
(cd "$fe_dir" && npx prettier --write . >/dev/null 2>&1) || true
|
|
41
50
|
fi
|
|
42
51
|
done <<< "$fe_dirs"
|
|
43
52
|
|
|
44
53
|
# Prettier fix (root - for non-monorepo)
|
|
45
54
|
if [[ -f "package.json" ]] && grep -q '"prettier"' package.json 2>/dev/null; then
|
|
46
|
-
npx prettier --write .
|
|
55
|
+
npx prettier --write . >/dev/null 2>&1 || true
|
|
47
56
|
fi
|
|
48
57
|
}
|
|
49
58
|
|
|
@@ -461,7 +470,7 @@ run_configured_checks() {
|
|
|
461
470
|
local story_type="${1:-general}"
|
|
462
471
|
|
|
463
472
|
# ALWAYS run auto-fix (harmless, just formats code)
|
|
464
|
-
run_auto_fix
|
|
473
|
+
run_auto_fix "$story_type"
|
|
465
474
|
|
|
466
475
|
# Lint check - skip irrelevant checks based on story type
|
|
467
476
|
if check_enabled "lint"; then
|