본문으로 건너뛰기
cccskills
무료GitHub에 공개

hitl-escalate

Escalate blocked runs to a human via configured channel or fallback to BLOCKED.md and exit the loop. Use when the loop hits an ambiguous spec, a missing credential, a destructive action needing approval, or 3+ consecutive verify failures on the same task.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Telegram
설치 방법 보기

포함된 파일(1)

  • SKILL.md4.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Human-in-the-Loop Escalate

Long-running agent loops fail in a specific way when they meet a question they can't answer: they guess. The guess ships, the next session builds on it, and by the time a human looks the divergence is three commits deep. This skill is the release valve — when the agent is stuck, it stops and asks, cleanly, in a shape the human can act on.

Trigger — escalate when any of these are true

  • Ambiguous spec. PROMPT.md admits two implementations and the choice changes user-visible behavior.
  • Missing credential. A required env var, API key, or config file is absent, and there is no sanctioned way for the agent to create one.
  • Destructive action needing approval. Dropping a table, force-pushing, deleting user data, spending money, sending mail to real recipients.
  • 3+ consecutive /verify failures on the same task. The loop is thrashing. Stop and get a human eye before the fourth attempt.
  • External dependency down. A third-party service the feature needs is unreachable and no offline path exists.

If none of the above hold, do not escalate. Guessing is bad; escalating on a solvable problem is also bad (it trains humans to ignore the channel).

Primary action — call the human via the configured channel

Read LOOPKIT_HITL_CHANNEL. Supported values:

ValueShape
telegramPOST to https://api.telegram.org/bot$LOOPKIT_HITL_TELEGRAM_TOKEN/sendMessage with chat_id=$LOOPKIT_HITL_TELEGRAM_CHAT, text=<question + repo + short context>.
slackPOST JSON {"text": "..."} to $LOOPKIT_HITL_SLACK_WEBHOOK (incoming-webhook URL).
dialRun $LOOPKIT_HITL_DIAL_CMD with the message on stdin. Whatever the operator wired up — SMS gateway, ntfy, phone call, pager.
none (or unset)Skip the primary action. Go straight to fallback.

Message body — always these five lines, in this order:

[loopkit] blocked in <repo-name> on <ISO timestamp>
Q: <one-line question>
Context: <one-line what you were doing>
Attempted: <one-line what you tried>
Choices: <A | B | C>

Non-2xx from the channel is a soft failure. Log it, then fall through to the fallback so the loop still exits cleanly.

Fallback — write BLOCKED.md and exit

Whether the primary succeeds or fails, always write ./BLOCKED.md at the repo root with exactly four sections:

# Blocked

## Question:
<one sentence, answerable with a short reply>

## Context:
<what feature, which file, which commit, why now — 3-6 lines>

## Attempted:
<bulleted list of what you tried and why each fell short>

## Choices:
- A) <option> — <consequence>
- B) <option> — <consequence>
- C) <option> — <consequence>

Then exit 2. The loop runner (run.sh) checks for BLOCKED.md at the head of each iteration and exits with code 2 if it exists — that stops the loop until a human clears it.

Human unblocks

The human reads BLOCKED.md, edits PROMPT.md / drops the credential / approves the destructive step, then rm BLOCKED.md and restarts run.sh. The deleted BLOCKED.md is the unblock signal.

Anti-patterns — do not do these

  • Do not fabricate an answer. "I'll assume the user meant X" is how divergence starts. Assume nothing under ambiguity — escalate.
  • Do not loop endlessly. After the third consecutive /verify failure on the same task, escalate. The fourth attempt is not going to succeed by the same reasoning that failed thrice.
  • Do not silently swallow the missing credential. Do not commit a placeholder, do not disable the feature, do not "TODO" the auth. Ask.
  • Do not escalate for questions the repo already answers. Read AGENTS.md, PROMPT.md, and the last three commits first. Escalation is expensive human attention — spend it on real ambiguity.
  • Do not skip writing BLOCKED.md because the primary channel succeeded. The file is the loop's exit contract. Without it, run.sh keeps spinning.

Pairs with

  • adversarial-verify — the source of the 3-verify-failure trigger.
  • shift-notes — after escalating, note the block in IMPLEMENTATION_PLAN.md so the next session (post-unblock) has full context.
  • spec-first — an ambiguous PROMPT.md is a spec-first failure; the human's unblock should tighten the spec, not just answer the one-off.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

a11y-pass

무료

Catch the accessibility failures that ship in almost every AI-built UI. Use after building any interactive component.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Archive228/loopkit7552026년 7월 15일 업데이트

Before compaction Loopkit extracts decisions into claude-decisions.json (machine-readable). Read it alongside claude-progress.txt at session start — prose is for humans, JSON is for the loop.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Archive228/loopkit7552026년 7월 15일 업데이트

Review a diff against the goal spec assuming the code is BROKEN. The reviewer that lives in the maker's head always agrees with itself — this pulls review into a hostile, separate pass. Invoke after every code change before marking work done.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Archive228/loopkit7552026년 7월 15일 업데이트

Verify that an endpoint checks ownership, not just authentication. Use on any handler that reads or mutates user data.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Archive228/loopkit7552026년 7월 15일 업데이트

Find the exact commit that introduced a bug. Use when something worked before and broke, and you don't know which change did it.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Archive228/loopkit7552026년 7월 15일 업데이트

Before picking new work, smoke-test the last "completed" feature. If it's broken, revert and re-open it before touching anything else. Kills the "looks shipped, isn't shipped" bug across sessions.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Archive228/loopkit7552026년 7월 15일 업데이트

Archive228의 스킬 모두 보기

이 스킬의 문제 신고