Stacks

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

Updated 6 min read

In 2026, Atlas empowers Solidity developers to produce precise README documentation that accurately reflects the current state and behavior of their smart contracts, leveraging the familiar Foundry toolchain including `forge test`, `soldeer (forge soldeer install)`, and `forge fmt` to ensure every claim is verifiable against the live codebase.

How Atlas Generates Accurate Solidity READMEs

Atlas generates accurate Solidity READMEs in 2026 by directly reading your smart contract source code, ensuring documentation reflects current behavior rather than outdated specifications. It uses the `lsp` tool's `documentSymbol` operation to enumerate public APIs, guaranteeing no exported function or variable is missed or invented during the documentation process.

Atlas approaches Solidity documentation by treating your codebase as the single source of truth. Instead of relying on outdated comments or developer memory, Atlas uses its `lsp` tool's `documentSymbol` operation to precisely enumerate every public function, event, and state variable exported by your Solidity module. This ensures that the generated README covers the entire public API surface, preventing omissions or the invention of non-existent features. For each identified export, Atlas then employs its `read` tool to analyze the implementation details and uses `codebase_search` to find real-world usage examples within your Foundry project. This process allows Atlas to describe what the Solidity code actually does today, including how callers interact with your contracts, storage layout, and modifiers, making the documentation traceable and verifiable against the live code.

Concrete Solidity Tooling and File Paths with Atlas

Atlas integrates directly with your Foundry project, recognizing standard Solidity file paths like `src/` for contracts and `foundry.toml` for configuration. It leverages `forge test` to verify code samples and `soldeer (forge soldeer install)` for managing dependencies, ensuring all documentation examples are executable and up-to-date in 2026.

Atlas is built for Solidity developers working within a Foundry environment. It expects a standard project structure, including a `foundry.toml` configuration file and Solidity contracts located in the `src/` directory. When documenting, Atlas understands and utilizes the native Solidity toolchain. For instance, any code samples included in the generated README are verified for correctness and executability by running them with the `bash` tool, often invoking `forge test` to confirm functionality. Atlas also recognizes libraries installed via `soldeer (forge soldeer install)`, allowing it to understand external dependencies and their interfaces. Furthermore, after generating or modifying documentation, Atlas can run `forge fmt` on the resulting diff, ensuring that all changes adhere to your project's formatting standards, just as you would for any Solidity code change.

Ensuring Review and Safety in Solidity Documentation with Atlas

Atlas prioritizes safety and verifiability when documenting Solidity, presenting a unified diff for every file edit and requiring explicit approval before writing any changes. Every Atlas tool call is permission-gated, allowing you to review and approve actions like running `forge test` or modifying `src/` files, ensuring full control over the 2026 documentation process.

Safety and developer control are paramount when Atlas interacts with your Solidity codebase. Before any changes are written, Atlas computes a unified diff for every file edit, surfacing it for your approval. This allows you to meticulously review exactly what will be changed in your `README.md` or even your Solidity contract files. Every Atlas tool call, such as `lsp`, `read`, `codebase_search`, `grep`, `write`, or `bash`, is permission-gated against allow, ask, and deny rules. Atlas drafts its plan in a read-only plan agent and explicitly asks for permission before switching to a build agent to execute any actions. If Atlas proposes a change to your Solidity contract code, for example, adding a reentrancy guard or converting a `require` string to a custom error, it can even run `forge snapshot` to show you the gas delta before you approve the diff, providing a comprehensive safety net for your critical smart contracts.

Step by step

  1. 01Run Atlas in your Foundry project, ensuring a `foundry.toml` configuration file and a `src/` directory for your Solidity contracts exist.
  2. 02Allow Atlas to read your Solidity contracts, storage layout, modifiers, and the libraries installed by `forge soldeer`.
  3. 03Atlas enumerates the module's public API using the `lsp` tool's `documentSymbol` operation to capture all exported Solidity functions, events, and state variables.
  4. 04Atlas reads the implementation of each Solidity export with the `read` tool and uses `codebase_search` to find how callers actually use it in practice within your project.
  5. 05Atlas `grep`s your repository for an existing `README.md` to match its heading structure and tone rather than inventing a new format.
  6. 06Atlas drafts the new `README.md` using the `write` tool, quoting real Solidity signatures and real file paths from your `src/` directory.
  7. 07Atlas verifies every Solidity code sample in the drafted documentation by running it with the `bash` tool, ensuring it executes successfully, often by invoking `forge test`.
  8. 08Review the unified diff presented by Atlas for the `README.md` and approve the changes; if contract code was modified, Atlas can run `forge snapshot` to show the gas delta before approval, then `forge fmt` the diff.

Frequently asked questions

How does Atlas ensure Solidity documentation is up-to-date in 2026?
Atlas directly reads your Solidity source files, including contracts in `src/`, and verifies code samples by executing them with `bash` and `forge test`, ensuring documentation reflects the current codebase's behavior.
Can Atlas document Solidity modifiers and storage layouts?
Yes, Atlas is designed to read your Solidity contracts, storage layout, and modifiers, incorporating these specific details into the generated README documentation to provide a complete picture.
What Solidity tools does Atlas integrate with for documentation?
Atlas integrates direct with the Foundry toolchain, specifically using `forge test` for verification, `soldeer (forge soldeer install)` for dependency awareness, and `forge fmt` for formatting generated diffs.
How does Atlas handle security and review for Solidity documentation changes?
Atlas operates with permission-gated tool calls, drafts plans in a read-only agent, and presents a unified diff for every proposed change, allowing you to approve or deny edits to your Solidity `README.md` or contract files.
Will Atlas invent Solidity functions or miss public APIs when documenting?
No, Atlas uses the `lsp` tool's `documentSymbol` operation to enumerate the real exported surface of your Solidity module, ensuring no public API is missed or invented in the documentation.
Can Atlas help me understand the gas cost implications of documentation changes?
While documentation itself doesn't have gas costs, if Atlas proposes changes to your Solidity contract code, it can run `forge snapshot` to show you the gas delta before you approve the diff, providing transparency on resource usage.
Does Atlas support existing README structures for Solidity projects?
Yes, Atlas uses its `grep` tool to search for an existing `README.md` in your repository, allowing it to match the established heading structure and tone rather than inventing a new format for your Solidity project.

Try Atlas in your terminal

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

Install Atlas

Related guides

Document a Module with a README Using Atlas (2026 Workflow)

How to document a module with a README using Atlas in 2026: the lsp tool's documentSymbol enumerates the real exports, read supplies the behavior, write emits the README.

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.

Diagnose a Hanging or Long-Running Command in Solidity with Atlas in 2026

Solidity developers in 2026 can use Atlas to diagnose whether a `forge test` or `forge soldeer install` command is genuinely slow or silently blocked on input, and get it unstuck.

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.

Add a Regression Test for a Solidity Bug Fix with Atlas in 2026

Lock in Solidity bug fixes with Atlas by adding regression tests. Learn how Atlas uses `forge test` to confirm failures and passes, ensuring robust smart contract development in 2026.

Migrate a deprecated API across every callsite in Solidity with Atlas in 2026

Migrate deprecated Solidity APIs across your entire codebase with Atlas. Leverage forge test, soldeer, and forge fmt for a complete, verified, and safe transition in your Foundry project.

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.

Browse this resource hub