🦀 ClawHub
Generic Quality Gateways for Unattended Agent Development
by @thecybercore
Implements six universal, language-agnostic quality gates for APIs, web apps, and CI/CD pipelines using repository-configured checks and detailed reports.
TERMINAL
clawhub install tcc-quality-gates📖 About This Skill
openClaw Skill: Quality Gateways (Generic Web + API Applications)
Purpose
This skill defines and applies 6 universal quality gateways for typical application projects that include:The gateways are written in LLM-friendly operational language: how to check, calculate, evaluate, and document results consistently.
This skill is language-agnostic and can be used on any repository. It relies on a central configuration file:
.defs/quality-gateway-definition.json (MUST be stored in the repository, not the workspace)Non-Negotiable Storage Rules (openClaw)
REPO_ROOT/.defs/quality-gateway-definition.jsonREPO_ROOT/.tmp/quality-gates/ (do not create or delete other workspace directories)Inputs
Outputs
1. A human-readable report (Markdown) 2. A machine-readable report (JSON) containing raw metrics + per-check scores 3. Evidence references (paths, snippets, CI links if available)Recommended default output paths (override via JSON config):
docs/quality/quality-gate-report.mddocs/quality/quality-gate-report.jsondocs/quality/evidence/The 6 Quality Gateways
Each gateway produces:
All gateway thresholds and weights come from:
.defs/quality-gateway-definition.jsonGateway 1 — Build & Dependency Health
Goal
Ensure the system can be built and packaged reliably, and dependencies are manageable and safe to ship.What to Check (typical checks)
How to Measure / Calculate
Evidence to Collect
How to Document
In the report, include:Gateway 2 — Automated Testing & Coverage
Goal
Prove correctness through automated tests and prevent regression.What to Check
How to Measure / Calculate
Evidence to Collect
How to Document
Gateway 3 — Security & Supply-Chain
Goal
Prevent known vulnerabilities, secrets leakage, insecure configs, and supply-chain risks.What to Check
How to Measure / Calculate
Evidence to Collect
How to Document
Gateway 4 — Performance & Efficiency (API + Web)
Goal
Ensure the system meets baseline performance and user experience targets.What to Check
API (typical):Web (typical):
How to Measure / Calculate
Evidence to Collect
How to Document
Gateway 5 — Maintainability & Code Health
Goal
Keep the codebase understandable, changeable, and reviewable over time.What to Check
How to Measure / Calculate
Evidence to Collect
How to Document
Gateway 6 — Release Readiness & Operability (Observability + Runbooks)
Goal
Make sure the system can be operated safely in production.What to Check
How to Measure / Calculate
Mostly “presence + completeness” scoring:Evidence to Collect
How to Document
Standard Evaluation Algorithm (LLM-Executable)
Step 1: Load configuration
REPO_ROOT/.defs/quality-gateway-definition.jsonStep 2: Collect metrics per check
For each gate:Step 3: Score each check (0–100)
Use the scoring method defined per check:boolean: pass => 100, fail => 0threshold_range: linear scoring between warn and targetpenalty_by_count: start at 100 and subtract per issuerubric: map {missing/partial/complete} to {0/50/100}Step 4: Score each gateway
blockingOnFail=true, any FAIL blocks releaseStep 5: Produce reports
Write: 1) Markdown report (human) 2) JSON report (machine) Include:Report Template (Markdown)
Use this outline indocs/quality/quality-gate-report.md unless JSON overrides paths:Summary
Gateway Results
| Gateway | Score | Status | Key Metrics | Evidence | |---|---:|---|---|---|Details (per Gateway)
quality-gateway-definition.json — JSON Schema Description
The configuration file is a normal JSON document with:
Root
schemaVersion (string) — version of this config layoutprojectProfile (object) — context used for defaultsscoring (object) — global pass/warn thresholds and aggregation rulesreporting (object) — output paths and evidence foldergates (array) — list of gateway definitions (exactly 6 for this skill)projectProfile (object)
applicationType (string) — e.g. "web_api_and_web"riskLevel (string) — "low"|"medium"|"high"releaseCadence (string) — e.g. "daily"|"weekly"|"monthly"expectedLoad (object, optional)apiRps (number)
- concurrency (number)scoring (object)
passScore (number 0–100)warnScore (number 0–100)overallAggregation (string) — "weighted_average"blockIfAnyBlockingGateFails (boolean)reporting (object)
markdownReportPath (string, repo-relative)jsonReportPath (string, repo-relative)evidenceDir (string, repo-relative)tempDir (string, repo-relative; MUST be inside .tmp/quality-gates/)gates (array of objects)
Each gate:id (string) — stable identifiername (string)description (string)weight (number) — relative importance in overall scoreblockingOnFail (boolean)checks (array)checks (array of objects)
Each check:id (string)name (string)description (string)weight (number)metricType (string) — "boolean"|"percentage"|"count"|"duration_ms"|"rubric"scoringMethod (string) — "boolean"|"threshold_range"|"penalty_by_count"|"rubric"thresholds (object) — depends on scoringMethod:threshold_range:
- target (number)
- warn (number)
- max (number, optional hard-fail)
- direction (string) — "higher_is_better"|"lower_is_better"
- for penalty_by_count:
- allowed (number)
- warnAbove (number)
- failAbove (number)
- penaltyPerUnit (number)
evidenceHints (array of strings) — where to find evidence in a generic repo/CInotes (string, optional)Operational Notes
"unknown" in the JSON report and score it using the config’s fallback rule (recommended: treat unknown as WARN with score 70 unless the check is security/secrets, where unknown should be FAIL).
.tmp/quality-gates/.JSON references
templ/quality-gateway-definition-template.json (template settings file. Can be copied to REPO_ROOT/.defs/quality-gateway-definition.json if missing)