claude-evolve 1.0.3 → 1.0.5
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/claude-evolve-ideate +1 -1
- package/bin/claude-evolve-run +22 -1
- package/package.json +1 -1
package/bin/claude-evolve-ideate
CHANGED
|
@@ -166,7 +166,7 @@ Format: One idea per line, no numbering, no extra formatting."
|
|
|
166
166
|
|
|
167
167
|
# Call Claude and process response
|
|
168
168
|
local response
|
|
169
|
-
if ! response=$(echo "$prompt" | claude -p 2>&1); then
|
|
169
|
+
if ! response=$(echo "$prompt" | claude --model opus -p 2>&1); then
|
|
170
170
|
echo "[WARN] Claude API call failed, falling back to manual entry."
|
|
171
171
|
return 1
|
|
172
172
|
fi
|
package/bin/claude-evolve-run
CHANGED
|
@@ -154,6 +154,27 @@ if ! command -v "$claude_cmd" >/dev/null 2>&1; then
|
|
|
154
154
|
exit 1
|
|
155
155
|
fi
|
|
156
156
|
|
|
157
|
+
# Implement claude-fsd style model selection
|
|
158
|
+
# Read/create loop counter for megathinking mode
|
|
159
|
+
if [[ -f evolution/.loop_counter ]]; then
|
|
160
|
+
LOOP_COUNTER=$(cat evolution/.loop_counter)
|
|
161
|
+
else
|
|
162
|
+
LOOP_COUNTER=1
|
|
163
|
+
fi
|
|
164
|
+
|
|
165
|
+
# Check if this is the 4th iteration for megathinking mode
|
|
166
|
+
if [ $((LOOP_COUNTER % 4)) -eq 0 ]; then
|
|
167
|
+
echo -e "\033[33m**** MEGATHINKING MODE ACTIVATED ****\033[0m"
|
|
168
|
+
CLAUDE_MODEL="opus"
|
|
169
|
+
echo "[INFO] Using Claude Opus for architectural thinking (iteration $LOOP_COUNTER)"
|
|
170
|
+
else
|
|
171
|
+
CLAUDE_MODEL="sonnet"
|
|
172
|
+
echo "[INFO] Using Claude Sonnet for development (iteration $LOOP_COUNTER)"
|
|
173
|
+
fi
|
|
174
|
+
|
|
175
|
+
# Increment and save counter
|
|
176
|
+
echo $((LOOP_COUNTER + 1)) > evolution/.loop_counter
|
|
177
|
+
|
|
157
178
|
# Create mutation prompt
|
|
158
179
|
prompt="You are an AI assistant helping to evolve algorithms through mutations. Please modify the Python algorithm file at $output_file based on the requested modification.
|
|
159
180
|
|
|
@@ -176,7 +197,7 @@ INSTRUCTIONS:
|
|
|
176
197
|
The output should be a complete, executable Python file that builds upon the existing algorithm."
|
|
177
198
|
|
|
178
199
|
# Generate mutation
|
|
179
|
-
if ! generated_code=$(echo "$prompt" | "$claude_cmd"); then
|
|
200
|
+
if ! generated_code=$(echo "$prompt" | "$claude_cmd" --model $CLAUDE_MODEL); then
|
|
180
201
|
echo "[ERROR] Claude failed to generate algorithm mutation" >&2
|
|
181
202
|
update_csv_row "$row_num" "" "failed"
|
|
182
203
|
exit 1
|