Stacks

Review a Pull Request in Solidity with Atlas in 2026

Updated 8 min read

In 2026, Atlas empowers Solidity developers to review pull requests comprehensively by fetching the branch, reading full file context, checking `forge test` results, and identifying potential vulnerabilities that a line-by-line diff might miss. It integrates directly with your Foundry project, leveraging tools like `forge test`, `soldeer (forge soldeer install)`, and `forge fmt` to ensure robust smart contract development and catch subtle bugs.

How Atlas Reviews Solidity Pull Requests for Deep Context

In 2026, a typical Solidity pull request review with Atlas begins by fetching the specific branch and producing a raw patch using `bash`. Atlas then goes beyond the diff hunks, reading the full changed Solidity files, such as `src/MyContract.sol`, to provide complete surrounding context. This approach ensures that developers see more than just 10 lines of changes.

Atlas's review workflow mirrors that of a careful human, but with enhanced capabilities. Instead of relying solely on the limited view of a `git diff`, Atlas uses its `read` tool to pull the entire contents of modified Solidity files. This is crucial for understanding how changes in one part of a contract might affect logic far outside the immediate diff, preventing bugs that a line-by-line inspection would miss. For instance, a change to a modifier in `src/AccessControl.sol` might have implications for functions in `src/Vault.sol` that are not visible in a standard diff. Atlas's VCS layer exposes `status`, `diff`, `diffRaw`, and `commits` over the same git data, ensuring a comprehensive understanding of the codebase state.

Ensuring Solidity Smart Contract Safety with Atlas

Every Solidity diff has a gas cost and an attack surface, making safety paramount. Atlas helps secure your smart contracts by checking for critical issues like reentrancy guards or suggesting conversions of `require` strings to custom errors to cut deploy size by up to 20%. It can also write fuzz tests in `test/` and run `forge test` behind a permission prompt.

Atlas is designed to mitigate the unique risks associated with Solidity development. After reading the full context of changed files, Atlas can proactively identify areas where security enhancements are needed. For example, it can suggest adding a `reentrancy` guard to a critical function or converting verbose `require` error messages into more gas-efficient custom errors, which is a common optimization in 2026. Furthermore, Atlas can generate new fuzz tests within your `test/` directory, such as `test/MyContract.t.sol`, and execute them using `forge test`. This process is always permission-gated, ensuring you approve any test generation or execution, providing an additional layer of security and control over your Foundry project.

Integrating Atlas with Your Foundry Toolchain for Solidity

Atlas direct integrates with the Foundry toolchain, recognizing your `foundry.toml` and `src/` directory to provide a native Solidity development experience. It leverages `forge test` for running tests, `soldeer (forge soldeer install)` for package management, and `forge fmt` for consistent code formatting. This deep integration ensures a familiar workflow for Solidity developers in 2026.

For Solidity developers, Atlas is not just another AI tool; it's an extension of their existing Foundry workflow. When operating within a Foundry project, Atlas automatically understands the project structure, including your contracts, storage layout, and installed libraries. It can read the dependencies managed by `forge soldeer`, allowing it to analyze external contracts correctly. During a PR review, Atlas can run `forge test` to validate changes, ensuring all existing tests pass and new tests cover the modified logic. Before approving any changes, Atlas can even run `forge snapshot` to show the gas delta of contract modifications, providing concrete data on performance impacts. Finally, it can apply `forge fmt` to any modified Solidity files, ensuring adherence to coding standards before committing.

Permission-Gated Actions and Diff Approval in Atlas

Atlas ensures every action taken during a Solidity PR review is transparent and approved by the developer. All tool calls are permission-gated against `allow`, `ask`, and `deny` rules before execution. Atlas drafts a plan in a read-only plan agent and asks for approval before switching to a build agent, providing a 2-step verification process for critical changes.

Security and control are paramount when dealing with Solidity smart contracts. Atlas is built with this in mind, implementing a robust permission system. Before any tool, such as `bash` to run `forge test` or `lsp` to `findReferences`, is executed, it must pass through a permission check. This prevents unintended modifications or information leaks. Furthermore, Atlas operates with a clear separation of concerns: a read-only plan agent first outlines the proposed actions, such as 'add a reentrancy guard to `src/MyContract.sol`'. Only after explicit developer approval does it transition to a build agent to execute the plan. Every file edit is then presented as a unified diff for final approval, and Atlas snapshots these changes as git patches, allowing for easy diffing and rollback if needed.

Catching Hidden Bugs in Solidity with Atlas's Contextual Review

A typical Solidity PR review often misses subtle bugs that a line-by-line diff cannot reveal. Atlas addresses this by indexing code with AST declarations using tree-sitter, not blind line windows, and fusing semantic and keyword retrieval for searches. This allows it to `findReferences` for changed function signatures and `grep` for old constant names, catching issues that are 10 steps removed from the diff.

The true power of Atlas in Solidity PR review lies in its ability to understand code context deeply. Unlike tools that only look at the immediate lines of a diff, Atlas builds a comprehensive code index using AST declarations. This means it understands the structure of your Solidity contracts, including functions, modifiers, and state variables. When a function signature changes in `src/Library.sol`, Atlas can use its `lsp` tool's `findReferences` operation to identify every caller in the entire codebase, even those in `src/DependentContract.sol` that were not part of the original diff. Additionally, Atlas can `grep` for specific patterns, such as old constant names or feature flags that should have been updated but were overlooked, ensuring the entire codebase remains consistent and correct.

