Quality gate

From senda-labs/DQIII8 · View interactive version

Quality gate is an AI agent skill from the GitHub repository senda-labs/DQIII8. Run the DQIII8 quality pipeline — format (Black), imports (isort), lint (ruff), tests (pytest), security scan. Used internally by checkpoint and pre-commit flows.

How to use this skill

Skill file

/quality-gate — On-Demand Quality Pipeline

Run the DQIII8 quality pipeline for a file or directory scope.

Usage

/quality-gate [path|.] [--fix] [--strict]

Pipeline

Run these phases in order. Stop on first failure unless --strict is passed.

Phase 1 — Format (Black)

black --check [path] 2>&1 | tail -15
# With --fix:
black [path]

Phase 2 — Imports (isort, if installed)

isort --check-only [path] 2>&1 | head -10
# With --fix:
isort [path]

Phase 3 — Lint (ruff)

ruff check [path] --select E,F,W,PLE2510,PLE2512,PLE2513,PLE2514,PLE2515 2>&1 | head -30

Fail on E, F, and PLE25xx codes (hidden/invalid Unicode control characters — zero false

positives against this repo, unlike RUF001-003 which flag legitimate stylistic uses of

the multiplication sign and info-symbol-with-VS16 and were deliberately excluded). W

codes: report only.

Phase 4 — Tests (pytest)

python3 -m pytest tests/ -x -q --tb=short 2>&1 | tail -20

With --strict: fail on warnings too (-W error).

Phase 5 — Security Quick-Scan

grep -rn "shell=True" [path] --include="*.py" | grep -v "#\|test_"
grep -rn "f['\"].*SELECT\|f['\"].*INSERT\|f['\"].*DELETE" [path] --include="*.py"

Both must return empty.

Output Format

QUALITY GATE — [path]
=====================
Phase 1 Format:   PASS
Phase 2 Imports:  PASS / SKIP (isort not installed)
Phase 3 Lint:     PASS / FAIL — 3 errors
Phase 4 Tests:    PASS — 12 passed in 0.8s
Phase 5 Security: PASS

RESULT: PASS / BLOCKED

When to Run

Related

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.