What problem does it solve?
The correctness-lens helps developers and reviewers find subtle logic errors that cause incorrect results, missed edge cases, and broken state transitions before they reach production by evaluating code and plans against formal correctness criteria.
Core Features & Use Cases
- Logical validity checks: Verify branch completeness, boolean expressions, arithmetic safety, and invariant preservation across function boundaries.
- Boundary and edge-case analysis: Assess handling of empty inputs, off-by-one errors, null/undefined propagation, and extreme numeric values.
- State and concurrency validation: Review state machine transitions, initialization and teardown completeness, TOCTOU patterns, race conditions, and async/await correctness.
- Use Case: Apply this lens to a code change that modifies workflow state or introduces concurrency to ensure correctness under concurrent execution and unexpected inputs.
Quick Start
Ask the correctness-lens to review the change or plan for logical errors, missing edge-case handling, and concurrency risks and provide findings with confidence levels.