Skip to main content

Quality Agents

type-safety

Category: quality

Adds full type annotations throughout the codebase.

  • Python — adds type hints to all function signatures, class attributes, and variable assignments. Enables mypy strict mode.
  • TypeScript — enables strict mode in tsconfig.json and fixes all resulting type errors.
nimbus run --agent type-safety

error-handling

Category: quality

Wraps all external calls with proper typed error handling. Eliminates silent failures.

What it targets:

  • HTTP client calls (requests, httpx, fetch, axios)
  • Database queries
  • File I/O operations
  • External process invocations
  • JSON parsing

For each unhandled call, it adds specific exception handling — not bare except Exception — and ensures errors are either logged with context or propagated with typed error objects.

nimbus run --agent error-handling

dead-code-eliminator

Category: quality

Removes dead code.

What it finds:

  • Unused imports
  • Unused variables and function parameters
  • Functions and classes that are never called or instantiated
  • Commented-out code blocks

Uses static analysis to confirm code is unreachable before removing it. Does not remove code that may be used via dynamic dispatch or reflection.

nimbus run --agent dead-code-eliminator

complexity-reducer

Category: quality

Refactors functions with cyclomatic complexity above 10 to below 7.

Strategy:

  • Extracts complex conditionals into named helper functions
  • Replaces nested if/else chains with early returns
  • Converts long switch/match blocks into dispatch tables where appropriate
  • Splits functions that do more than one thing
nimbus run --agent complexity-reducer

naming-consistency

Category: quality

Fixes naming convention violations across the codebase.

Detects and enforces:

  • Snake_case for Python variables and functions
  • PascalCase for classes
  • SCREAMING_SNAKE_CASE for constants
  • camelCase for JavaScript/TypeScript variables and functions
  • Inconsistent naming patterns (e.g., get_user vs fetchUser in the same Python file)
nimbus run --agent naming-consistency