Verification Loop
Run all quality gates before committing or creating a PR.
When to Use
- Before any git commit
- Before creating a pull request
- After completing implementation (before marking done)
- When asked to "verify" or "check everything"
Procedure
Step 1: Detect Project Type
Identify available tools from project files:
package.json: npm/yarn scripts (lint, typecheck, test)
pyproject.toml / setup.py: Python tooling (ruff, mypy, pytest)
go.mod: Go tooling (golangci-lint, go vet, go test)
Cargo.toml: Rust tooling (clippy, cargo test)
Step 2: Run Quality Gates
Execute in order (stop on CRITICAL):
| Gate |
Command (detect per project) |
Severity |
| Lint |
eslint, ruff, golangci-lint |
HIGH |
| Type Check |
tsc --noEmit, mypy, go vet |
HIGH |
| Tests |
jest, pytest, go test |
CRITICAL |
| Security |
npm audit, pip-audit, cargo audit |
CRITICAL |
| Coverage |
jest --coverage, pytest --cov |
HIGH |
Step 3: Report Results
Verification: {project name}
Lint: PASS | FAIL ({count} issues)
Types: PASS | FAIL ({count} errors)
Tests: PASS | FAIL ({pass}/{total})
Security: PASS | FAIL ({count} vulnerabilities)
Coverage: {percent}% (target: 80%)
Verdict: READY TO COMMIT | BLOCKED ({reason})
Step 4: Actionable Fixes
For each failure, provide:
{gate} FAIL:
{file}:{line} - {error message}
Fix: {specific suggestion}
Blocking Rules
- CRITICAL failures block commit (tests failing, known vulnerabilities)
- HIGH failures: warn but allow commit with acknowledgment
- MEDIUM/LOW: report only, do not block
Output Format
Verification: lead-scoring-simulator
Lint: PASS
Types: PASS
Tests: PASS (24/24)
Security: PASS
Coverage: 87% (target: 80%)
Verdict: READY TO COMMIT
Rules
- Always run tests with verbose output
- Kill any hung processes after 120s timeout
- If a gate tool is not installed, skip it with a warning
- Never auto-fix lint issues without showing what changed
- Clean up test artifacts after run
1---2name: verification-loop3description: Pre-commit verification with lint, type-check, tests, and security scan4---56# Verification Loop78Run all quality gates before committing or creating a PR.910## When to Use1112- Before any git commit13- Before creating a pull request14- After completing implementation (before marking done)15- When asked to "verify" or "check everything"1617## Procedure1819### Step 1: Detect Project Type2021Identify available tools from project files:22- `package.json`: npm/yarn scripts (lint, typecheck, test)23- `pyproject.toml` / `setup.py`: Python tooling (ruff, mypy, pytest)24- `go.mod`: Go tooling (golangci-lint, go vet, go test)25- `Cargo.toml`: Rust tooling (clippy, cargo test)2627### Step 2: Run Quality Gates2829Execute in order (stop on CRITICAL):3031| Gate | Command (detect per project) | Severity |32|------|------------------------------|----------|33| Lint | eslint, ruff, golangci-lint | HIGH |34| Type Check | tsc --noEmit, mypy, go vet | HIGH |35| Tests | jest, pytest, go test | CRITICAL |36| Security | npm audit, pip-audit, cargo audit | CRITICAL |37| Coverage | jest --coverage, pytest --cov | HIGH |3839### Step 3: Report Results4041```42Verification: {project name}4344 Lint: PASS | FAIL ({count} issues)45 Types: PASS | FAIL ({count} errors)46 Tests: PASS | FAIL ({pass}/{total})47 Security: PASS | FAIL ({count} vulnerabilities)48 Coverage: {percent}% (target: 80%)4950Verdict: READY TO COMMIT | BLOCKED ({reason})51```5253### Step 4: Actionable Fixes5455For each failure, provide:56```57{gate} FAIL:58 {file}:{line} - {error message}59 Fix: {specific suggestion}60```6162## Blocking Rules6364- CRITICAL failures block commit (tests failing, known vulnerabilities)65- HIGH failures: warn but allow commit with acknowledgment66- MEDIUM/LOW: report only, do not block6768## Output Format6970```71Verification: lead-scoring-simulator7273 Lint: PASS74 Types: PASS75 Tests: PASS (24/24)76 Security: PASS77 Coverage: 87% (target: 80%)7879Verdict: READY TO COMMIT80```8182## Rules8384- Always run tests with verbose output85- Kill any hung processes after 120s timeout86- If a gate tool is not installed, skip it with a warning87- Never auto-fix lint issues without showing what changed88- Clean up test artifacts after run