Loading...
Loading...
Compare original and translation side by side
flowchart TD
S1["1. North Star\n(Web AI)"]
S2["2. Handoff to\nCode AI"]
S3["3. Chunk\nConversation"]
S4["4. Loop on\nMissing Spec"]
S5["5. Drill into\nDetails"]
S6["6. Ralph Loop\nBriefing"]
S7["7. Run /init\n(AGENTS.md)"]
S8["8. Build Loop\n& PROMPTs"]
S9["9. Baby-Step\nTODO List"]
S10["10. Run Loop\nSteer from Outside"]
S1 --> S2 --> S3 --> S4 --> S5 --> S6 --> S7 --> S8 --> S9 --> S10
S10 -->|"spec gap found"| S4
S10 -->|"details missing"| S5
S10 -->|"AGENTS.md stale"| S7
S10 -->|"PROMPT needs fix"| S8
S10 -->|"TODO too vague"| S9flowchart TD
S1["1. North Star\n(Web AI)"]
S2["2. Handoff to\nCode AI"]
S3["3. Chunk\nConversation"]
S4["4. Loop on\nMissing Spec"]
S5["5. Drill into\nDetails"]
S6["6. Ralph Loop\nBriefing"]
S7["7. Run /init\n(AGENTS.md)"]
S8["8. Build Loop\n& PROMPTs"]
S9["9. Baby-Step\nTODO List"]
S10["10. Run Loop\nSteer from Outside"]
S1 --> S2 --> S3 --> S4 --> S5 --> S6 --> S7 --> S8 --> S9 --> S10
S10 -->|"spec gap found"| S4
S10 -->|"details missing"| S5
S10 -->|"AGENTS.md stale"| S7
S10 -->|"PROMPT needs fix"| S8
S10 -->|"TODO too vague"| S9I've been working with another AI to design a project. I'm going to share that conversation
with you one message at a time so you can build a comprehensive spec. Please acknowledge
each message and start building context.我一直在与另一个AI协作设计一个项目。我会逐条分享我们的对话内容,以便你构建完整的规格文档。请确认每条消息并开始积累上下文。undefinedundefinedundefinedundefinedHere is our spec. Act as a senior engineer who has seen projects fail.
What assumptions are we making that could kill this project?
What edge cases have we ignored? What will break at scale?这是我们的规格文档。请扮演一位见过无数项目失败的资深工程师。
我们做出的哪些假设可能导致项目失败?
我们忽略了哪些边缘情况?哪些内容在规模化时会崩溃?ralph-wiggum-loop"100% of the code in this project will be AI-written. There will be no human supervision during the build. Every ambiguity must be resolved now. Every edge case must be handled in the spec. We will not be able to answer questions mid-build."
ralph-wiggum-loop"本项目的100%代码将由AI编写。构建过程中无需人工监督。所有模糊点必须现在解决。所有边缘情况必须在规格文档中处理。构建过程中我们无法回答任何问题。"
/init/initAGENTS.mdagent.md/initAGENTS.mdagent.mdbash scripts/setup-ralph-project.sh ./my-projectproject/
├── TODO.md # Tasks in - [ ] format, ordered
├── SPEC.md # The exhaustive spec from steps 1-6
├── AGENTS.md # Agent context from step 7
├── .memory-bank/
│ ├── inbox/
│ │ ├── builder/PROMPT.md # Implements TODO items
│ │ ├── verifier/PROMPT.md # Runs tests, checks requirements
│ │ └── planner/PROMPT.md # Updates TODO when stuck
│ ├── system/ # Auto-generated: rules, roles, patterns
│ │ ├── MEMORY_RULES.md # How the system learns and organizes
│ │ ├── CONTEXT_PATTERNS.md # Detected context patterns and templates
│ │ └── RETRIEVAL_GUIDE.md # How to find information in the bank
│ └── evolution/ # Auto-generated: how memory has grown
│ ├── DECISION_LOG.md # Why memory structure changed
│ └── LEARNED_HEURISTICS.md # Patterns the system discovered
└── ralph-loop.py # Generated loop runnerbash scripts/setup-ralph-project.sh ./my-projectproject/
├── TODO.md # 按顺序排列的- [ ]格式任务
├── SPEC.md # 步骤1-6生成的详尽规格文档
├── AGENTS.md # 步骤7生成的Agent上下文文档
├── .memory-bank/
│ ├── inbox/
│ │ ├── builder/PROMPT.md # 实现TODO项
│ │ ├── verifier/PROMPT.md # 运行测试、检查需求
│ │ └── planner/PROMPT.md # 遇到阻塞时更新TODO
│ ├── system/ # 自动生成:规则、角色、模式
│ │ ├── MEMORY_RULES.md # 系统学习与组织方式
│ │ ├── CONTEXT_PATTERNS.md # 检测到的上下文模式与模板
│ │ └── RETRIEVAL_GUIDE.md # 记忆库信息检索指南
│ └── evolution/ # 自动生成:记忆库演变过程
│ ├── DECISION_LOG.md # 记忆库结构变更原因
│ └── LEARNED_HEURISTICS.md # 系统发现的模式
└── ralph-loop.py # 生成的循环运行器- [ ] Build the authentication system- [ ] Implement JWT token generation per SPEC.md section 4.2.
Create src/auth/tokens.py with generate_token(user_id, expiry) and verify_token(token).
Token payload must include: sub, iat, exp, role. Use HS256. Secret from env JWT_SECRET.
Tests in tests/test_tokens.py. All tests must pass before marking complete.Review this TODO list. Can each item be completed by a build agent working alone,
with no human available to answer questions? Flag any item that requires a decision,
has an ambiguous success condition, or depends on something not yet built.- [ ] 构建认证系统- [ ] 按照SPEC.md第4.2节实现JWT令牌生成。
创建src/auth/tokens.py,包含generate_token(user_id, expiry)和verify_token(token)函数。
令牌负载必须包含:sub、iat、exp、role。使用HS256算法。密钥来自环境变量JWT_SECRET。
测试代码位于tests/test_tokens.py。所有测试通过后方可标记为完成。审核此TODO列表。每个项能否由构建Agent独立完成,无需人工回答问题?标记任何需要决策、成功条件模糊或依赖未完成工作的项。python ralph-loop.py loop --commit| Symptom | Go back to |
|---|---|
| Agent asks questions or guesses wrong | Step 4 — spec has gaps, run another missing-spec loop |
| Agent makes wrong implementation choices | Step 5 — drill deeper on that area |
| Agent lacks project context between runs | Step 7 — update AGENTS.md |
| Agent misunderstands its role or phase | Step 8 — rewrite the relevant PROMPT.md |
| Agent stalls or marks wrong tasks done | Step 9 — rewrite the TODO item with clearer success criteria |
python ralph-loop.py loop --commit| 症状 | 返回步骤 |
|---|---|
| Agent提出问题或猜测错误 | 步骤4——规格文档存在漏洞,运行补全规格循环 |
| Agent做出错误的实现选择 | 步骤5——深入研究该领域 |
| Agent在多次运行间缺少项目上下文 | 步骤7——更新AGENTS.md |
| Agent误解其角色或阶段 | 步骤8——重写相关的PROMPT.md |
| Agent停滞或错误标记任务为完成 | 步骤9——重写TODO项,明确成功标准 |
scripts/chunk-conversation.shscripts/chunk-conversation.shbash scripts/chunk-conversation.sh conversation.txtbash scripts/chunk-conversation.sh conversation.txtundefinedundefinedscripts/setup-ralph-project.shscripts/setup-ralph-project.shbash scripts/setup-ralph-project.sh ./my-projectbash scripts/setup-ralph-project.sh ./my-projectscripts/validate-todo.shscripts/validate-todo.shbash scripts/validate-todo.sh TODO.mdbash scripts/validate-todo.sh TODO.mdmy-project/
├── SPEC.md # Exhaustive spec covering all decisions
├── AGENTS.md # Agent context document
├── TODO.md # Baby-step task list with success criteria
├── ralph-loop.py # Working loop runner
└── memory-bank/
└── inbox/
├── builder/PROMPT.md
├── verifier/PROMPT.md
└── planner/PROMPT.mdmy-project/
├── SPEC.md # 涵盖所有决策的详尽规格文档
├── AGENTS.md # Agent上下文文档
├── TODO.md # 细分步骤的任务列表(含成功标准)
├── ralph-loop.py # 可运行的循环执行器
└── memory-bank/
└── inbox/
├── builder/PROMPT.md
├── verifier/PROMPT.md
└── planner/PROMPT.md.memory-bank/.memory-bank/.memory-bank/
├── inbox/
│ ├── builder/PROMPT.md # Role and initial guidance
│ ├── verifier/PROMPT.md
│ └── planner/PROMPT.mddomain/domain/api/endpoints/undefined.memory-bank/
├── inbox/
│ ├── builder/PROMPT.md # 角色与初始引导
│ ├── verifier/PROMPT.md
│ └── planner/PROMPT.mddomain/domain/api/endpoints/undefined.memory-bank/system/DECISION_LOG.mdsystem/CONTEXT_PATTERNS.mdsystem/RETRIEVAL_GUIDE.mdsystem/DECISION_LOG.mdsystem/LEARNED_HEURISTICS.mdundefined.memory-bank/system/DECISION_LOG.mdsystem/CONTEXT_PATTERNS.mdsystem/RETRIEVAL_GUIDE.mdsystem/DECISION_LOG.mdsystem/LEARNED_HEURISTICS.mdundefined/init/init