agentic-loop 3.17.2 → 3.17.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-loop",
3
- "version": "3.17.2",
3
+ "version": "3.17.4",
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",
@@ -2,18 +2,6 @@
2
2
  "_comment": "Copy this 'hooks' section into your ~/.claude/settings.json or .claude/settings.json",
3
3
  "_instructions": "Replace VIBE_PATH with the path to your agentic-loop installation",
4
4
  "hooks": {
5
- "PreToolUse": [
6
- {
7
- "matcher": "Edit|Write",
8
- "hooks": [
9
- {
10
- "type": "command",
11
- "command": "VIBE_PATH/ralph/hooks/protect-prd.sh",
12
- "timeout": 5
13
- }
14
- ]
15
- }
16
- ],
17
5
  "PostToolUse": [
18
6
  {
19
7
  "matcher": "Edit|Write",
@@ -111,18 +111,6 @@ fi
111
111
  # Build hooks config with actual path
112
112
  HOOKS_CONFIG=$(cat <<EOF
113
113
  {
114
- "PreToolUse": [
115
- {
116
- "matcher": "Edit|Write",
117
- "hooks": [
118
- {
119
- "type": "command",
120
- "command": "$SCRIPT_DIR/protect-prd.sh",
121
- "timeout": 5
122
- }
123
- ]
124
- }
125
- ],
126
114
  "PostToolUse": [
127
115
  {
128
116
  "matcher": "Edit|Write",
@@ -195,7 +183,6 @@ echo "$MERGED" > "$SETTINGS_FILE"
195
183
  echo -e "${GREEN}✓ Hooks installed successfully!${NC}"
196
184
  echo ""
197
185
  echo "Hooks enabled:"
198
- echo " • protect-prd.sh - Blocks edits to prd.json"
199
186
  echo " • warn-debug.sh - Warns about console.log/debugger"
200
187
  echo " • warn-secrets.sh - Warns about hardcoded secrets/API keys"
201
188
  echo " • warn-urls.sh - Warns about hardcoded localhost URLs"
package/ralph/setup.sh CHANGED
@@ -353,8 +353,7 @@ setup_claude_hooks() {
353
353
  }
354
354
 
355
355
  # Resolve each hook path (project hooks take priority over global)
356
- local protect_prd warn_debug warn_secrets warn_urls warn_empty_catch log_tools inject_context save_learnings
357
- protect_prd=$(_resolve_hook "protect-prd.sh")
356
+ local warn_debug warn_secrets warn_urls warn_empty_catch log_tools inject_context save_learnings
358
357
  warn_debug=$(_resolve_hook "warn-debug.sh")
359
358
  warn_secrets=$(_resolve_hook "warn-secrets.sh")
360
359
  warn_urls=$(_resolve_hook "warn-urls.sh")
@@ -364,11 +363,7 @@ setup_claude_hooks() {
364
363
  save_learnings=$(_resolve_hook "save-learnings.sh")
365
364
 
366
365
  # Build hooks arrays using jq for proper JSON
367
- local pre_tool_hooks post_edit_hooks post_all_hooks session_start_hooks stop_hooks
368
-
369
- # PreToolUse: protect-prd on Edit|Write
370
- pre_tool_hooks="[]"
371
- [[ -n "$protect_prd" ]] && pre_tool_hooks=$(jq -n --arg cmd "$protect_prd" '[{"type": "command", "command": $cmd, "timeout": 5}]')
366
+ local post_edit_hooks post_all_hooks session_start_hooks stop_hooks
372
367
 
373
368
  # PostToolUse: warn-* hooks on Edit|Write
374
369
  post_edit_hooks="[]"
@@ -391,13 +386,11 @@ setup_claude_hooks() {
391
386
  # Build the complete hooks config
392
387
  local hooks_config
393
388
  hooks_config=$(jq -n \
394
- --argjson pre_tool "$pre_tool_hooks" \
395
389
  --argjson post_edit "$post_edit_hooks" \
396
390
  --argjson post_all "$post_all_hooks" \
397
391
  --argjson session_start "$session_start_hooks" \
398
392
  --argjson stop "$stop_hooks" \
399
393
  '{
400
- "PreToolUse": [{"matcher": "Edit|Write", "hooks": $pre_tool}],
401
394
  "PostToolUse": [
402
395
  {"matcher": "Edit|Write", "hooks": $post_edit},
403
396
  {"matcher": "*", "hooks": $post_all}
@@ -1,30 +0,0 @@
1
- #!/usr/bin/env bash
2
- # protect-prd.sh - Protect prd.json from marking stories as passed
3
- # Hook: PreToolUse matcher: "Edit|Write"
4
- #
5
- # Allows: Most edits to prd.json (adding fields, fixing test steps, etc.)
6
- # Blocks: Edits that mark stories as "passes": true (Ralph handles this)
7
-
8
- set -euo pipefail
9
-
10
- INPUT=$(cat)
11
- FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // .tool_input.path // ""')
12
-
13
- # Check if editing prd.json
14
- if [[ "$FILE_PATH" == *"prd.json"* ]]; then
15
- # Get the new content being written
16
- NEW_STRING=$(echo "$INPUT" | jq -r '.tool_input.new_string // .tool_input.content // ""')
17
-
18
- # Block if trying to set passes to true (Ralph handles story completion)
19
- if echo "$NEW_STRING" | grep -qE '"passes"\s*:\s*true'; then
20
- echo "BLOCKED: Cannot mark stories as passed. Ralph handles this after verification." >&2
21
- exit 2 # Exit code 2 = blocking error
22
- fi
23
-
24
- # Allow all other prd.json edits (adding mcp, constraints, fixing testSteps, etc.)
25
- echo '{"continue": true}'
26
- exit 0
27
- fi
28
-
29
- # Allow all other edits
30
- echo '{"continue": true}'