claude-evolve 1.0.0
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/BRIEF.md +41 -0
- package/bin/claude-evolve +4 -0
- package/bin/claude-evolve-analyze +173 -0
- package/bin/claude-evolve-ideate +206 -0
- package/bin/claude-evolve-main +126 -0
- package/bin/claude-evolve-run +248 -0
- package/bin/claude-evolve-setup +55 -0
- package/docs/CLAUDE-NOTES.md +57 -0
- package/docs/IDEAS.md +168 -0
- package/docs/PLAN.md +213 -0
- package/docs/QUESTIONS.md +211 -0
- package/lib/editor.sh +74 -0
- package/package.json +20 -0
- package/templates/BRIEF.md +21 -0
- package/templates/algorithm.py +33 -0
- package/templates/evaluator.py +76 -0
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
# Parse arguments
|
|
6
|
+
timeout_seconds=""
|
|
7
|
+
|
|
8
|
+
while [[ $# -gt 0 ]]; do
|
|
9
|
+
case $1 in
|
|
10
|
+
--timeout)
|
|
11
|
+
if [[ -z ${2:-} ]] || [[ ! $2 =~ ^[0-9]+$ ]] || [[ $2 -eq 0 ]]; then
|
|
12
|
+
echo "[ERROR] --timeout requires a positive integer (seconds)" >&2
|
|
13
|
+
exit 1
|
|
14
|
+
fi
|
|
15
|
+
timeout_seconds="$2"
|
|
16
|
+
shift 2
|
|
17
|
+
;;
|
|
18
|
+
--help)
|
|
19
|
+
cat <<EOF
|
|
20
|
+
claude-evolve run - Execute evolution candidates
|
|
21
|
+
|
|
22
|
+
USAGE:
|
|
23
|
+
claude-evolve run [OPTIONS]
|
|
24
|
+
|
|
25
|
+
OPTIONS:
|
|
26
|
+
--timeout <sec> Kill evaluator after specified seconds (default: no timeout)
|
|
27
|
+
--help Show this help message
|
|
28
|
+
|
|
29
|
+
DESCRIPTION:
|
|
30
|
+
Processes the oldest pending candidate from evolution.csv by:
|
|
31
|
+
1. Generating algorithm mutation using Claude
|
|
32
|
+
2. Running evaluator.py on the generated algorithm
|
|
33
|
+
3. Updating CSV with performance score and completion status
|
|
34
|
+
|
|
35
|
+
Use --timeout to prevent runaway evaluations from blocking progress.
|
|
36
|
+
EOF
|
|
37
|
+
exit 0
|
|
38
|
+
;;
|
|
39
|
+
*)
|
|
40
|
+
echo "[ERROR] Unknown option: $1" >&2
|
|
41
|
+
exit 1
|
|
42
|
+
;;
|
|
43
|
+
esac
|
|
44
|
+
done
|
|
45
|
+
|
|
46
|
+
echo "[INFO] Starting evolution run..."
|
|
47
|
+
[[ -n $timeout_seconds ]] && echo "[INFO] Using timeout: ${timeout_seconds} seconds"
|
|
48
|
+
|
|
49
|
+
# Validate workspace
|
|
50
|
+
if [[ ! -d evolution ]]; then
|
|
51
|
+
echo "[ERROR] Evolution directory not found. Run 'claude-evolve setup' first." >&2
|
|
52
|
+
exit 1
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
for file in evolution.csv evaluator.py; do
|
|
56
|
+
if [[ ! -f evolution/$file ]]; then
|
|
57
|
+
echo "[ERROR] $file not found. Run 'claude-evolve setup' first." >&2
|
|
58
|
+
exit 1
|
|
59
|
+
fi
|
|
60
|
+
done
|
|
61
|
+
|
|
62
|
+
# Find oldest empty row (pure shell)
|
|
63
|
+
find_empty_row() {
|
|
64
|
+
local row_num=2 # Start after header
|
|
65
|
+
while IFS=, read -r id based_on desc perf status; do
|
|
66
|
+
if [[ -z $perf && -z $status ]]; then
|
|
67
|
+
echo $row_num
|
|
68
|
+
return 0
|
|
69
|
+
fi
|
|
70
|
+
((row_num++))
|
|
71
|
+
done < <(tail -n +2 evolution/evolution.csv)
|
|
72
|
+
return 1
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
# Get CSV row (pure shell)
|
|
76
|
+
get_csv_row() {
|
|
77
|
+
sed -n "${1}p" evolution/evolution.csv
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
# Update CSV row (pure shell with temp file)
|
|
81
|
+
update_csv_row() {
|
|
82
|
+
local row_num="$1"
|
|
83
|
+
local performance="$2"
|
|
84
|
+
local status="$3"
|
|
85
|
+
|
|
86
|
+
# Read CSV and update specific row
|
|
87
|
+
local temp_file="evolution/evolution.csv.tmp"
|
|
88
|
+
local current_row=1
|
|
89
|
+
|
|
90
|
+
while IFS=, read -r id based_on desc perf stat; do
|
|
91
|
+
if [[ $current_row -eq $row_num ]]; then
|
|
92
|
+
# Update this row
|
|
93
|
+
echo "$id,$based_on,$desc,$performance,$status"
|
|
94
|
+
else
|
|
95
|
+
# Keep original row
|
|
96
|
+
echo "$id,$based_on,$desc,$perf,$stat"
|
|
97
|
+
fi
|
|
98
|
+
((current_row++))
|
|
99
|
+
done <evolution/evolution.csv >"$temp_file"
|
|
100
|
+
|
|
101
|
+
mv "$temp_file" evolution/evolution.csv
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
# Find next candidate
|
|
105
|
+
if ! row_num=$(find_empty_row); then
|
|
106
|
+
echo "[ERROR] No empty rows found in CSV. Run 'claude-evolve ideate' to add candidates." >&2
|
|
107
|
+
exit 1
|
|
108
|
+
fi
|
|
109
|
+
|
|
110
|
+
# Get row data
|
|
111
|
+
row_data=$(get_csv_row "$row_num")
|
|
112
|
+
IFS=, read -r id based_on_id description performance status <<<"$row_data"
|
|
113
|
+
|
|
114
|
+
# Clean up description (remove quotes)
|
|
115
|
+
description=${description#\"}
|
|
116
|
+
description=${description%\"}
|
|
117
|
+
|
|
118
|
+
echo "[INFO] Processing candidate ID: $id"
|
|
119
|
+
echo "[INFO] Description: $description"
|
|
120
|
+
echo "[INFO] Based on ID: $based_on_id"
|
|
121
|
+
|
|
122
|
+
# Set interrupt handler
|
|
123
|
+
trap 'update_csv_row "$row_num" "" "interrupted"; echo "[INFO] Evolution interrupted"; exit 130' INT
|
|
124
|
+
|
|
125
|
+
# Mark as running
|
|
126
|
+
update_csv_row "$row_num" "" "running"
|
|
127
|
+
|
|
128
|
+
# Determine parent algorithm
|
|
129
|
+
parent_file="evolution/algorithm.py"
|
|
130
|
+
if [[ -n $based_on_id && $based_on_id != "0" ]]; then
|
|
131
|
+
parent_file="evolution/evolution_id${based_on_id}.py"
|
|
132
|
+
if [[ ! -f $parent_file ]]; then
|
|
133
|
+
echo "[ERROR] Parent algorithm file not found: $parent_file" >&2
|
|
134
|
+
update_csv_row "$row_num" "" "failed"
|
|
135
|
+
exit 1
|
|
136
|
+
fi
|
|
137
|
+
fi
|
|
138
|
+
|
|
139
|
+
echo "[INFO] Using parent algorithm: $parent_file"
|
|
140
|
+
|
|
141
|
+
# Generate mutation
|
|
142
|
+
output_file="evolution/evolution_id${id}.py"
|
|
143
|
+
echo "[INFO] Generating algorithm mutation..."
|
|
144
|
+
|
|
145
|
+
# Copy parent algorithm to output file first
|
|
146
|
+
cp "$parent_file" "$output_file"
|
|
147
|
+
echo "[INFO] Copied parent algorithm to: $output_file"
|
|
148
|
+
|
|
149
|
+
# Check for claude CLI
|
|
150
|
+
claude_cmd="${CLAUDE_CMD:-claude}"
|
|
151
|
+
if ! command -v "$claude_cmd" >/dev/null 2>&1; then
|
|
152
|
+
echo "[ERROR] Claude CLI not found. Please install claude-cli." >&2
|
|
153
|
+
update_csv_row "$row_num" "" "failed"
|
|
154
|
+
exit 1
|
|
155
|
+
fi
|
|
156
|
+
|
|
157
|
+
# Create mutation prompt
|
|
158
|
+
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
|
+
|
|
160
|
+
CONTEXT:
|
|
161
|
+
$(cat evolution/BRIEF.md 2>/dev/null || echo "No brief available")
|
|
162
|
+
|
|
163
|
+
ALGORITHM FILE TO MODIFY: $output_file
|
|
164
|
+
|
|
165
|
+
REQUESTED MODIFICATION:
|
|
166
|
+
$description
|
|
167
|
+
|
|
168
|
+
INSTRUCTIONS:
|
|
169
|
+
1. Read the existing algorithm file at $output_file
|
|
170
|
+
2. Apply the requested modification while preserving the core structure
|
|
171
|
+
3. Ensure the modified algorithm maintains the same interface (function signatures)
|
|
172
|
+
4. Include proper error handling and documentation
|
|
173
|
+
5. Overwrite the file with your improved version
|
|
174
|
+
6. Return ONLY the complete Python code without explanation
|
|
175
|
+
|
|
176
|
+
The output should be a complete, executable Python file that builds upon the existing algorithm."
|
|
177
|
+
|
|
178
|
+
# Generate mutation
|
|
179
|
+
if ! generated_code=$(echo "$prompt" | "$claude_cmd"); then
|
|
180
|
+
echo "[ERROR] Claude failed to generate algorithm mutation" >&2
|
|
181
|
+
update_csv_row "$row_num" "" "failed"
|
|
182
|
+
exit 1
|
|
183
|
+
fi
|
|
184
|
+
|
|
185
|
+
# Save generated algorithm (overwrite the copied file)
|
|
186
|
+
echo "$generated_code" >"$output_file"
|
|
187
|
+
echo "[INFO] Updated algorithm: $output_file"
|
|
188
|
+
|
|
189
|
+
# Run evaluator
|
|
190
|
+
echo "[INFO] Running evaluation..."
|
|
191
|
+
eval_output=""
|
|
192
|
+
eval_exit_code=0
|
|
193
|
+
|
|
194
|
+
if [[ -n $timeout_seconds ]]; then
|
|
195
|
+
echo "[INFO] Starting evaluation with ${timeout_seconds}s timeout..."
|
|
196
|
+
if eval_output=$(timeout "$timeout_seconds" python3 evolution/evaluator.py "$output_file" 2>&1); then
|
|
197
|
+
eval_exit_code=0
|
|
198
|
+
else
|
|
199
|
+
eval_exit_code=$?
|
|
200
|
+
if [[ $eval_exit_code -eq 124 ]]; then
|
|
201
|
+
echo "[ERROR] Evaluation timed out after ${timeout_seconds} seconds" >&2
|
|
202
|
+
update_csv_row "$row_num" "" "timeout"
|
|
203
|
+
exit 1
|
|
204
|
+
fi
|
|
205
|
+
fi
|
|
206
|
+
else
|
|
207
|
+
if eval_output=$(python3 evolution/evaluator.py "$output_file" 2>&1); then
|
|
208
|
+
eval_exit_code=0
|
|
209
|
+
else
|
|
210
|
+
eval_exit_code=$?
|
|
211
|
+
fi
|
|
212
|
+
fi
|
|
213
|
+
|
|
214
|
+
# Process results
|
|
215
|
+
if [[ $eval_exit_code -eq 0 ]]; then
|
|
216
|
+
# Extract score from JSON (simple grep approach)
|
|
217
|
+
if score=$(echo "$eval_output" | grep -o '"score"[[:space:]]*:[[:space:]]*[0-9.]*' | cut -d: -f2 | tr -d ' '); then
|
|
218
|
+
if [[ -n $score ]]; then
|
|
219
|
+
update_csv_row "$row_num" "$score" "completed"
|
|
220
|
+
echo "[INFO] ✓ Evaluation completed successfully"
|
|
221
|
+
echo "[INFO] Performance score: $score"
|
|
222
|
+
else
|
|
223
|
+
# Try "performance" field
|
|
224
|
+
if score=$(echo "$eval_output" | grep -o '"performance"[[:space:]]*:[[:space:]]*[0-9.]*' | cut -d: -f2 | tr -d ' '); then
|
|
225
|
+
update_csv_row "$row_num" "$score" "completed"
|
|
226
|
+
echo "[INFO] ✓ Evaluation completed successfully"
|
|
227
|
+
echo "[INFO] Performance score: $score"
|
|
228
|
+
else
|
|
229
|
+
echo "[ERROR] No score found in evaluator output" >&2
|
|
230
|
+
echo "[ERROR] Output: $eval_output" >&2
|
|
231
|
+
update_csv_row "$row_num" "" "failed"
|
|
232
|
+
exit 1
|
|
233
|
+
fi
|
|
234
|
+
fi
|
|
235
|
+
else
|
|
236
|
+
echo "[ERROR] Failed to parse evaluator output" >&2
|
|
237
|
+
echo "[ERROR] Output: $eval_output" >&2
|
|
238
|
+
update_csv_row "$row_num" "" "failed"
|
|
239
|
+
exit 1
|
|
240
|
+
fi
|
|
241
|
+
else
|
|
242
|
+
echo "[ERROR] Evaluator failed with exit code $eval_exit_code" >&2
|
|
243
|
+
echo "[ERROR] Output: $eval_output" >&2
|
|
244
|
+
update_csv_row "$row_num" "" "failed"
|
|
245
|
+
exit 1
|
|
246
|
+
fi
|
|
247
|
+
|
|
248
|
+
echo "[INFO] Evolution cycle completed successfully!"
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
# Get script directory
|
|
6
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
|
+
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
|
|
8
|
+
|
|
9
|
+
# Source shared editor functions
|
|
10
|
+
source "$PROJECT_ROOT/lib/editor.sh"
|
|
11
|
+
|
|
12
|
+
echo "[INFO] Initializing evolution workspace..."
|
|
13
|
+
|
|
14
|
+
# Create evolution directory
|
|
15
|
+
if [[ ! -d evolution ]]; then
|
|
16
|
+
echo "[INFO] Creating evolution/ directory..."
|
|
17
|
+
mkdir -p evolution
|
|
18
|
+
else
|
|
19
|
+
echo "[INFO] evolution/ directory already exists"
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
# Copy template files
|
|
23
|
+
for file in BRIEF.md algorithm.py evaluator.py; do
|
|
24
|
+
if [[ ! -f evolution/$file ]]; then
|
|
25
|
+
if [[ -f "$PROJECT_ROOT/templates/$file" ]]; then
|
|
26
|
+
echo "[INFO] Copying $file from templates..."
|
|
27
|
+
cp "$PROJECT_ROOT/templates/$file" "evolution/$file"
|
|
28
|
+
else
|
|
29
|
+
echo "[ERROR] Template file not found: $PROJECT_ROOT/templates/$file"
|
|
30
|
+
exit 1
|
|
31
|
+
fi
|
|
32
|
+
else
|
|
33
|
+
echo "[INFO] $file already exists, skipping"
|
|
34
|
+
fi
|
|
35
|
+
done
|
|
36
|
+
|
|
37
|
+
# Create CSV with header
|
|
38
|
+
if [[ ! -f evolution/evolution.csv ]]; then
|
|
39
|
+
echo "[INFO] Creating evolution.csv with header..."
|
|
40
|
+
echo "id,basedOnId,description,performance,status" >evolution/evolution.csv
|
|
41
|
+
else
|
|
42
|
+
echo "[INFO] evolution.csv already exists, skipping"
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
# Open editor for BRIEF.md if interactive and file is new or empty
|
|
46
|
+
if [[ -t 1 ]] && [[ ! -s evolution/BRIEF.md ]]; then
|
|
47
|
+
echo "[INFO] Opening BRIEF.md for editing..."
|
|
48
|
+
open_with_editor evolution/BRIEF.md
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
echo "[INFO] Evolution workspace setup complete!"
|
|
52
|
+
echo "[INFO] Next steps:"
|
|
53
|
+
echo "[INFO] 1. Edit evolution/BRIEF.md to describe your optimization problem"
|
|
54
|
+
echo "[INFO] 2. Customize evolution/evaluator.py for your evaluation criteria"
|
|
55
|
+
echo "[INFO] 3. Run 'claude-evolve ideate' to generate initial candidates"
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Claude-Evolve – AI Working Notes
|
|
2
|
+
|
|
3
|
+
These notes capture my current understanding of the project, the major design choices already fixed in the brief / Q&A, and the open items that still require clarification. They are **living notes** – feel free to edit or extend them during the implementation.
|
|
4
|
+
|
|
5
|
+
## 1. Project Understanding
|
|
6
|
+
|
|
7
|
+
1. **Purpose** – Provide a lightweight command-line tool (`claude-evolve`) that orchestrates an _algorithm-evolution_ workflow driven by Claude AI. The tool repeatedly:
|
|
8
|
+
• plans → develops a candidate → runs the evaluator → records the result → lets the user/AI propose the next mutation.
|
|
9
|
+
|
|
10
|
+
2. **Inspiration** – It mirrors the successful `claude-fsd` package (software delivery), but targets algorithm R&D. The entire CLI is implemented as simple **Bourne-compatible shell scripts** published as an **npm** package – no compiled binaries, no extra runtime besides POSIX sh and Node.
|
|
11
|
+
|
|
12
|
+
3. **Artifacts produced**
|
|
13
|
+
• `evolution/BRIEF.md` – high-level goal of the algorithm being optimised
|
|
14
|
+
• `evolution/evolution.csv` – log of all candidates (ID,basedOnID,description,performance,status)
|
|
15
|
+
• `evolution/evolution_details.md` – free-form explanation / commentary per candidate
|
|
16
|
+
• `evolution/evolution_idNNN.<ext>` – snapshot of the concrete algorithm evaluated
|
|
17
|
+
|
|
18
|
+
4. **Evaluator contract** – An _executable_ (often Python, but not required) that receives the candidate file path as its sole argument and prints a **single-line JSON dict** to stdout, e.g. `{"score": 0.87}`. Claude-evolve treats the first numeric value in that dict as "performance" (higher is better).
|
|
19
|
+
|
|
20
|
+
## 2. Key Technical Decisions & Rationale
|
|
21
|
+
|
|
22
|
+
• **Shell scripts in an npm package** – keeps the runtime guarantees identical to `claude-fsd`, leverages cross-platform Node installer, and avoids the overhead of compiling/packaging native binaries.
|
|
23
|
+
|
|
24
|
+
• **LLM-driven search** – instead of classic genetic algorithms, we rely on Claude to suggest mutations based on the project history and metrics. The human operator can inject ideas at any point (`claude-evolve ideate`).
|
|
25
|
+
|
|
26
|
+
• **File-system persistence** – CSV + Markdown files are trivial to diff and review in Git. Snap-shooting each algorithm version guarantees perfect reproducibility.
|
|
27
|
+
|
|
28
|
+
• **Single-metric MVP** – Start with exactly one performance number to keep the loop simple; extend to multi-metric later (post-MVP roadmap).
|
|
29
|
+
|
|
30
|
+
• **Menu _and_ sub-commands** – An interactive menu for exploratory use, plus explicit sub-commands for CI automation, following `claude-fsd` precedent.
|
|
31
|
+
|
|
32
|
+
• **Visualization as PNG via Node** – Node libraries (e.g. `chartjs-node-canvas`) generate a static PNG for `claude-evolve analyze`, sidestepping browser dependencies.
|
|
33
|
+
|
|
34
|
+
• **Git-first workflow** – All artifacts (except large training artefacts / checkpoints) tracked in Git. Users work on feature branches; PRs reviewed like any other code change.
|
|
35
|
+
|
|
36
|
+
• **Strict YAGNI** – Avoid prematurely implementing fancy features (branching selection strategies, cloud storage, etc.) until a real need emerges.
|
|
37
|
+
|
|
38
|
+
## 3. Assumptions & Constraints
|
|
39
|
+
|
|
40
|
+
1. `claude` CLI is installed and authenticated in the user’s environment.
|
|
41
|
+
2. Users have a POSIX-style shell environment (bash/zsh/sh) and Node ≥16.
|
|
42
|
+
3. Evaluations may be _slow_ and resource-intensive; scheduling and cost control are left to the evaluator implementation.
|
|
43
|
+
4. The repository **should not** store large binary artefacts – evaluator is responsible for external storage if needed.
|
|
44
|
+
5. Concurrency: MVP evaluates _one_ candidate at a time; optional parallelism (max-N background processes) is documented as a stretch goal.
|
|
45
|
+
|
|
46
|
+
## 4. Areas Requiring Future Clarification
|
|
47
|
+
|
|
48
|
+
• **Charting implementation** – exact Node library and minimum PNG spec (size, axis labels).
|
|
49
|
+
• **Pre-commit policy** – exactly which linters (shellcheck, shfmt, prettier-markdown, …) are required.
|
|
50
|
+
• **Timeout/Resource limits** – default wall-clock limit for an evaluation and how to surface that to the user.
|
|
51
|
+
• **Multi-metric support** – data model changes (`evolution.csv`) once we decide to support >1 metric.
|
|
52
|
+
• **Security/PII** – explicit organisational policy might evolve (currently "no constraints").
|
|
53
|
+
• **Distribution** – npm org name, versioning scheme, release cadence.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
These notes should evolve alongside the code. When a decision is implemented, reflect it here so future contributors can quickly understand the rationale.
|
package/docs/IDEAS.md
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# Claude-Evolve Future Ideas
|
|
2
|
+
|
|
3
|
+
This file tracks potential enhancements and features that could be added to claude-evolve in the future.
|
|
4
|
+
|
|
5
|
+
## CLI Enhancements
|
|
6
|
+
|
|
7
|
+
### Interactive Menu Improvements
|
|
8
|
+
|
|
9
|
+
- Add keyboard shortcuts (arrow keys) for menu navigation
|
|
10
|
+
- Implement command search/filtering in interactive mode
|
|
11
|
+
- Add history of recent commands in interactive menu
|
|
12
|
+
|
|
13
|
+
### CLI Usability
|
|
14
|
+
|
|
15
|
+
- Add shell completion support (bash, zsh, fish)
|
|
16
|
+
- Implement command aliases (e.g., `claude-evolve i` for `ideate`)
|
|
17
|
+
- Add progress bars for long-running operations
|
|
18
|
+
- Colorized output with configurable themes
|
|
19
|
+
- Implement timeout presets (--timeout-short, --timeout-medium, --timeout-long) for common use cases
|
|
20
|
+
- Add timeout estimation based on historical evaluator performance
|
|
21
|
+
- Create timeout warnings when approaching the limit during evaluation
|
|
22
|
+
- Add configurable default timeout in project configuration file
|
|
23
|
+
|
|
24
|
+
### Ideation Enhancements
|
|
25
|
+
|
|
26
|
+
- Add a `--from-file` option to ideate command for bulk importing ideas
|
|
27
|
+
- Implement idea similarity detection using embeddings or simple text comparison
|
|
28
|
+
- Add progress bar for multi-idea generation
|
|
29
|
+
- Create idea templates for common algorithm patterns
|
|
30
|
+
- Add support for idea categories or tags for better organization
|
|
31
|
+
- Implement idea rating/scoring before evaluation
|
|
32
|
+
- Add interactive mode for refining AI-generated ideas
|
|
33
|
+
- Cache BRIEF.md content to improve performance
|
|
34
|
+
|
|
35
|
+
## Testing Framework Enhancements
|
|
36
|
+
|
|
37
|
+
### Test Coverage
|
|
38
|
+
|
|
39
|
+
- Add integration tests for template copying functionality
|
|
40
|
+
- Implement test mocks for Claude API calls
|
|
41
|
+
- Add performance/benchmark tests for CLI operations
|
|
42
|
+
- Create end-to-end workflow tests
|
|
43
|
+
- Add comprehensive unit tests for CSV manipulation functions in lib/common.sh
|
|
44
|
+
- Fix run command implementation to resolve test failures (prioritize over environment blame)
|
|
45
|
+
- Add tests for concurrent execution scenarios when parallel mode is implemented
|
|
46
|
+
- Create stress tests for large CSV files and many candidates
|
|
47
|
+
- Implement proper error handling in cmd_run to prevent silent failures
|
|
48
|
+
- Add debugging output to understand why tests are failing in npm test environment
|
|
49
|
+
|
|
50
|
+
### Test Infrastructure
|
|
51
|
+
|
|
52
|
+
- Add test coverage reporting
|
|
53
|
+
- Implement parallel test execution
|
|
54
|
+
- Add visual regression testing for generated charts
|
|
55
|
+
- Create test data generators and fixtures
|
|
56
|
+
|
|
57
|
+
## Development Workflow
|
|
58
|
+
|
|
59
|
+
### Code Quality
|
|
60
|
+
|
|
61
|
+
- Add more sophisticated pre-commit hooks
|
|
62
|
+
- Add pre-commit hook to run shellcheck and catch linting issues before commits
|
|
63
|
+
- Implement automated dependency vulnerability scanning
|
|
64
|
+
- Add code complexity analysis
|
|
65
|
+
- Create automated documentation generation
|
|
66
|
+
- Add automatic changelog generation from conventional commits
|
|
67
|
+
- Implement semantic versioning based on conventional commit types
|
|
68
|
+
- Consider adding commit message linting for conventional commit standards (✅ COMPLETED)
|
|
69
|
+
- Add git hook integrity checks to prevent legacy hook conflicts
|
|
70
|
+
- Implement automated commit message template generation for consistency
|
|
71
|
+
|
|
72
|
+
### Build System
|
|
73
|
+
|
|
74
|
+
- Add Docker containerization for consistent development environment
|
|
75
|
+
- Implement cross-platform build verification
|
|
76
|
+
- Add automated changelog generation
|
|
77
|
+
- Create release automation workflows
|
|
78
|
+
|
|
79
|
+
## Future Phase Ideas
|
|
80
|
+
|
|
81
|
+
### Enhanced Error Handling
|
|
82
|
+
|
|
83
|
+
- Implement structured error codes and recovery suggestions
|
|
84
|
+
- Add error telemetry collection (with privacy controls)
|
|
85
|
+
- Create error reproduction scripts for debugging
|
|
86
|
+
- Add graceful degradation modes
|
|
87
|
+
|
|
88
|
+
### Configuration System
|
|
89
|
+
|
|
90
|
+
- Add configuration file support (.claude-evolve.json)
|
|
91
|
+
- Implement environment-specific configurations
|
|
92
|
+
- Add configuration validation and migration tools
|
|
93
|
+
- Create configuration templates for common scenarios
|
|
94
|
+
|
|
95
|
+
### Monitoring and Observability
|
|
96
|
+
|
|
97
|
+
- Add execution time tracking and optimization suggestions
|
|
98
|
+
- Implement resource usage monitoring (memory, CPU)
|
|
99
|
+
- Create performance regression detection
|
|
100
|
+
|
|
101
|
+
### Testing Infrastructure Improvements
|
|
102
|
+
|
|
103
|
+
- **Automated Testing Matrix**: Set up GitHub Actions CI pipeline with multiple OS testing (Ubuntu, macOS, Windows WSL)
|
|
104
|
+
- **Shell Script Coverage**: Implement code coverage reporting for shell scripts using tools like bashcov or kcov
|
|
105
|
+
- **Performance Benchmarking**: Add automated performance tests to detect CLI execution speed regressions
|
|
106
|
+
- **Integration Test Environments**: Create Docker-based test environments for consistent testing across platforms
|
|
107
|
+
- **Test Data Management**: Implement test fixture management for reproducible testing scenarios
|
|
108
|
+
- **Parallel Test Execution**: Optimize test suite execution time through parallel test running
|
|
109
|
+
- **Test Result Reporting**: Add comprehensive test result reporting with trend analysis
|
|
110
|
+
- **Mock Service Improvements**: Enhance Claude API mocking with more realistic response scenarios and error conditions
|
|
111
|
+
- **Bats Environment Documentation**: Document the TMPDIR requirements for Bats tests in the README
|
|
112
|
+
- **Cross-platform Test Compatibility**: Verify TMPDIR solution works across different platforms
|
|
113
|
+
- **Test Runner Consolidation**: Consider whether to maintain both Bats and shell-based test runners
|
|
114
|
+
|
|
115
|
+
### Enhanced Timeout Management
|
|
116
|
+
|
|
117
|
+
- **Granular Timeout Controls**: Support timeout specification in minutes/hours (e.g., `--timeout 5m`, `--timeout 2h`)
|
|
118
|
+
- **Process Group Management**: Implement proper process group cleanup to handle evaluators that spawn subprocesses
|
|
119
|
+
- **Timeout Recovery Strategies**: Add automatic retry mechanisms for timeout scenarios with backoff logic
|
|
120
|
+
- **Cross-platform Timeout**: Ensure consistent timeout behavior across Linux, macOS, and Windows WSL environments
|
|
121
|
+
- **Timeout Monitoring**: Add real-time timeout countdown display during evaluation execution
|
|
122
|
+
- **Smart Timeout Recommendations**: Analyze historical evaluation times to suggest optimal timeout values
|
|
123
|
+
- Add execution analytics and insights
|
|
124
|
+
- Implement CSV schema validation to catch column mismatch issues at runtime
|
|
125
|
+
- Consider using a more robust CSV parsing library or approach to prevent manual column indexing errors
|
|
126
|
+
|
|
127
|
+
## Architecture Improvements
|
|
128
|
+
|
|
129
|
+
### Modularity
|
|
130
|
+
|
|
131
|
+
- Extract common CLI patterns into reusable library
|
|
132
|
+
- Implement plugin architecture for extensibility
|
|
133
|
+
- Add support for custom command extensions
|
|
134
|
+
- Create standardized interfaces for evaluators
|
|
135
|
+
|
|
136
|
+
### Performance
|
|
137
|
+
|
|
138
|
+
- Implement caching for frequently accessed data
|
|
139
|
+
- Add lazy loading for heavy operations
|
|
140
|
+
- Optimize JSON parsing and file operations
|
|
141
|
+
- Create efficient batch processing modes
|
|
142
|
+
|
|
143
|
+
## Documentation and User Experience
|
|
144
|
+
|
|
145
|
+
### Documentation
|
|
146
|
+
|
|
147
|
+
- Add man page generation
|
|
148
|
+
- Create interactive tutorial mode
|
|
149
|
+
- Implement contextual help system
|
|
150
|
+
- Add troubleshooting guides and FAQ
|
|
151
|
+
|
|
152
|
+
### User Experience
|
|
153
|
+
|
|
154
|
+
- Add onboarding wizard for new projects
|
|
155
|
+
- Implement project templates and examples
|
|
156
|
+
- Create guided workflow suggestions
|
|
157
|
+
- Add undo/rollback functionality for destructive operations
|
|
158
|
+
|
|
159
|
+
## Repository Management
|
|
160
|
+
|
|
161
|
+
### Branch Protection Enhancements
|
|
162
|
+
|
|
163
|
+
- Consider adding required status checks once CI/CD is implemented in Phase 7
|
|
164
|
+
- Evaluate enabling linear history requirement to simplify merge scenarios
|
|
165
|
+
- Add automated branch protection rule updates when new CI checks are added
|
|
166
|
+
- Implement branch protection rule validation/testing to ensure proper configuration
|
|
167
|
+
- Consider adding protection for other important branches (develop, release branches)
|
|
168
|
+
- Add monitoring/alerting for branch protection rule changes
|