Step by step

  1. 01Fetch the PR branch and produce the diff: Use Atlas's VCS layer to fetch the specific branch and generate the raw patch for review.
  2. 02Read full Solidity files for context: Employ Atlas's `read` tool to pull the complete contents of all changed Solidity files (e.g., `src/MyContract.sol`), providing context beyond the diff hunks.
  3. 03Check for broken Solidity references: For every changed function signature in a Solidity contract, run Atlas's `lsp` tool with the `findReferences` operation to identify any callers in the codebase that the diff did not touch.
  4. 04Grep for stale Solidity patterns: Use Atlas's `grep` tool to search the entire codebase for patterns like old constant names, stale copies, or feature flags that should have been updated by the change but were missed.
  5. 05Run Solidity tests and report findings: Execute `forge test` via Atlas's `bash` tool within your Foundry project, then report the test results and any failures as a `todowrite` list ordered by severity.
  6. 06Analyze Solidity gas cost deltas: Ask Atlas to run `forge snapshot` to compute and display the gas cost delta for any modifications to your Solidity smart contracts.
  7. 07Approve and format Solidity changes: Review the unified diff presented by Atlas, which may include changes from `forge fmt`, and approve the modifications to be written to your Solidity codebase.

Frequently asked questions

How does Atlas ensure I don't miss context outside the diff in Solidity?
Atlas uses its `read` tool to pull the full contents of changed Solidity files, such as those in `src/`, rather than just the diff hunks. This provides complete surrounding context, allowing you to understand the broader implications of a change.
Can Atlas check for reentrancy guards or custom errors in Solidity?
Yes, Atlas can analyze your Solidity code and suggest adding reentrancy guards to critical functions or converting `require` strings to custom errors to optimize gas usage and reduce deploy size.
What Solidity tools does Atlas integrate with for PR review?
Atlas integrates deeply with the Foundry toolchain, specifically leveraging `forge test` for running tests, `soldeer (forge soldeer install)` for package management, and `forge fmt` for consistent code formatting.
How does Atlas prevent unauthorized changes to my Solidity codebase?
Atlas employs a robust permission system where every tool call is permission-gated. It drafts a plan in a read-only agent and requires explicit approval before executing any changes, presenting a unified diff for final review.
Can Atlas help me understand gas cost implications of a Solidity PR?
Absolutely. Atlas can run `forge snapshot` on your Solidity project to compute and display the gas delta for any proposed contract modifications, giving you concrete data on performance impacts before approval.
How does Atlas find references to changed Solidity functions?
Atlas indexes your Solidity code by AST declarations using tree-sitter. When a function signature changes, it uses the `lsp` tool's `findReferences` operation to locate all callers across the entire codebase, even those outside the immediate diff.
Does Atlas support local embedding models for Solidity code?
Yes, Atlas can build its code index with local Ollama embeddings, ensuring that your Solidity code remains off third-party servers and is processed securely on your local machine.

Try Atlas in your terminal

The terminal-native AI coding agent. Free core, single binary.

Install Atlas

Related guides

Review a Pull Request with Atlas (2026 Workflow)

How to review a pull request with Atlas in 2026: bash produces the raw patch, read pulls whole files, the lsp tool's findReferences checks callers the diff never shows.

Rename a symbol across the repo in Solidity with Atlas in 2026

Rename Solidity functions, classes, or constants across your entire repository with Atlas. Leverage precise LSP references and `forge test` verification for safe, accurate refactoring in 2026.

Trace a Runtime Bug from a Solidity Stack Trace with Atlas in 2026

Pinpoint and fix Solidity runtime bugs from production stack traces using Atlas. Leverage Foundry's `forge test` and `soldeer` for a secure, gas-efficient workflow.

Audit a Solidity Repo with Parallel Subagents in Atlas, 2026

Sweep your Solidity repository for common problems using Atlas's parallel subagents. Identify issues in Foundry projects without blowing your context window, ensuring secure smart contracts.

Locate Where a Behavior is Implemented in Solidity with Atlas in 2026

Discover how Atlas helps Solidity developers in 2026 pinpoint exact file and symbol implementations for contract behaviors using Foundry's toolchain, semantic search, and LSP.

Onboard to an Unfamiliar Solidity Codebase with Atlas in 2026

Solidity developers in 2026 can rapidly build a mental model of any unfamiliar codebase using Atlas. Leverage semantic search, AST indexing, and Foundry toolchain integration with forge test, soldeer, and forge fmt.

Write Unit Tests for Untested Solidity Code with Atlas in 2026

Add robust unit tests to your Solidity contracts using Atlas. Leverage `forge test`, `soldeer`, and `forge fmt` to ensure code quality and security in 2026.

Document a module with a README in Solidity with Atlas in 2026

In 2026, Atlas helps Solidity developers generate accurate READMEs for smart contracts. It uses `forge test`, `soldeer`, and `forge fmt` to reflect current code behavior.

Browse this resource hub