agentleFS
gategrowgategrow/delivery-gate/SKILL.md

delivery-gate

Skill1 starsChanged 5 months agoMITView on GitHub

Dual-layer mechanical Stop hook — config-health (process monitor, soft) + quality-gate (output enforcer, hard). Deterministic checks only: regex markers, file timestamps, disk space. Zero AI inference.

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. baksohyeon/mogui-ADE-orchestrator★ 20same name
    2. gongyijie85/dsh-ecc★ 8same name
    3. lhbsaa/apex-unified★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Add to ~/.claude/settings.json (order matters — config-health first):

    line 32

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Delivery Gate

A dual-layer mechanical gate for Claude Code Stop hooks. Two Python scripts, zero dependencies, deterministic checks only.

config-health(Process Monitor)→ tracks rule execution → soft feedback (never blocks)
         ↓
quality-gate(Output Enforcer)→ checks output completeness → hard block (≥3 stale → exit 2)
         ↓
       Delivery

When to Activate

  • Any project where you want Claude to consistently capture learning across sessions
  • Teams that want mechanical enforcement of output quality (not just trust the AI's word)
  • Solo developers who want the system to remind them, not nag them

Installation

# Copy both scripts into your Claude Code scripts directory
cp config-health.py ~/.claude/scripts/
cp quality-gate.py ~/.claude/scripts/

Add to ~/.claude/settings.json (order matters — config-health first):

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

Manual health dashboard:

python3 ~/.claude/scripts/config-health.py --check

How It Works

config-health.py — Process Monitor (soft, never blocks)

CheckMechanismOn Hit
Rule marker countingRegex [✓THINK] [✓CONTEXT] [✓DELIVERY] in transcriptLog to JSONL, update pending-verifications.md
Verification tracking3-session window per ruleVerified → auto-remove from pending list
Config integrityCore files exist + non-emptyDashboard alert
Session cost tierCumulative sessions countDashboard tier (L0-L3)

quality-gate.py — Output Enforcer (hard, blocks when stale)

CheckMechanismOn Hit
Stale learning librariesFile modification timestampsBlock if ≥3 stale OR growth-log stale after complex task
Disk space < 15GBshutil.disk_usageBlock (exit 2)
Rationalization patternsRegex on transcript tailWarning only (never blocks alone)

The Dual-Layer Boundary

The boundary between soft and hard is not "importance" — it's "can this be fixed later?"

  • Missed rule markers → can retroactively mark and count → soft
  • Missed output records → lost forever → hard

Customization

config-health.py

  • RULES — rules to track with regex markers
  • VERIFICATION_WINDOW — sessions needed for a rule to "pass"
  • MIN_TOOL_CALLS_FOR_CHECK — minimum tools to consider session complex
  • MIN_EDITS_FOR_DELIVERY — minimum edits to expect DELIVERY marker

quality-gate.py

  • RATIONALIZE — regex patterns for rationalization detection
  • LIBS — files/dirs to check for today's updates
  • COMPLEX_THRESHOLD — Edit/Write calls to classify as complex
  • DISK_CRIT_GB — block below this

Examples

Normal path — silence

Session: 2 edits, growth-log updated, rules followed
→ config-health: 85% marker rate, wrote to JSONL (exit 0, no stdout)
→ quality-gate: 1/5 stale (exit 0, no stdout)
→ Delivery. Zero tokens consumed.

Rule drift — surfaced, not blocked

Session: rules followed but THINK marker rate dropped to 40%
→ config-health: wrote "THINK: 40%" to pending-verifications.md (exit 0)
→ quality-gate: all libs fresh (exit 0)
→ Delivery. Next session: BODY.md surfaces pending item → AI pays attention.

Output incomplete — BLOCKED

Session: 5 edits, nothing written to memory
→ config-health: normal (exit 0)
→ quality-gate: 5/5 libs stale → exit 2
  stderr: "BLOCK: 5 libraries stale (threshold: ≥3)"
→ Claude CANNOT finish. Must update libraries first.

Limitations

The mechanical gate enforces habits and completeness, not content quality. It checks that you captured learning, not whether the learning is correct. For output consistency checks, pair with self-audit.

Compatibility

  • Python 3.8+
  • Windows, macOS, Linux
  • Zero dependencies beyond stdlib

License

MIT

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.