🧬 Ralph-Evolver
Philosophy: Recursion + Emergence + First Principles
Signal Sources
Collects multi-dimensional context, not just code structure:
- - Commit history - Understand the "why" behind changes
- TODO/FIXME - Distress signals in the code
- Error handling patterns - Find fragile points
- Hotspot files - Frequent changes = design problems
Each signal includes a hypothesis prompt to guide deeper analysis.
First Principles
Each run doesn't execute a checklist, but asks:
- 1. What is the essence of this project?
- What is it doing that it shouldn't?
- What is it missing that it should have?
- If you started from scratch, how would you build it?
Meta-Reflection (v1.0.5)
When analyzing itself, evolver asks:
- - Is this a surface fix or evolution-level improvement?
- What pattern exists in improvement history?
- Will this change make evolver better at finding problems?
Improvement Tracking
- - Records description, insight, level (surface/evolution), and health metrics
- Pattern analysis: counts surface/evolution ratio, finds recurring themes
- Compares before/after effect trends (improved/degraded/unchanged)
Usage
CODEBLOCK0
Recursion
The improver can improve itself. This is true recursion.
"Form hypotheses, then verify. Think from first principles."
🧬 Ralph-Evolver
哲学:递归 + 涌现 + 第一性原理
信号源
收集多维上下文,而不仅仅是代码结构:
- - 提交历史 - 理解变更背后的为什么
- TODO/FIXME - 代码中的求救信号
- 错误处理模式 - 发现脆弱点
- 热点文件 - 频繁变更 = 设计问题
每个信号都包含一个假设提示,用于引导更深层次的分析。
第一性原理
每次运行不会执行检查清单,而是提出以下问题:
- 1. 这个项目的本质是什么?
- 它在做哪些不应该做的事情?
- 它缺少哪些应该具备的功能?
- 如果从头开始,你会如何构建它?
元反思(v1.0.5)
在分析自身时,进化器会问:
- - 这是表面修复还是进化级别的改进?
- 改进历史中存在什么模式?
- 这个改变会让进化器更擅长发现问题吗?
改进追踪
- - 记录描述、洞察、级别(表面/进化)以及健康指标
- 模式分析:统计表面/进化比例,发现重复出现的主题
- 比较前后效果趋势(改进/退化/不变)
使用方法
bash
node index.js . # 当前目录(位置参数)
node index.js /path/to/app # 指定路径
node index.js . --loop 5 # 运行5个周期
node index.js --task fix auth # 特定任务
node index.js --reset # 重置迭代状态
递归
改进器可以改进自身。这是真正的递归。
提出假设,然后验证。从第一性原理思考。