en un clic
quality-gates
// Engineering discipline and systematic quality verification. Core principles, anti-patterns, decision rules, and gate procedures for code review and delivery.
// Engineering discipline and systematic quality verification. Core principles, anti-patterns, decision rules, and gate procedures for code review and delivery.
Maintain and update knowledge base about Duyet Le (@duyet) - profile, resume, blog posts, projects.
Generate or review high-density, interactive, self-contained HTML artifacts based on Thariq Shihipar's "Unreasonable Effectiveness of HTML" patterns. Use this skill when asked to "create HTML," "build a dashboard," "format a PR review," "make an interactive explainer," or when you need to "review and update" existing HTML using the "good-html" style.
Fine-tune LLMs with Unsloth using GRPO or SFT. Supports FP8, vision models, mobile deployment, Docker, packing, GGUF export, dataset preparation, synthetic data, MLX (Apple Silicon). Use when: train with GRPO, fine-tune, reward functions, SFT training, FP8 training, vision fine-tuning, phone deployment, docker training, packing, export to GGUF, prepare dataset, synthetic data, install unsloth, environment flags, MLX training.
MUST USE when reviewing ClickHouse schemas, queries, or configurations. Contains 28 rules that MUST be checked before providing recommendations. Always read relevant rule files and cite specific rules in responses.
Knowledge base about Duyet Le (@duyet) and duyetbot behavioral patterns. Owner profile, knowledge sources, and execution transparency.
Maintain @duyet/skills repository - add, update, validate skills, generate documentation, and manage releases. Use when making changes to this skills repository.
| name | quality-gates |
| description | Engineering discipline and systematic quality verification. Core principles, anti-patterns, decision rules, and gate procedures for code review and delivery. |
This skill provides engineering discipline principles and structured quality gate procedures for verifying code quality, security, performance, and production readiness before delivery.
Automatically activate for:
Refactor when:
Don't when:
Abstract when:
Don't when:
| Bad | Why | Good |
|---|---|---|
| Magic numbers | Unclear | Named constants |
| God objects | Unmaintainable | Single responsibility |
| Copy-paste | Bug multiplication | Extract shared |
| Commented code | Confusion | Git history |
| Premature optimization | Wrong focus | Measure first |
For routine changes, bug fixes, small features:
┌─────────────────────────────────────────────────────────┐
│ STANDARD GATES │
├─────────────────────────────────────────────────────────┤
│ ✓ All tests pass │
│ ✓ Linting clean (no errors) │
│ ✓ TypeScript compiles (no type errors) │
│ ✓ Code follows project patterns │
│ ✓ No obvious security issues │
│ ✓ Changes match requirements │
└─────────────────────────────────────────────────────────┘
For significant features, refactors, public APIs:
┌─────────────────────────────────────────────────────────┐
│ STRICT GATES │
├─────────────────────────────────────────────────────────┤
│ All Standard gates PLUS: │
│ ✓ Test coverage ≥ 90% for new code │
│ ✓ Security scan passes (no high/critical) │
│ ✓ Performance benchmarks met │
│ ✓ API documentation updated │
│ ✓ Breaking changes documented │
│ ✓ Peer review completed │
└─────────────────────────────────────────────────────────┘
For security-sensitive, production-critical, high-risk changes:
┌─────────────────────────────────────────────────────────┐
│ CRITICAL GATES │
├─────────────────────────────────────────────────────────┤
│ All Strict gates PLUS: │
│ ✓ Security audit by security-focused review │
│ ✓ Load testing completed │
│ ✓ Rollback procedure documented and tested │
│ ✓ Monitoring and alerting configured │
│ ✓ Stakeholder sign-off obtained │
│ ✓ Incident response plan updated │
└─────────────────────────────────────────────────────────┘
# Run these checks in sequence
npm run lint # or: bun run lint
npm run type-check # or: bun run type-check
npm run test # or: bun run test
npm run build # Verify build succeeds
Verification checklist:
npm run test:coverage
Coverage requirements by level:
| Level | Line Coverage | Branch Coverage | Function Coverage |
|---|---|---|---|
| Standard | ≥ 70% | ≥ 60% | ≥ 70% |
| Strict | ≥ 90% | ≥ 80% | ≥ 90% |
| Critical | ≥ 95% | ≥ 90% | ≥ 95% |
What to test:
Automated checks:
npm audit # Dependency vulnerabilities
npm run lint:security # Security-focused lint rules (if configured)
Manual review checklist:
For Strict/Critical:
Metrics to verify:
| Metric | Standard | Strict | Critical |
|---|---|---|---|
| Page Load | < 3s | < 2s | < 1s |
| API Response | < 500ms | < 200ms | < 100ms |
| Bundle Size | < 500KB | < 300KB | < 200KB |
| Memory Leak | None | None | None |
Verification steps:
Required documentation:
| Level | README | API Docs | Changelog | Architecture |
|---|---|---|---|---|
| Standard | ✓ | - | ✓ | - |
| Strict | ✓ | ✓ | ✓ | - |
| Critical | ✓ | ✓ | ✓ | ✓ |
Checklist:
Verification steps:
For Strict/Critical:
## Quality Gate Report
**Feature**: [Feature Name]
**Level**: [Standard | Strict | Critical]
**Date**: [YYYY-MM-DD]
**Reviewer**: [Name]
### Summary
| Gate | Status | Notes |
|------|--------|-------|
| Code Quality | ✅ PASS | All checks clean |
| Test Coverage | ✅ PASS | 92% coverage |
| Security | ✅ PASS | No vulnerabilities |
| Performance | ⚠️ WARN | API slightly slow |
| Documentation | ✅ PASS | Updated |
| Integration | ✅ PASS | E2E passing |
### Detailed Results
#### Code Quality
- Lint: 0 errors, 0 warnings
- TypeScript: 0 errors
- Tests: 47 passed, 0 failed
- Build: Success
#### Test Coverage
- Lines: 92% (target: 90%)
- Branches: 85% (target: 80%)
- Functions: 94% (target: 90%)
#### Security
- npm audit: 0 vulnerabilities
- Manual review: Completed, no issues
- [x] Input validation verified
- [x] Auth checks verified
#### Performance
- Page load: 1.8s (target: < 2s)
- API response: 180ms (target: < 200ms)
- Bundle size: 287KB (target: < 300KB)
#### Issues Found
1. [WARN] API endpoint `/api/users` responds in 450ms under load
- Recommendation: Add caching layer
- Severity: Low
- Blocking: No
### Verdict
**✅ APPROVED FOR MERGE**
All critical gates pass. Performance warning noted for future optimization.
When a gate fails:
| Severity | Description | Action |
|---|---|---|
| Blocker | Prevents deployment | Must fix before merge |
| Critical | Security/data risk | Must fix before merge |
| Major | Significant issue | Should fix, can defer with approval |
| Minor | Quality concern | Can defer to follow-up |
### Gate Failure: [Gate Name]
**Severity**: [Blocker | Critical | Major | Minor]
**Description**: [What failed and why]
**Impact**: [What happens if not fixed]
**Remediation**: [How to fix]
**Timeline**: [When it will be fixed]
**Approved By**: [If deferring, who approved]
Blocker/Critical → Fix immediately → Re-run gates
Major → Fix or get approval → Document decision
Minor → Create follow-up ticket → Proceed with caution
# Standard gate check
npm run lint && npm run type-check && npm run test && npm run build
# Coverage check
npm run test:coverage
# Security audit
npm audit
# Full strict gate
npm run lint && npm run type-check && npm run test:coverage && npm run build && npm audit