| name | gates |
| description | 9-language quality gate validation: linting, formatting, type checking, and test execution. Validates code changes meet quality standards before completion. Use when: (1) after code implementation, (2) before PR creation, (3) as part of /orchestrator Step 6, (4) manual quality check. Triggers: /gates, 'quality gates', 'run validation', 'check quality', 'validate code'. |
| context | fork |
| user-invocable | true |
Gates - Quality Validation (v2.37)
Comprehensive quality validation across 9 programming languages with TLDR-assisted analysis.
Quick Start
/gates
ralph gates
ralph gates src/
Pre-Gates: TLDR Language Detection (v2.37)
AUTOMATIC - Detect project languages efficiently:
tldr structure . > /tmp/project-structure.md
Supported Languages
| Language | Linter | Formatter | Types |
|---|
| TypeScript | ESLint | Prettier | tsc |
| JavaScript | ESLint | Prettier | - |
| Python | Ruff | Black | mypy |
| Rust | Clippy | rustfmt | cargo check |
| Go | golint | gofmt | go vet |
| Java | Checkstyle | google-java-format | - |
| Ruby | RuboCop | - | Sorbet |
| PHP | PHP_CodeSniffer | php-cs-fixer | PHPStan |
| Solidity | Solhint | prettier-solidity | - |
Workflow
1. Detect Languages
2. Run Linters
npx eslint src/
ruff check .
cargo clippy
golangci-lint run
3. Check Formatting
npx prettier --check .
black --check .
rustfmt --check src/
gofmt -l .
4. Type Checking
npx tsc --noEmit
mypy .
cargo check
go vet ./...
5. Run Tests
npm test
pytest
cargo test
go test ./...
Exit Codes
| Code | Meaning |
|---|
| 0 | All gates passed |
| 1 | Lint errors |
| 2 | Format errors |
| 3 | Type errors |
| 4 | Test failures |
Gate Configuration
Minimal (fast)
ralph gates --minimal
Standard (default)
ralph gates
Full (CI)
ralph gates --full
Integration
- Invoked by /orchestrator in Step 6
- Pre-step: tldr structure for language detection (v2.37)
- Must pass before VERIFIED_DONE
- Hooks:
quality-gates.sh (PostToolUse)
TLDR Integration (v2.37)
| Phase | TLDR Command | Purpose |
|---|
| Language detection | tldr structure . | Identify languages |
| Error context | tldr context $FILE . | Understand failing code |
| Impact analysis | tldr deps $FILE . | Find related tests |
Anti-Patterns
- Never skip gates for "quick fixes"
- Never ignore type errors
- Never commit with lint warnings