用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/mylukin/ralph-dev --skill phase-4-heal命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Break down PRD into atomic, testable tasks using CLI for modular storage
Autonomous implementation loop with TDD, fresh agents per task, and self-healing
Interactive requirement clarification through structured questions and PRD generation
基于 SOC 职业分类
正在显示 SKILL.md
| name | phase-4-heal |
| description | Systematic error recovery using root cause investigation before fixes |
| allowed-tools | ["Read","Write","Bash","WebSearch","Grep","Glob"] |
| user-invocable | false |
Systematically investigate and fix implementation errors using root cause analysis. NO FIXES WITHOUT INVESTIGATION FIRST.
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
If you haven't completed Phase 1 (Root Cause Investigation), you CANNOT propose fixes.
{task_id}{error_msg}IMPORTANT: This skill requires the Ralph-dev CLI. It will build automatically on first use.
# Bootstrap CLI - runs automatically, builds if needed
source ${CLAUDE_PLUGIN_ROOT}/shared/bootstrap-cli.sh
# Verify CLI is ready
ralph-dev --version
# Context-compression resilience: Verify current phase
CURRENT_PHASE=$(ralph-dev state get --json 2>/dev/null | jq -r '.phase // "none"')
echo "Current phase: $CURRENT_PHASE"
# Expected: implement or heal (invoked by phase-3)
# Get task details (context-compression safe)
TASK_JSON=$(ralph-dev tasks get "$TASK_ID" --json)
TASK_DESC=$(echo "$TASK_JSON" | jq -r '.data.description // "No description"')
# Get test command from language config
TEST_CMD=$(ralph-dev detect --json | jq -r '.verifyCommands[] | select(contains("test"))' | head -1)
echo "Task: $TASK_ID"
echo "Description: $TASK_DESC"
echo "Test command: $TEST_CMD"
MANDATORY: Complete each phase before proceeding to the next.
CI=true {test_command} to confirmgit log -5, git diff HEAD~1Error Classification:
| Error Type | Indicators | Fix Type |
|---|---|---|
| Missing dependency | "Module not found", "Cannot find module" | npm install |
| Type error | "TypeError", type mismatch | Code fix |
| Undefined reference | "is not defined", "ReferenceError" | Import/declaration |
| Test failure | "Expected X but got Y" | Implementation logic |
| Build error | "compilation error", "build failed" | Config fix |
Max 3 attempts. After 3 failures → mark task as failed.
MAX_ATTEMPTS=3
ATTEMPT=1
while [ $ATTEMPT -le $MAX_ATTEMPTS ]; do
# Apply single fix based on hypothesis
# Run tests: CI=true {test_command}
if [ $? -eq 0 ]; then
# SUCCESS - return result
break
fi
ATTEMPT=$((ATTEMPT + 1))
# If still failing, refine hypothesis and retry
done
CRITICAL: Always show full test output as verification evidence.
REQUIRED Output Format:
---HEALING RESULT---
task_id: {task_id}
status: success | failed
verification_passed: true | false
attempts: {N}
fix_type: dependency | code | implementation | config
hypothesis: {what was wrong}
notes: {brief summary}
---END HEALING RESULT---
| Limit | Value | Purpose |
|---|---|---|
| Max attempts | 3 | Prevent infinite retry loops |
| Timeout | 1 hour | Prevent stuck healing |
| Single fix per attempt | 1 | Isolate variables |
CI=true when running tests| Error | Action |
|---|---|
| Cannot reproduce | Gather more data, check environment |
| No working examples | Use WebSearch for reference implementations |
| All 3 attempts fail | Mark task failed, require manual intervention |
| Hypothesis unclear | Return to Phase 1 with more investigation |