Langsung ke konten
Skillpedia
Testing280k Β· #300

delivery-gate

Fungsinya

Ini adalah pemeriksa otomatis yang memastikan agent AI (Claude) tidak menyelesaikan pekerjaannya sebelum memverifikasi beberapa hal penting. Pemeriksa ini mengecek apakah ruang disk masih cukup dan apakah 'learning log' sudah diperbarui.

Kapan dipakai

  • βœ“Saat Anda ingin memastikan agent sudah menyimpan hasil pembelajarannya.
  • βœ“Sebelum menganggap pekerjaan agent sudah selesai.
  • βœ“Untuk mencegah agent kehabisan ruang disk.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/affaan-m/ECC/blob/main/skills/delivery-gate/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œPastikan agent sudah menyimpan progres sebelum menyelesaikan tugasnya.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Pemeriksa ini melihat sisa ruang disk dan mengecek apakah file learning log sudah diubah baru-baru ini. Jika ada yang tidak beres, pemeriksa ini bisa menghentikan agent agar tidak langsung menyelesaikan tugasnya.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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

…

Pertanyaan umum

Apa itu 'learning libraries'?

Ini adalah file tempat agent mencatat apa yang sudah dipelajarinya, seperti keputusan yang diambil dan hasil dari suatu tugas. Contohnya 'growth-log', 'decisions/log.md', dan 'output-index.md'.

Apa yang terjadi jika agent tidak memperbarui 'learning log'?

Jika agent sedang mengerjakan tugas yang kompleks dan belum memperbarui learning libraries apa pun, sesi kerjanya akan diblokir sehingga tidak bisa diselesaikan.

Apa itu 'rationalization patterns'?

Ini adalah frasa yang mungkin digunakan agent untuk membenarkan jalan pintas, misalnya 'lewati tes dulu'. Pemeriksa ini hanya memberi peringatan untuk pola seperti ini, tidak memblokirnya.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
280k
Peringkat
#300
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa