ralph-wiggum by fstandhartinger/ralph-wiggum
npx skills add https://github.com/fstandhartinger/ralph-wiggum --skill ralph-wiggum基于规范驱动开发的自主式 AI 编程
Ralph Wiggum 将 Geoffrey Huntley 的迭代式 bash 循环 与 规范驱动开发 相结合,实现完全自主的 AI 辅助软件开发。
核心洞见:每次迭代都有全新的上下文。每个循环都会启动一个具有干净上下文窗口的新代理进程,从而防止上下文溢出和性能下降。
在以下情况下使用 Ralph Wiggum:
┌─────────────────────────────────────────────────────────────┐
│ RALPH LOOP │
├─────────────────────────────────────────────────────────────┤
│ Loop 1: Pick spec A → Implement → Test → Commit → DONE │
│ Loop 2: Pick spec B → Implement → Test → Commit → DONE │
│ Loop 3: Pick spec C → Implement → Test → Commit → DONE │
│ ... │
│ │
│ Each iteration = Fresh context window │
│ Shared state = Files on disk (specs, plan, history) │
└─────────────────────────────────────────────────────────────┘
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
# Using Vercel's add-skill
npx add-skill fstandhartinger/ralph-wiggum
# Using OpenSkills
openskills install fstandhartinger/ralph-wiggum
要进行包含章程和项目访谈的完整 Ralph Wiggum 设置:
# Tell your AI agent:
"Set up Ralph Wiggum using https://github.com/fstandhartinger/ralph-wiggum"
代理将引导你完成一个 轻量级、愉快的设置过程:
对于现有项目,代理会自动检测你的技术栈。访谈优先关注 你正在构建什么以及为什么。
Ralph 循环的每次迭代都会启动一个新的 AI 代理进程。这意味着:
状态通过文件在循环之间持久化:
specs/ —— 包含验收标准的特性规范ralph_history.txt —— 记录突破、阻碍和学习的日志IMPLEMENTATION_PLAN.md —— 可选的详细任务分解代理 仅 在以下情况下输出 <promise>DONE</promise>:
bash 循环会检查这个短语。如果未找到,则重试。
测试、代码检查和构建充当了护栏。代理必须在输出完成信号之前修复问题。
成功的关键: 每个规范都需要 清晰、可测试的验收标准。这能告诉 Ralph 任务何时真正“完成”。
# Feature: User Authentication
## Requirements
- OAuth login with Google
- Session management
- Logout functionality
## Acceptance Criteria
- [ ] User can log in with Google
- [ ] Session persists across page reloads
- [ ] User can log out
- [ ] Tests pass
**Output when complete:** `<promise>DONE</promise>`
好的标准: “用户可以使用 Google 登录且会话保持” 坏的标准: “认证功能正常工作”
你的验收标准越具体,Ralph 的表现就越好。
# Start building (Claude Code)
./scripts/ralph-loop.sh
# With max iterations
./scripts/ralph-loop.sh 20
# Using Codex CLI
./scripts/ralph-loop-codex.sh
每次循环运行都会将 所有输出 写入 logs/ 目录下的日志文件:
logs/ralph_*_session_YYYYMMDD_HHMMSS.log(整个运行过程,包括 CLI 输出)logs/ralph_*_iter_N_YYYYMMDD_HHMMSS.log(每次迭代的 CLI 输出)logs/ralph_codex_output_iter_N_*.txt| 模式 | 用途 | 命令 |
|---|---|---|
| build(默认) | 选择规范、实现、测试、提交 | ./scripts/ralph-loop.sh |
| plan(可选) | 创建详细的任务分解 | ./scripts/ralph-loop.sh plan |
信任 AI 能够自我识别、自我纠正和自我改进。观察模式并调整提示。
为了让 Ralph 有效工作,请启用完全自主权限:
--dangerously-skip-permissions--dangerously-bypass-approvals-and-sandbox⚠️ 风险自负。 仅在沙盒环境中使用。
每周安装量
590
代码仓库
GitHub 星标数
201
首次出现
2026年1月20日
安全审计
安装于
opencode506
gemini-cli468
codex462
claude-code448
cursor424
github-copilot406
Autonomous AI coding with spec-driven development
Ralph Wiggum combines Geoffrey Huntley's iterative bash loop with spec-driven development for fully autonomous AI-assisted software development.
The key insight: Fresh context each iteration. Each loop starts a new agent process with a clean context window, preventing context overflow and degradation.
Use Ralph Wiggum when:
┌─────────────────────────────────────────────────────────────┐
│ RALPH LOOP │
├─────────────────────────────────────────────────────────────┤
│ Loop 1: Pick spec A → Implement → Test → Commit → DONE │
│ Loop 2: Pick spec B → Implement → Test → Commit → DONE │
│ Loop 3: Pick spec C → Implement → Test → Commit → DONE │
│ ... │
│ │
│ Each iteration = Fresh context window │
│ Shared state = Files on disk (specs, plan, history) │
└─────────────────────────────────────────────────────────────┘
# Using Vercel's add-skill
npx add-skill fstandhartinger/ralph-wiggum
# Using OpenSkills
openskills install fstandhartinger/ralph-wiggum
For full Ralph Wiggum setup with constitution and interview:
# Tell your AI agent:
"Set up Ralph Wiggum using https://github.com/fstandhartinger/ralph-wiggum"
The agent will guide you through a lightweight, pleasant setup :
For existing projects, the agent detects your tech stack automatically. The interview prioritizes understanding what you're building and why.
Each iteration of the Ralph loop starts a new AI agent process. This means:
State persists between loops via files:
specs/ — Feature specifications with acceptance criteriaralph_history.txt — Log of breakthroughs, blockers, learningsIMPLEMENTATION_PLAN.md — Optional detailed task breakdownThe agent outputs <promise>DONE</promise> ONLY when:
The bash loop checks for this phrase. If not found, it retries.
Tests, lints, and builds act as guardrails. The agent must fix issues before outputting the completion signal.
The key to success: Each spec needs clear, testable acceptance criteria. This is what tells Ralph when a task is truly "done."
# Feature: User Authentication
## Requirements
- OAuth login with Google
- Session management
- Logout functionality
## Acceptance Criteria
- [ ] User can log in with Google
- [ ] Session persists across page reloads
- [ ] User can log out
- [ ] Tests pass
**Output when complete:** `<promise>DONE</promise>`
Good criteria: "User can log in with Google and session persists" Bad criteria: "Auth works correctly"
The more specific your acceptance criteria, the better Ralph performs.
# Start building (Claude Code)
./scripts/ralph-loop.sh
# With max iterations
./scripts/ralph-loop.sh 20
# Using Codex CLI
./scripts/ralph-loop-codex.sh
Every loop run writes all output to log files in logs/:
logs/ralph_*_session_YYYYMMDD_HHMMSS.log (entire run, including CLI output)logs/ralph_*_iter_N_YYYYMMDD_HHMMSS.log (per-iteration CLI output)logs/ralph_codex_output_iter_N_*.txt| Mode | Purpose | Command |
|---|---|---|
| build (default) | Pick spec, implement, test, commit | ./scripts/ralph-loop.sh |
| plan (optional) | Create detailed task breakdown | ./scripts/ralph-loop.sh plan |
Trust the AI to self-identify, self-correct, and self-improve. Observe patterns and adjust prompts.
For Ralph to work effectively, enable full autonomy:
--dangerously-skip-permissions--dangerously-bypass-approvals-and-sandbox⚠️ Use at your own risk. Only in sandboxed environments.
Weekly Installs
590
Repository
GitHub Stars
201
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubFailSocketWarnSnykWarn
Installed on
opencode506
gemini-cli468
codex462
claude-code448
cursor424
github-copilot406
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
136,300 周安装
Gemini CLI 更新日志自动化流程指南 | 技术文档版本管理最佳实践
430 周安装
tsdown - 基于Rolldown的极速TypeScript/JavaScript库打包工具,支持ESM/CJS/IIFE/UMD
430 周安装
PDF OCR技能:双引擎文字提取,支持影印PDF和图片识别
430 周安装
MUI v7 使用指南:组件样式、主题定制与响应式设计模式详解
431 周安装
HubSpot CRM 集成指南:使用 Membrane CLI 自动化销售、营销与客户服务
431 周安装
index-knowledge:自动生成层级化AGENTS.md文档工具,Turso数据库出品
431 周安装