Sourcery continuously parses code within your IDE or via GitHub webhook integration. In the IDE, it analyzes the active abstract syntax tree (AST) in real time, identifying opportunities to simplify conditionals, combine redundant logic, or adopt modern idiomatic syntax patterns. When an improvement is found, Sourcery highlights the line and presents an instant diff explanation in a hover tooltip.
Developers can apply suggested refactorings with a single keystroke or command shortcut. Beyond AST rules, Sourcery leverages large language models to provide contextual coding chat, generate docstrings, and author complete unit tests based on function parameters and return types. In CI/CD pipelines, Sourcery reviews incoming pull requests, posting structured summaries of code health and complexity changes.