Skip to content

Verification Commands Database

Ruby / Rails

Test Suite

  • Command: bin/rails test or bundle exec rspec
  • Pass: Exit code 0, no "failures" in output
  • Fail: Exit code != 0 OR output contains "failures", "errors"
  • Detection: Look for Rakefile, bin/rails, spec/ directory

Linter

  • Command: bundle exec rubocop
  • Pass: Exit code 0, "no offenses"
  • Fail: Exit code != 0 OR "offenses detected"
  • Detection: .rubocop.yml file exists

Type Check

  • Command: bundle exec steep check (if using Steep)
  • Pass: Exit code 0
  • Fail: Exit code != 0
  • Detection: Steepfile exists

JavaScript / Node

Test Suite

  • Command: npm test or yarn test
  • Pass: Exit code 0, no "failed" in output
  • Fail: Exit code != 0 OR output contains "failed"
  • Detection: package.json with scripts.test

Linter

  • Command: npm run lint or eslint .
  • Pass: Exit code 0
  • Fail: Exit code != 0
  • Detection: package.json with scripts.lint or .eslintrc*

Type Check

  • Command: npm run type-check or tsc --noEmit
  • Pass: Exit code 0
  • Fail: Exit code != 0
  • Detection: tsconfig.json exists

Build

  • Command: npm run build
  • Pass: Exit code 0, no "error" in output
  • Fail: Exit code != 0 OR "error" in output
  • Detection: package.json with scripts.build

Python

Test Suite

  • Command: pytest or python -m pytest
  • Pass: Exit code 0, "passed" count > 0
  • Fail: Exit code != 0 OR "FAILED" in output
  • Detection: pytest.ini, pyproject.toml with [tool.pytest], or tests/ directory

Linter

  • Command: ruff check . or flake8
  • Pass: Exit code 0
  • Fail: Exit code != 0
  • Detection: ruff.toml, .flake8, or pyproject.toml

Type Check

  • Command: mypy .
  • Pass: Exit code 0
  • Fail: Exit code != 0
  • Detection: mypy.ini or pyproject.toml with [tool.mypy]

Formatter Check

  • Command: black --check . or ruff format --check .
  • Pass: Exit code 0
  • Fail: Exit code != 0
  • Detection: pyproject.toml with black/ruff config

Go

Test Suite

  • Command: go test ./...
  • Pass: Exit code 0, "PASS"
  • Fail: Exit code != 0 OR "FAIL"
  • Detection: go.mod exists

Linter

  • Command: golangci-lint run
  • Pass: Exit code 0
  • Fail: Exit code != 0
  • Detection: .golangci.yml exists

Formatter Check

  • Command: gofmt -l . (should return empty)
  • Pass: Exit code 0 AND no output
  • Fail: Non-empty output (files need formatting)
  • Detection: *.go files exist

Rust

Test Suite

  • Command: cargo test
  • Pass: Exit code 0, "test result: ok"
  • Fail: Exit code != 0 OR "FAILED"
  • Detection: Cargo.toml exists

Linter

  • Command: cargo clippy
  • Pass: Exit code 0
  • Fail: Exit code != 0
  • Detection: Cargo.toml exists

Formatter Check

  • Command: cargo fmt -- --check
  • Pass: Exit code 0
  • Fail: Exit code != 0
  • Detection: Cargo.toml exists

General

Git Status Clean

  • Command: git status --porcelain
  • Pass: Empty output (working tree clean)
  • Fail: Non-empty output (uncommitted changes)
  • Use Case: Verify no accidental uncommitted changes

Docker Build

  • Command: docker build -t test-image .
  • Pass: Exit code 0, "Successfully built"
  • Fail: Exit code != 0
  • Detection: Dockerfile exists

CI Simulation

  • Command: Project-specific CI command (e.g., make ci)
  • Pass: Exit code 0
  • Fail: Exit code != 0
  • Detection: Makefile with ci target or .github/workflows/

Detection Priority

When auto-detecting verification commands:

  1. Check for explicit configuration:
  2. Look for .ralph-wiggum.yml or similar config file
  3. If found, use specified commands

  4. Language-specific detection:

  5. Ruby: Check for Gemfile, Rakefile
  6. JavaScript: Check for package.json
  7. Python: Check for pyproject.toml, setup.py
  8. Go: Check for go.mod
  9. Rust: Check for Cargo.toml

  10. Run primary verification:

  11. Test suite (highest priority)
  12. Linter (medium priority)
  13. Type check (medium priority)
  14. Build (low priority if tests exist)

  15. Combine multiple verifications:

  16. Run tests AND linter if both exist
  17. Only fail if ANY verification fails
  18. Report which verification failed

Custom Verification

Users can specify custom verification:

# .ralph-wiggum.yml
verification:
  - command: "bin/rails test"
    pass_criteria: "exit_code == 0"
  - command: "bundle exec rubocop"
    pass_criteria: "exit_code == 0 && !output.includes('offenses')"
  - command: "npm run build"
    pass_criteria: "exit_code == 0"