claude-evolve 1.0.9 → 1.0.10

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.
Files changed (2) hide show
  1. package/README.md +202 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,202 @@
1
+ # claude-evolve
2
+
3
+ Automated algorithm evolution - let AI evolve your algorithms while you sleep.
4
+
5
+ ## What is this?
6
+
7
+ claude-evolve is an automated algorithm evolution system that runs continuous evolution cycles without constant supervision. Start with a base algorithm and let it evolve optimized variants autonomously.
8
+
9
+ Think of it like **genetic algorithms for code** - it handles the mutations and testing, but you should keep an eye on the results and occasionally guide the evolution when needed.
10
+
11
+ ### How the Evolution System Works
12
+
13
+ The system operates with specialized phases working together:
14
+
15
+ - 🧠 **Ideation Phase**: Generates creative algorithm variations using Claude Opus
16
+ - 🔬 **Development Phase**: Implements mutations using Claude Sonnet (with periodic Opus "megathinking")
17
+ - 📊 **Evaluation Phase**: Tests performance against your custom evaluator
18
+ - 📈 **Analysis Phase**: Tracks evolution progress and identifies top performers
19
+
20
+ The evolution cycle:
21
+ ```
22
+ Ideate → Mutate → Evaluate → Analyze → Repeat
23
+ ```
24
+
25
+ You can leave it running while you grab lunch or sleep - it just keeps evolving better algorithms until you stop it.
26
+
27
+ ## Installation
28
+
29
+ ```bash
30
+ npm install -g claude-evolve
31
+ ```
32
+
33
+ ## Quick Start
34
+
35
+ ```bash
36
+ claude-evolve
37
+ ```
38
+
39
+ The system will walk you through the setup process:
40
+
41
+ 1. **Create evolution workspace** - Initialize the directory structure
42
+ 2. **Write evolution/BRIEF.md** - Describe your optimization problem
43
+ 3. **Customize evolution/evaluator.py** - Define how to measure algorithm performance
44
+ 4. **Generate ideas** - Create initial algorithm candidates
45
+ 5. **Start evolution** - Begin the automated evolution process
46
+
47
+ ## Commands
48
+
49
+ ### Main wrapper command
50
+ ```bash
51
+ claude-evolve # Interactive mode (recommended for beginners)
52
+ claude-evolve setup # Initialize evolution workspace
53
+ claude-evolve ideate # Generate new algorithm ideas
54
+ claude-evolve run # Execute evolution candidates
55
+ claude-evolve analyze # Analyze evolution results
56
+ claude-evolve config # Manage configuration settings
57
+ ```
58
+
59
+ ### Individual commands (if you know what you're doing)
60
+
61
+ #### claude-evolve-setup
62
+ Initializes your evolution workspace with:
63
+ - Directory structure
64
+ - Template files (BRIEF.md, algorithm.py, evaluator.py, config.yaml)
65
+ - CSV file for tracking evolution progress
66
+
67
+ #### claude-evolve-ideate
68
+ Generates new algorithm variation ideas using Claude Opus in megathinking mode:
69
+ - Reads your project brief
70
+ - Analyzes top-performing algorithms so far
71
+ - Creates creative mutations and variations
72
+ - Defaults to 20 ideas per run (configurable)
73
+
74
+ #### claude-evolve-run
75
+ Executes the next evolution candidate:
76
+ - Picks the next untested idea from your CSV
77
+ - Uses Claude to implement the mutation
78
+ - Runs your evaluator to measure performance
79
+ - Records results and updates the evolution log
80
+ - Every 4th iteration uses Opus for architectural thinking
81
+
82
+ #### claude-evolve-analyze
83
+ Analyzes evolution progress and generates insights:
84
+ - Performance trends over time
85
+ - Best-performing algorithm variants
86
+ - Suggestions for future evolution directions
87
+
88
+ #### claude-evolve-config
89
+ Manages configuration settings:
90
+ - View current configuration
91
+ - Edit paths and behavior settings
92
+ - Reset to defaults
93
+
94
+ ## How it Works
95
+
96
+ 1. **Set up evolution workspace** - Define your optimization problem
97
+ 2. **Create base algorithm** - Start with `evolution/algorithm.py`
98
+ 3. **Define evaluation criteria** - Customize `evolution/evaluator.py`
99
+ 4. **Generate initial ideas** - Run `claude-evolve ideate` to create variations
100
+ 5. **Start evolution loop** - The system automatically:
101
+ - Picks the next candidate from your CSV
102
+ - Implements the mutation
103
+ - Evaluates performance
104
+ - Records results
105
+ - Repeats until you stop it
106
+
107
+ ## Monitoring Progress (Like Genetic Algorithms)
108
+
109
+ This isn't sci-fi level "sleep through the entire evolution" automation - it's more like controlled genetic algorithms. The system handles most mutations, but you should monitor it and guide the evolution when needed.
110
+
111
+ **Recommended monitoring approach:**
112
+ - **Check evolution.csv** - Track performance of all variants
113
+ - **Review top performers** - Look at the best algorithms generated so far
114
+ - **Monitor for convergence** - Watch for diminishing returns or local optima
115
+ - **Inject new ideas** - Add manual variations when evolution stagnates
116
+
117
+ **When you need to guide evolution:**
118
+ - **Add targeted ideas** - Use `claude-evolve ideate` with specific directions
119
+ - **Modify the evaluator** - Update `evolution/evaluator.py` to change selection pressure
120
+ - **Restart from best** - Copy top performer to `algorithm.py` and continue evolving
121
+ - **The system adapts** - New ideas will build on your guidance
122
+
123
+ **Interruptible design:**
124
+ - Hit Ctrl+C anytime to pause
125
+ - Restart later with `claude-evolve run`
126
+ - Perfect for running overnight, during meetings, or while getting lunch
127
+
128
+ ## Requirements
129
+
130
+ ### Required
131
+ - Node.js >= 14.0.0
132
+ - Python 3.x (for algorithm execution)
133
+ - Unix-like environment (macOS, Linux)
134
+ - [Claude CLI](https://docs.anthropic.com/en/docs/claude-code) (`claude` command)
135
+
136
+ ### Optional (but recommended)
137
+ - Scientific Python libraries (numpy, scipy, etc.) depending on your algorithms
138
+ - Plotting libraries (matplotlib, plotly) for analyzing results
139
+
140
+ ## Project Structure
141
+
142
+ Your evolution workspace will have:
143
+ ```
144
+ your-project/
145
+ ├── evolution/
146
+ │ ├── BRIEF.md # Problem description and goals
147
+ │ ├── algorithm.py # Base algorithm to evolve
148
+ │ ├── evaluator.py # Performance evaluation logic
149
+ │ ├── config.yaml # Configuration settings
150
+ │ ├── evolution.csv # Evolution progress tracking
151
+ │ ├── evolution_id1.py # Generated algorithm variants
152
+ │ ├── evolution_id2.py
153
+ │ └── ...
154
+ └── (your main project files)
155
+ ```
156
+
157
+ ## Configuration
158
+
159
+ Edit `evolution/config.yaml` to customize:
160
+
161
+ ```yaml
162
+ # Working directory for evolution files
163
+ evolution_dir: "evolution"
164
+
165
+ # Algorithm and evaluator file paths
166
+ algorithm_file: "algorithm.py"
167
+ evaluator_file: "evaluator.py"
168
+ brief_file: "BRIEF.md"
169
+
170
+ # CSV file for tracking evolution
171
+ evolution_csv: "evolution.csv"
172
+
173
+ # Parent algorithm selection strategy
174
+ parent_selection: "best" # or "random", "latest"
175
+
176
+ # Maximum number of ideas to generate at once
177
+ max_ideas: 50
178
+
179
+ # Python command to use for evaluation
180
+ python_cmd: "python3"
181
+ ```
182
+
183
+ ## Tips for Success
184
+
185
+ 1. **Write a clear BRIEF.md** - Describe your optimization problem, constraints, and goals
186
+ 2. **Create a robust evaluator** - Your evaluator.py determines evolution direction
187
+ 3. **Start simple** - Begin with a basic algorithm and let evolution add complexity
188
+ 4. **Monitor early cycles** - Watch the first few evolutions to ensure proper setup
189
+ 5. **Guide when stuck** - Add manual ideas when evolution hits local optima
190
+ 6. **Embrace failures** - Not every mutation will be better, that's how evolution works
191
+
192
+ ## Example Use Cases
193
+
194
+ - **Algorithm optimization** - Improve sorting, searching, or mathematical algorithms
195
+ - **Machine learning** - Evolve model architectures or training procedures
196
+ - **Game AI** - Develop and optimize game-playing strategies
197
+ - **Numerical methods** - Improve solvers, optimizers, or approximation algorithms
198
+ - **Data structures** - Evolve efficient data organization strategies
199
+
200
+ ## License
201
+
202
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-evolve",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "bin": {
5
5
  "claude-evolve": "./bin/claude-evolve",
6
6
  "claude-evolve-main": "./bin/claude-evolve-main",