원클릭으로
phase-5-deliver
// Two-stage code review, quality gates, and automated delivery (commit + PR)
// Two-stage code review, quality gates, and automated delivery (commit + PR)
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
Autonomous language and framework detection for any programming language. Use when user asks to "detect language", "what language is this project", or when initializing ralph-dev for a new project.
Autonomous end-to-end development from requirement to delivery. Use when user wants complete automation, "build X for me", or full feature implementation without manual steps.
Systematic error recovery using root cause investigation before fixes
| name | phase-5-deliver |
| description | Two-stage code review, quality gates, and automated delivery (commit + PR) |
| allowed-tools | ["Read","Write","Bash","Grep","Glob"] |
| user-invocable | false |
Run quality gates, perform two-stage code review, create commit, and optionally create pull request.
.ralph-dev/tasks/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 and task progress
CURRENT_PHASE=$(ralph-dev state get --json 2>/dev/null | jq -r '.phase // "none"')
TASKS_JSON=$(ralph-dev tasks list --json 2>/dev/null)
TOTAL=$(echo "$TASKS_JSON" | jq -r '.data.total // 0')
COMPLETED=$(echo "$TASKS_JSON" | jq -r '.data.completed // 0')
FAILED=$(echo "$TASKS_JSON" | jq -r '.data.failed // 0')
echo "Current phase: $CURRENT_PHASE | Tasks: $COMPLETED/$TOTAL completed, $FAILED failed"
# Expected: deliver
# Query task stats (context-compression safe)
COMPLETED=$(ralph-dev tasks list --status completed --json | jq -r '.data.total')
TOTAL=$(ralph-dev tasks list --json | jq -r '.data.total')
echo "Tasks completed: $COMPLETED/$TOTAL"
CRITICAL: All gates must pass before delivery.
# Get verification commands from language config
VERIFY_CMDS=$(ralph-dev detect --json | jq -r '.verifyCommands[]')
# Run each command with CI=true
for cmd in $VERIFY_CMDS; do
echo "Running: $cmd"
CI=true eval "$cmd"
[ $? -ne 0 ] && { echo "GATE FAILED: $cmd"; exit 1; }
done
Standard Quality Gates:
npx tsc --noEmit)npm run lint)npm test)npm run build)Stage 1: Spec Compliance (Blocking)
Stage 2: Code Quality (Advisory)
# Stage changes
git add .
# Generate commit message based on completed tasks
# Format: feat(modules): description
git commit -m "$(cat <<EOF
feat({modules}): implement {N} tasks
Tasks completed:
{task list}
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
EOF
)"
COMMIT_SHA=$(git rev-parse --short HEAD)
If gh CLI available and on feature branch:
# Push branch
git push -u origin $(git branch --show-current)
# Create PR
gh pr create \
--title "{PR title}" \
--body "{PR body with summary, tasks, quality gates}"
Ask user about cleaning up temporary files:
state.json, progress.log, debug.logprd.md, tasks/ralph-dev state update --phase complete
REQUIRED Output Format:
---PHASE RESULT---
phase: deliver
status: complete
tasks_delivered: {N}
commit_sha: {sha}
pr_url: {url or null}
quality_gates:
typecheck: passed
lint: passed
tests: passed
build: passed
code_review:
spec_compliance: passed
code_quality: passed | passed_with_suggestions
next_phase: null
---END PHASE RESULT---
| Gate | Blocking | Retry |
|---|---|---|
| Type checking | Yes | Fix errors, re-run |
| Linting | Yes | Fix errors, re-run |
| Tests | Yes | Fix failures, re-run |
| Build | Yes | Fix errors, re-run |
| Spec compliance | Yes | Implementation incomplete |
| Code quality | No | Suggestions only |
CI=true when running verification commandsCo-Authored-By in commit message| Error | Action |
|---|---|
| Quality gate fails | Stop delivery, report failure, don't commit |
| Spec compliance issues | Report issues, don't commit |
| Commit fails | Abort delivery, report error |
| PR creation fails | Continue (manual PR fallback) |
| gh CLI not found | Skip PR, show manual instructions |