projecta-rrr 1.18.7 → 1.18.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/CHANGELOG.md CHANGED
@@ -4,6 +4,25 @@ All notable changes to RRR will be documented in this file.
4
4
 
5
5
  Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
+ ## [1.18.8] - 2026-02-03
8
+
9
+ ### Fixed
10
+
11
+ - **HUD scripts actually removed** - v1.18.7 said they were removed but files still existed
12
+ - Deleted `scripts/rrr-hud.js`, `scripts/rrr-hud-dynamic.js`, and `hooks/rrr-sync-hud-state.sh`
13
+ - These were stated as removed in v1.18.7 but only removed from being called, not physically deleted
14
+ - **Intent gate now works without HUD** - Reads directly from `.planning/STATE.md` instead of `hud-state.json`
15
+ - Fixes drift detection after HUD removal
16
+ - No longer depends on removed `rrr-sync-hud-state.sh` sync script
17
+ - **Version mismatch false positives** - Simplified version check in `/rrr:new-milestone`
18
+ - No longer compares package.json version (npm release) with milestone version (feature delivery)
19
+ - These are different things and don't need to match (0.1.0 working on v1.0 is valid)
20
+ - Only checks: does CHANGELOG match package.json?
21
+
22
+ ### Changed
23
+
24
+ - **OhMyPosh docs deprecated** - Added warnings that automated sync no longer works
25
+
7
26
  ## [1.18.7] - 2026-02-03
8
27
 
9
28
  ### Removed
