본문으로 건너뛰기
Skillpedia
테스트280k · #300

delivery-gate

하는 일

AI 에이전트(Claude)가 중요한 몇 가지를 확인하기 전에 작업을 끝내지 않도록 하는 자동 점검 도구입니다. 디스크 공간이 충분한지, ‘학습 로그’가 업데이트되었는지 확인합니다.

사용하는 경우

  • ✓에이전트가 학습 내용을 저장했는지 확인하고 싶을 때.
  • ✓에이전트의 작업을 완료로 간주하기 전에.
  • ✓에이전트의 디스크 공간 부족을 막고 싶을 때.

스킬 링크

https://github.com/affaan-m/ECC/blob/main/skills/delivery-gate/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/affaan-m/ECC/blob/main/skills/delivery-gate/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“에이전트가 끝내기 전에 진행 상황을 저장했는지 확인해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

여유 디스크 공간을 확인하고, 학습 로그 파일이 최근에 수정되었는지 봅니다. 문제가 있으면 에이전트가 끝나지 않도록 막을 수 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Delivery Gate — Mechanical Quality Gate for Claude Code

A Stop hook that checks three things before Claude can finish a session, using only deterministic checks — file modification timestamps, disk usage, and regex patterns on the transcript text. No AI inference.

This is distinct from reasoning gates (like self-audit): delivery-gate checks machine-verifiable facts; self-audit checks output quality across four reasoning dimensions. Together they form defense in depth:

  • delivery-gate: "Was the learning library touched today? Is disk space safe?"
  • self-audit: "Is the file content correct, complete, and honest?"

This is the same pattern as CI pipeline gates — automated, deterministic checks that verify machine-readable facts rather than trusting self-reported status.

What It Checks

Check Mechanism On Hit
Rationalization patterns Regex on transcript tail Warning only (never blocks)
Stale learning libraries mtime on 5 configurable paths Warning if some stale; Block if >=3 stale OR growth-log stale + complex task
Disk space < 50GB shutil.disk_usage Warning
Disk space < 15GB shutil.disk_usage Block (exit 2)

Rationalization detection warns about patterns like "skip tests for now" and "pre-existing bug" — surface signals that thinking may have been cut short. It never blocks on its own, because regex heuristics can false-positive. The blocking conditions are: disk critical, >=3 learning libs stale, OR growth-log specifically stale (all require complex task >=3 edits).

Why

Claude Code's built-in checks cover code quality (build → type → lint → test). But there's a different failure mode: the agent produces working code while the session hygiene was neglected — learning not captured, rationalized shortcuts, disk running out silently.

Over many sessions of "ship and forget," the human hasn't grown. This hook enforces the habit: complex task → must touch learning libraries.

Install

From the ECC repository root:

mkdir -p ~/.claude/scripts
cp skills/delivery-gate/hooks/quality-gate.py ~/.claude/scripts/

Add to ~/.claude/settings.json:

{
  "hooks": {
    "Stop": [{
      "hooks": [{
        "type": "command",
        "command": "python3 ~/.claude/scripts/quality-gate.py",
        "timeout": 5000
      }]
    }]
  }
}

Learning Libraries

Create these files in your project's memory directory. The hook checks if at least one was updated today:

memory/
├── growth-log/          # Daily learning entries (directory)
├── decisions/log.md     # Decision log
├── output-index.md      # Index of session outputs
├── ratings-tracker.md   # Skill ratings over time
└── tooling_capabilities.md  # Known tools inventory

Customize the LIBS dict to match your own file structure.

Configuration

Edit quality-gate.py:

Variable Default Purpose
RATIONALIZE 4 patterns Regex patterns for rationalization detection
LIBS 5 libraries Files/dirs to check for today's updates
COMPLEX_THRESHOLD 3 Edit/Write calls to classify as complex
DISK_WARN_GB 50 Warn below this
DISK_CRIT_GB 15 Block below this

Examples

Simple session — allowed:

edit_count=1 (< 3, not complex) → exit 0

Complex task, learning captured — allowed:

edit_count=5 (complex) → checks LIBS → growth-log updated today → exit 0

Complex task, no learning — BLOCKED:

edit_count=4 (complex) → checks LIBS → all 5 stale → exit 2
stderr: "Blocked: complex task completed but no learning captured today."

Low disk space — BLOCKED:

disk_free=12GB < 15GB critical → exit 2
stderr: "Blocked: disk space at 12GB (threshold: 15GB)."

Limitations

The hook enforces the habit of touching learning libraries, not the quality of what was recorded. If output-index.md is updated but growth-log is skipped, the hook passes (1 of 5 libraries touched). This is by design: mechanical gates check machine-verifiable facts. For content quality verification, pair with self-audit.

Compatibility

  • Python 3.8+ (uses from __future__ import annotations)
  • Cross-platform: Windows, macOS, Linux
  • Zero dependencies beyond stdlib

Quality

This code went through 4 rounds of automated code review (CodeRabbit + Greptile) with 9 real bugs found and fixed.

See Also

…

자주 묻는 질문

‘학습 라이브러리’란 무엇인가요?

에이전트가 내린 결정이나 작업 결과 같은 학습 내용을 기록하는 파일입니다. 예로는 ‘growth-log’, ‘decisions/log.md’, ‘output-index.md’가 있습니다.

에이전트가 ‘학습 로그’를 업데이트하지 않으면 어떻게 되나요?

에이전트가 복잡한 작업을 하고 있는데 학습 라이브러리를 하나도 업데이트하지 않았다면, 세션을 끝내는 것이 차단됩니다.

‘합리화 패턴’이란 무엇인가요?

에이전트가 지름길을 정당화하기 위해 쓸 수 있는 표현입니다. 예를 들어 ‘지금은 테스트를 건너뛰자’ 같은 말입니다. 이 점검기는 경고만 하며, 차단하지는 않습니다.

상세 정보

작성자의 원본 설명

Stop hook that blocks Claude from finishing until quality checks pass. Detects rationalization patterns (surface text heuristics), stale learning logs (filesystem mtime), and low disk space. Complements self-audit by mechanically enforcing learning capture habits. Use when Claude should be mechanically blocked from declaring work finished before quality checks and learning capture actually pass.

repo: affaan-m/ECC

인기도

GitHub 스타
280k
순위
#300
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