What problem does it solve? Codebases performing numeric computations with mixed units, decimal precisions, and scaling factors (common in DeFi protocols and financial code) are prone to subtle arithmetic bugs like unit mismatches, missing scaling, and precision loss that are hard to spot by manual review. ## Core Features & Use Cases - Dimensional Annotation: Adds unit and precision comments (e.g., D18{tok}, D27{UoA/tok}) to variables, function parameters, and formulas across the codebase. - Dimension Propagation: Traces dimensions through arithmetic, function calls, and assignments using formal dimensional algebra rules. - Bug Detection: Validates annotated code against a catalog of dimensional bug patterns such as oracle precision mismatches, wrong scaling direction, and adding incompatible dimensions. - Use Case: Audit a DeFi lending protocol by running the full pipeline to annotate all arithmetic files, propagate dimensions, and receive a structured report of confirmed dimensional bugs with severity ratings. ## Quick Start Ask the agent to perform a dimensional analysis on this repository to annotate units and find arithmetic bugs.