@@ -108,83 +108,56 @@ Milestone name: $ARGUMENTS (optional - will prompt if not provided)
108
108
  **If no patches (PATCH_COUNT = 0 or file doesn't exist):**
109
109
  - Skip silently, continue to step 1.5
110
110
 
111
- 1.5. **Version consistency check (MANDATORY):**
111
+ 1.5. **Version consistency check (SIMPLIFIED):**
112
112
 
113
- Before writing any milestone files, verify version consistency.
113
+ Verify CHANGELOG matches package.json (if CHANGELOG exists).
114
114
 
115
115
  **Important context:**
116
- - `package.json` is the CANONICAL source of truth for the current version
117
- - `/rrr:check-version` compares against npm registry (different concern — checks if release is published)
118
- - Documentation version drift is normal after updates — auto-fix is almost always the right choice
116
+ - `package.json` version = npm release version (e.g., 0.1.0)
117
+ - Milestone version = feature delivery version (e.g., v1.0)
118
+ - These are DIFFERENT and don't need to match!
119
+ - Only check: does CHANGELOG match package.json?
119
120
 
120
121
  ```bash
121
- # Read canonical version from package.json
122
- CANONICAL_VERSION=$(node -p "require('./package.json').version" 2>/dev/null)
123
- echo "Canonical version (package.json): $CANONICAL_VERSION"
124
-
125
- # Read CHANGELOG version
126
- CHANGELOG_VERSION=$(grep -E "^## \[[0-9]" CHANGELOG.md 2>/dev/null | head -1 | sed 's/## \[\([^]]*\)\].*/\1/')
127
- echo "CHANGELOG version: $CHANGELOG_VERSION"
128
-
129
- # Read planning doc versions
130
- ROADMAP_VERSION=$(grep -oE "v[0-9]+\.[0-9]+(\.[0-9]+)?" .planning/ROADMAP.md 2>/dev/null | head -1)
131
- STATE_VERSION=$(grep -oE "v[0-9]+\.[0-9]+(\.[0-9]+)?" .planning/STATE.md 2>/dev/null | head -1)
122
+ # Read package.json version
123
+ PKG_VERSION=$(node -p "require('./package.json').version" 2>/dev/null || echo "")
124
+
125
+ # Read CHANGELOG version (first entry)
126
+ if [ -f "CHANGELOG.md" ]; then
127
+ CHANGELOG_VERSION=$(grep -E "^## \[[0-9]" CHANGELOG.md 2>/dev/null | head -1 | sed 's/## \[\([^]]*\)\].*/\1/')
128
+
129
+ if [ -n "$CHANGELOG_VERSION" ] && [ "$PKG_VERSION" != "$CHANGELOG_VERSION" ]; then
130
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
131
+ echo "VERSION MISMATCH DETECTED"
132
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
133
+ echo "package.json: $PKG_VERSION"
134
+ echo "CHANGELOG.md: $CHANGELOG_VERSION"
135
+ echo ""
136
+ echo "CHANGELOG should match package.json for release tracking."
137
+ # Ask user if they want to fix this or continue
138
+ fi
139
+ else
140
+ echo "No CHANGELOG.md found - skipping version check"
141
+ fi
132
142
  ```
133
143
 
134
- **Version mismatch detection:**
135
-
136
- Extract major.minor from canonical version and compare:
137
- - If CHANGELOG major.minor != canonical major.minor → MISMATCH
138
- - If planning docs reference different milestone version → MISMATCH
139
-
140
144
  **If mismatch detected:**
141
145
 
142
- ```
143
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
144
- VERSION SYNC NEEDED
145
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
146
-
147
- Canonical (package.json): {CANONICAL_VERSION}
148
- CHANGELOG.md: {CHANGELOG_VERSION}
149
- Planning docs: {ROADMAP_VERSION}
150
-
151
- This is normal after updates. Auto-fix will sync docs to package.json.
152
- ```
153
-
154
146
  Use AskUserQuestion:
155
147
  - header: "Version"
156
- - question: "Documentation versions need sync. How would you like to proceed?"
148
+ - question: "CHANGELOG version doesn't match package.json. Fix this?"
157
149
  - options:
158
- - "Auto-fix now (Recommended)" — Update docs to match package.json
159
- - "Run /rrr:check-version" — Check npm registry status (different concern won't fix doc drift)
160
- - "Continue anyway" — Proceed with mismatched versions (documentation debt)
161
- - "Abort" — Cancel milestone creation
162
-
163
- **If "Auto-fix now (Recommended)":**
164
- - Update CHANGELOG.md with [Unreleased] header if needed
165
- - Update planning docs milestone references to match canonical
166
- - Continue to step 2
167
-
168
- **If "Run /rrr:check-version":**
169
- ```
170
- Note: /rrr:check-version compares package.json against the npm registry.
171
- This is useful for checking publish status, but won't fix documentation drift.
172
- You may still need to run "Auto-fix now" after.
150
+ - "Yes, update CHANGELOG (Recommended)" — Update CHANGELOG to match package.json
151
+ - "No, continue anyway" — Proceed with mismatch (can fix later with /rrr:check-version)
173
152
 
174
- Run `/rrr:check-version` to check registry status, then return to `/rrr:new-milestone`
175
- ```
176
- Exit command.
177
-
178
- **If "Continue anyway":**
179
- ```
180
- Continuing with version mismatch. This creates documentation debt.
181
- Consider running `/rrr:new-milestone` again later with "Auto-fix now" to sync versions.
182
- ```
183
- Continue to step 2.
153
+ **If "Yes, update CHANGELOG":**
154
+ - Add/update CHANGELOG entry to match package.json version
155
+ - Continue to step 2
184
156
 
185
- **If "Abort":** Exit command.
157
+ **If "No, continue anyway":**
158
+ - Continue to step 2 (user can fix later)
186
159
 
187
- **If versions match:** Continue to step 2.
160
+ **If no mismatch:** Continue to step 2.
188
161
 
189
162
  2. **Gather milestone goals:**
190
163
 
@@ -1,5 +1,9 @@
1
1
  # OhMyPosh HUD Setup Guide
2
2
 
3
+ > **⚠️ DEPRECATED**: As of v1.18.7, the automated HUD sync scripts have been removed.
4
+ > This integration requires manual state updates via `rrr-state-manager.js`.
5
+ > Consider using inline status updates instead (built into RRR v1.18.4+).
6
+
3
7
  This guide explains how to set up the RRR HUD using OhMyPosh with **Kushal theme** styling (recommended) or Atomic theme.
4
8
 
5
9
  ## Theme Options
@@ -1,5 +1,8 @@
1
1
  # OhMyPosh Integration for RRR HUD
2
2
 
3
+ > **⚠️ DEPRECATED**: As of v1.18.7, automated HUD sync scripts have been removed.
4
+ > OhMyPosh integration requires manual state updates. Use RRR's inline status display instead.
5
+
3
6
  Display RRR context (intent, drift status, session duration) in your terminal prompt using OhMyPosh.
4
7
 
5
8
  ## Prerequisites
@@ -20,8 +20,8 @@ fi
20
20
  # SKIP CONDITIONS - Let these through without gate
21
21
  # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
22
22
 
23
- # Skip empty or very short messages (lowered from 15 to 8 to catch "fix a bug")
24
- [[ -z "$USER_MESSAGE" || ${#USER_MESSAGE} -lt 8 ]] && exit 0
23
+ # Skip empty or very short messages (5 chars catches "add X", "fix Y", etc.)
24
+ [[ -z "$USER_MESSAGE" || ${#USER_MESSAGE} -lt 5 ]] && exit 0
25
25
 
26
26
  # Skip slash commands (already intentional)
27
27
  [[ "$USER_MESSAGE" == /* ]] && exit 0
@@ -39,22 +39,44 @@ echo "$msg_lower" | grep -qE "^(what|why|how|where|when|which|can you explain|ex
39
39
  echo "$msg_lower" | grep -qE "\?$" && exit 0
40
40
 
41
41
  # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
42
- # CHECK STATE - Only gate if no active plan
42
+ # CHECK STATE - Read directly from .planning/ files
43
43
  # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
44
44
 
45
- HUD_FILE="${HOME}/.claude/rrr/hud-state.json"
46
- [[ ! -f "$HUD_FILE" ]] && exit 0
47
-
48
- status=$(jq -r '.status // ""' "$HUD_FILE" 2>/dev/null)
49
- plan=$(jq -r '.plan // ""' "$HUD_FILE" 2>/dev/null)
50
- phase=$(jq -r '.phase // ""' "$HUD_FILE" 2>/dev/null)
51
- milestone=$(jq -r '.milestone // ""' "$HUD_FILE" 2>/dev/null)
45
+ # Find RRR project root (look for .planning directory)
46
+ RRR_PROJECT=""
47
+ current_dir="$(pwd)"
48
+ for i in 0 1 2 3 4 5; do
49
+ if [ -d ".planning" ]; then
50
+ RRR_PROJECT="$(pwd)"
51
+ break
52
+ fi
53
+ cd .. 2>/dev/null || break
54
+ done
55
+ cd "$current_dir" 2>/dev/null
56
+
57
+ # Not in an RRR project - skip gate
58
+ [[ -z "$RRR_PROJECT" ]] && exit 0
59
+
60
+ # Check STATE.md for active work
61
+ STATE_FILE="${RRR_PROJECT}/.planning/STATE.md"
62
+ if [ -f "$STATE_FILE" ]; then
63
+ # Extract current position from STATE.md
64
+ milestone=$(grep -E "^Milestone:" "$STATE_FILE" 2>/dev/null | sed 's/Milestone:[[:space:]]*//' | tr -d '\r\n' || echo "")
65
+ phase=$(grep -E "^Phase:" "$STATE_FILE" 2>/dev/null | sed 's/Phase:[[:space:]]*//' | tr -d '\r\n' || echo "")
66
+ plan=$(grep -E "^Plan:" "$STATE_FILE" 2>/dev/null | sed 's/Plan:[[:space:]]*//' | tr -d '\r\n' || echo "")
67
+ status=$(grep -E "^Status:" "$STATE_FILE" 2>/dev/null | sed 's/Status:[[:space:]]*//' | tr -d '\r\n' || echo "")
68
+ else
69
+ milestone=""
70
+ phase=""
71
+ plan=""
72
+ status=""
73
+ fi
52
74
 
53
- # If we have an active plan, let through
54
- [[ -n "$plan" && "$plan" != "null" ]] && exit 0
75
+ # If we have an active plan (not "—" or empty), let through
76
+ [[ -n "$plan" && "$plan" != "—" && "$plan" != "null" ]] && exit 0
55
77
 
56
- # If status is active (working on something), let through
57
- [[ "$status" == "active" ]] && exit 0
78
+ # If status contains "Executing", let through
79
+ echo "$status" | grep -qi "executing" && exit 0
58
80
 
59
81
  # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
60
82
  # DETECT WORK REQUESTS - Only gate substantial work
@@ -67,18 +89,19 @@ if echo "$msg_lower" | grep -qiE "$work_patterns"; then
67
89
  echo ""
68
90
  echo "<MANDATORY-INTENT-GATE>"
69
91
  echo ""
70
- echo "I detected a work request but you have no active plan."
92
+ echo "⚠️ DRIFT DETECTED: Work request without active plan"
71
93
  echo ""
72
- echo " Current: ${milestone:-no milestone} / ${phase:-no phase} / ${plan:-no plan}"
73
- echo " Status: ${status:-unknown}"
94
+ echo " Current: ${milestone:-no milestone} / ${phase:-no phase} / ${plan:-—}"
95
+ echo " Status: ${status:-Defining requirements}"
74
96
  echo ""
75
- echo "Before I proceed, where should this work go?"
97
+ echo "Where should this work be tracked?"
76
98
  echo ""
77
- echo " 1) /rrr:plan-phase - Create a tracked phase for this work"
78
- echo " 2) /rrr:add-todo - Save to backlog for later"
79
- echo " 3) Type 'adhoc' - Do it now without tracking"
99
+ echo " 1. /rrr:plan-phase - Create a tracked phase"
100
+ echo " 2. /rrr:add-todo - Save to backlog"
101
+ echo " 3. Type 'adhoc' - Quick fix (untracked)"
80
102
  echo ""
81
103
  echo "</MANDATORY-INTENT-GATE>"
104
+ echo ""
82
105
  exit 1 # BLOCK until user classifies
83
106
  fi
84
107
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "projecta-rrr",
3
- "version": "1.18.7",
3
+ "version": "1.18.8",
4
4
  "description": "A meta-prompting, context engineering and spec-driven development system for Claude Code by Projecta.ai",
5
5
  "bin": {
6
6
  "projecta-rrr": "bin/install.js"
package/scripts/jarvis.sh CHANGED
@@ -103,123 +103,6 @@ load_libraries() {
103
103
 
104
104
  load_libraries
105
105
 
106
- # ═══════════════════════════════════════════════════════════════════════════════
107
- # Phase Paths Library (supports both old and new structures)
108
- # ═══════════════════════════════════════════════════════════════════════════════
109
-
110
- PHASE_PATHS_LOADED=false
111
-
112
- load_phase_paths() {
113
- local lib_paths=("$SCRIPT_DIR/../rrr/lib" "${HOME}/.claude/rrr/lib")
114
-
115
- for lib_dir in "${lib_paths[@]}"; do
116
- if [[ -d "$lib_dir" ]] && [[ -f "$lib_dir/phase-paths.md" ]]; then
117
- # Source the phase-paths library functions
118
- source /dev/stdin <<'PHASE_FUNCTIONS' 2>/dev/null || true
119
- # Get the base directory for phases (supports both structures)
120
- get_phase_base_dir() {
121
- local planning_dir="${1:-.planning}"
122
- local roadmap_file="$planning_dir/ROADMAP.md"
123
-
124
- # Strategy 1: Look for ## Current Milestone: header
125
- local active_milestone=""
126
- if [ -f "$roadmap_file" ]; then
127
- active_milestone=$(grep -E "^## Current Milestone:" "$roadmap_file" 2>/dev/null | \
128
- grep -oE "v[0-9]+\.[0-9]+" | head -1)
129
- fi
130
-
131
- # Strategy 2: Look for :construction: marker
132
- if [ -z "$active_milestone" ]; then
133
- active_milestone=$(grep -E ":construction:" "$roadmap_file" 2>/dev/null | \
134
- grep -oE "v[0-9]+\.[0-9]+" | head -1)
135
- fi
136
-
137
- # Use milestone phases dir if found
138
- if [ -n "$active_milestone" ]; then
139
- local phases_dir="$planning_dir/milestones/$active_milestone/phases"
140
- echo "$phases_dir"
141
- return 0
142
- fi
143
-
144
- # Legacy fallback
145
- echo "$planning_dir/phases"
146
- return 0
147
- }
148
-
149
- # Find a phase directory by number
150
- find_phase_dir() {
151
- local phase_number="$1"
152
- local planning_dir="${2:-.planning}"
153
- local roadmap_file="$planning_dir/ROADMAP.md"
154
-
155
- if [ -z "$phase_number" ]; then
156
- return 1
157
- fi
158
-
159
- # Normalize phase number
160
- local phase_pattern
161
- if [[ "$phase_number" =~ \\. ]]; then
162
- phase_pattern="${phase_number}-*"
163
- else
164
- local padded=$(printf "%02d" "$phase_number" 2>/dev/null || echo "$phase_number")
165
- phase_pattern="${padded}-*"
166
- fi
167
-
168
- # Get active milestone
169
- local active_milestone=""
170
- if [ -f "$roadmap_file" ]; then
171
- active_milestone=$(grep -E "Current Milestone|:construction:" "$roadmap_file" 2>/dev/null | head -1 | grep -oE "v[0-9]+\.[0-9]+" | head -1)
172
- fi
173
-
174
- # Search in current milestone
175
- if [ -n "$active_milestone" ]; then
176
- local milestone_phases="$planning_dir/milestones/$active_milestone/phases"
177
- if [ -d "$milestone_phases" ]; then
178
- local found
179
- found=$(find "$milestone_phases" -maxdepth 1 -type d -name "$phase_pattern" 2>/dev/null | head -1)
180
- if [ -n "$found" ] && [ -d "$found" ]; then
181
- echo "$found"
182
- return 0
183
- fi
184
- fi
185
- fi
186
-
187
- # Fallback to old structure
188
- if [ -d "$planning_dir/phases" ]; then
189
- local found
190
- found=$(find "$planning_dir/phases" -maxdepth 1 -type d -name "$phase_pattern" 2>/dev/null | head -1)
191
- if [ -n "$found" ] && [ -d "$found" ]; then
192
- echo "$found"
193
- return 0
194
- fi
195
- fi
196
-
197
- return 1
198
- }
199
- PHASE_FUNCTIONS
200
- PHASE_PATHS_LOADED=true
201
- break
202
- fi
203
- done
204
- }
205
-
206
- load_phase_paths
207
-
208
- # Resolve PHASES_DIR dynamically (support both old and new structures)
209
- if [ "$PHASE_PATHS_LOADED" = true ]; then
210
- PHASES_DIR=$(get_phase_base_dir "$PLANNING_DIR")
211
- else
212
- # Fallback: check if new structure exists
213
- if [ -d "$PLANNING_DIR/milestones" ]; then
214
- # Find active milestone from roadmap
215
- local active_milestone
216
- active_milestone=$(grep -E ":construction:|Current Milestone" "$ROADMAP_FILE" 2>/dev/null | grep -oE "v[0-9]+\.[0-9]+" | head -1)
217
- if [ -n "$active_milestone" ]; then
218
- PHASES_DIR="$PLANNING_DIR/milestones/$active_milestone/phases"
219
- fi
220
- fi
221
- fi
222
-
223
106
  # ═══════════════════════════════════════════════════════════════════════════════
224
107
  # jq Resolution (optional - graceful fallback)
225
108
  # ═══════════════════════════════════════════════════════════════════════════════
@@ -673,18 +556,6 @@ get_target_phases() {
673
556
 
674
557
  phase_has_plan() {
675
558
  local phase="$1"
676
-
677
- # Use find_phase_dir if library loaded
678
- if [ "$PHASE_PATHS_LOADED" = true ]; then
679
- local phase_dir
680
- phase_dir=$(find_phase_dir "$phase" "$PLANNING_DIR")
681
- if [ -n "$phase_dir" ] && ls "$phase_dir"/*-PLAN.md 1>/dev/null 2>&1; then
682
- return 0
683
- fi
684
- return 1
685
- fi
686
-
687
- # Fallback to old logic
688
559
  local phase_major="${phase%%.*}"
689
560
  local phase_major_padded
690
561
  phase_major_padded=$(printf "%02d" "$phase_major")
@@ -704,18 +575,6 @@ phase_has_plan() {
704
575
 
705
576
  phase_has_summary() {
706
577
  local phase="$1"
707
-
708
- # Use find_phase_dir if library loaded
709
- if [ "$PHASE_PATHS_LOADED" = true ]; then
710
- local phase_dir
711
- phase_dir=$(find_phase_dir "$phase" "$PLANNING_DIR")
712
- if [ -n "$phase_dir" ] && ls "$phase_dir"/*-SUMMARY.md 1>/dev/null 2>&1; then
713
- return 0
714
- fi
715
- return 1
716
- fi
717
-
718
- # Fallback to old logic
719
578
  local phase_major="${phase%%.*}"
720
579
  local phase_major_padded
721
580
  phase_major_padded=$(printf "%02d" "$phase_major")
@@ -737,17 +596,6 @@ phase_has_summary() {
737
596
 
738
597
  get_phase_name() {
739
598
  local phase="$1"
740
-
741
- # Use find_phase_dir if library loaded
742
- if [ "$PHASE_PATHS_LOADED" = true ]; then
743
- local phase_dir
744
- phase_dir=$(find_phase_dir "$phase" "$PLANNING_DIR")
745
- if [ -n "$phase_dir" ]; then
746
- basename "$phase_dir" | sed "s/^[0-9]\+\. *[0-9]*-//" | sed "s/^[0-9]\+-[^-]*-//"
747
- fi
748
- fi
749
-
750
- # Fallback to old logic
751
599
  local phase_major="${phase%%.*}"
752
600
  local phase_major_padded
753
601
  phase_major_padded=$(printf "%02d" "$phase_major")
@@ -764,19 +612,6 @@ get_phase_name() {
764
612
 
765
613
  phase_requires_hitl() {
766
614
  local phase="$1"
767
-
768
- # Use find_phase_dir if library loaded
769
- if [ "$PHASE_PATHS_LOADED" = true ]; then
770
- local phase_dir
771
- phase_dir=$(find_phase_dir "$phase" "$PLANNING_DIR")
772
- if [ -z "$phase_dir" ]; then
773
- return 1
774
- fi
775
- grep -rq "HITL_REQUIRED: true\|HUMAN_VERIFICATION_REQUIRED\|MANUAL_VERIFICATION" "$phase_dir"/*-PLAN.md 2>/dev/null
776
- return $?
777
- fi
778
-
779
- # Fallback to old logic
780
615
  local phase_major="${phase%%.*}"
781
616
  local phase_major_padded
782
617
  phase_major_padded=$(printf "%02d" "$phase_major")
@@ -846,23 +681,6 @@ git_commit_phase() {
846
681
  # Execution
847
682
  # ═══════════════════════════════════════════════════════════════════════════════
848
683
 
849
- # ═══════════════════════════════════════════════════════════════════════════════
850
- # Claude Command Runner (supports infisical for MiniMax)
851
- # ═══════════════════════════════════════════════════════════════════════════════
852
-
853
- INFISICAL_AVAILABLE=false
854
- CLAUDE_CMD="claude"
855
-
856
- check_infiisical() {
857
- if command -v infisical &>/dev/null; then
858
- INFISICAL_AVAILABLE=true
859
- # Use infisical to inject MiniMax API key
860
- CLAUDE_CMD="infisical run --"
861
- fi
862
- }
863
-
864
- check_infiisical
865
-
866
684
  run_claude_command() {
867
685
  local command="$1"
868
686
 
@@ -888,46 +706,23 @@ run_claude_command() {
888
706
 
889
707
  local output_file="$LOGS_DIR/claude_${RUN_ID}_$(date +%s).log"
890
708
 
891
- # Use infisical if available, otherwise direct claude
892
- if $INFISICAL_AVAILABLE; then
893
- log INFO "Using MiniMax via infisical"
894
- if $CLAUDE_CMD claude -p "$command" >> "$output_file" 2>&1; then
895
- log OK "Command completed"
896
- reset_consecutive_failures
897
- [[ "$CIRCUIT_BREAKER_LOADED" == "true" ]] && circuit_breaker_record_success
898
- return 0
899
- else
900
- local exit_code=$?
901
- log ERROR "Command failed (exit $exit_code). See $output_file"
902
-
903
- local signature
904
- signature=$(grep -i "error\|failed\|exception" "$output_file" 2>/dev/null | head -1 | cut -c1-100 || echo "unknown_error")
905
-
906
- if ! record_failure "$signature" "$exit_code"; then
907
- return 1
908
- fi
909
-
910
- return 1
911
- fi
709
+ if claude -p "$command" >> "$output_file" 2>&1; then
710
+ log OK "Command completed"
711
+ reset_consecutive_failures
712
+ [[ "$CIRCUIT_BREAKER_LOADED" == "true" ]] && circuit_breaker_record_success
713
+ return 0
912
714
  else
913
- if claude -p "$command" >> "$output_file" 2>&1; then
914
- log OK "Command completed"
915
- reset_consecutive_failures
916
- [[ "$CIRCUIT_BREAKER_LOADED" == "true" ]] && circuit_breaker_record_success
917
- return 0
918
- else
919
- local exit_code=$?
920
- log ERROR "Command failed (exit $exit_code). See $output_file"
921
-
922
- local signature
923
- signature=$(grep -i "error\|failed\|exception" "$output_file" 2>/dev/null | head -1 | cut -c1-100 || echo "unknown_error")
715
+ local exit_code=$?
716
+ log ERROR "Command failed (exit $exit_code). See $output_file"
924
717
 
925
- if ! record_failure "$signature" "$exit_code"; then
926
- return 1
927
- fi
718
+ local signature
719
+ signature=$(grep -i "error\|failed\|exception" "$output_file" 2>/dev/null | head -1 | cut -c1-100 || echo "unknown_error")
928
720
 
721
+ if ! record_failure "$signature" "$exit_code"; then
929
722
  return 1
930
723
  fi
724
+
725
+ return 1
931
726
  fi
932
727
  }
933
728