Stacks

Document a module with a README in F# with Atlas in 2026

Updated 9 min read

Atlas helps F# developers in 2026 produce accurate, current documentation for their modules by directly reading source code, enumerating public APIs with the lsp tool, and verifying code samples with bash. This ensures your READMEs reflect what the code actually does today, not what it was intended to do a year ago, integrating direct with dotnet test (Expecto) and fantomas.

How Atlas ensures F# documentation reflects current code

Atlas ensures F# documentation accuracy in 2026 by directly reading your source code, not relying on outdated comments or memory. It uses the lsp tool's documentSymbol operation to enumerate every public API from your .fsproj files, guaranteeing 100% coverage of exported surfaces. This approach means your READMEs always describe the code as it exists today.

Atlas addresses the common problem of stale documentation by generating READMEs directly from the current F# codebase. Instead of guessing or recalling past intentions, Atlas employs its lsp tool to perform a documentSymbol operation, which precisely lists all public declarations within your F# modules. This process is crucial for F# projects because it respects the file order defined in your .fsproj file, ensuring that all types, modules, and functions are correctly identified and documented. For each identified symbol, Atlas uses its read tool to inspect the implementation details and codebase_search to find real-world usage examples across your repository. This combination allows Atlas to describe not just what a function is, but how it is actually used by other parts of your F# application, providing a more practical and relevant documentation experience. The resulting documentation is traceable back to specific lines of code, making it highly reliable and verifiable.

What F# files and commands Atlas uses to document modules

Atlas interacts with your F# project using specific files and commands to generate accurate documentation. It starts by parsing your .fsproj file to understand the compilation order and module structure, a critical step for F#. Atlas then employs dotnet test (Expecto) to verify code samples and fantomas to format any F# code it generates, ensuring consistency with your existing codebase in 2026.

To document an F# module, Atlas first establishes context by reading the .fsproj file. This is fundamental for F# as the order of files within this project file dictates compilation and module visibility. Atlas then uses the lsp tool to query the F# language server, enumerating public API symbols from your .fs source files. For each identified symbol, the read tool extracts its implementation, while codebase_search scans the repository for practical usage examples, often found in other .fs files or even test files within your Tests.fsproj. When drafting the README, Atlas uses the write tool to emit content, including F# code snippets. These snippets are then rigorously verified using the bash tool, which executes them with dotnet fsi or compiles them as part of a test project using dotnet test (Expecto). Finally, any F# code Atlas introduces or modifies is automatically formatted with fantomas, maintaining your project's coding standards. This ensures that the documentation not only describes the code but also provides runnable, correctly formatted examples.

How Atlas ensures safe F# documentation generation and review

Atlas incorporates multiple safety and review mechanisms when generating F# documentation, ensuring you maintain full control over changes. Every Atlas tool call, including lsp and write, is permission-gated, requiring explicit allow, ask, or deny rules. Before any file is written, Atlas computes a unified diff and presents it for your approval, preventing unintended modifications to your F# project in 2026.

Atlas prioritizes safety and developer control throughout the documentation generation process for F# projects. Before any tool, such as lsp for API enumeration or write for README creation, is executed, Atlas checks against predefined permission rules. This means you can configure Atlas to ask for confirmation before it performs actions like reading sensitive F# files or executing dotnet test (Expecto). Furthermore, Atlas operates with a read-only plan agent initially, drafting its strategy before switching to a build agent, which also requires your explicit permission. Crucially, when Atlas proposes changes to your README.md or any F# source files, it generates a unified diff. This diff is presented to you for review and approval, allowing you to inspect every proposed change line-by-line before it is committed. Atlas also snapshots file changes as git patches, providing an additional layer of rollback capability if any edits need to be reverted. This comprehensive review process ensures that the generated F# documentation aligns perfectly with your expectations and project standards.

Integrating Atlas into your F# development workflow

Integrating Atlas into your F# development workflow streamlines documentation tasks, allowing you to focus on coding. Atlas understands F# idioms like discriminated unions and computation expressions, and can even suggest replacing null checks with Option pipelines. It runs dotnet test (Expecto) behind a permission prompt and applies fantomas to changed .fs files, ensuring your codebase remains consistent in 2026.

Atlas is designed to be a native extension of your F# development environment. When you run Atlas in a solution containing an .fsproj file, it automatically maps your F# project structure, including discriminated unions, modules, and any Giraffe or Fable entry points. This deep understanding allows Atlas to generate highly relevant and idiomatic F# code and documentation. For instance, Atlas can be asked to refactor code, such as replacing a traditional null check with a more functional Option pipeline, or to add new Expecto tests to your test project. After making changes, Atlas can run dotnet test (Expecto) to verify functionality, always behind a permission prompt, and then review the diff before committing. To maintain code quality and consistency, Atlas will also run fantomas over any changed .fs files, ensuring that all new or modified F# code adheres to your project's formatting standards. This integration means documentation is not an afterthought but an organic part of your F# development cycle.

How Atlas verifies F# code samples in documentation

Atlas rigorously verifies every F# code sample included in your documentation, ensuring they are runnable and accurate. It uses the bash tool to execute these snippets, either directly with dotnet fsi or by integrating them into a temporary F# project for compilation and dotnet test (Expecto) execution. This process guarantees that your READMEs contain 100% verifiable F# code, preventing broken examples in 2026.

A key differentiator for Atlas is its commitment to verifiable documentation, especially for F# code samples. When Atlas generates a README, any F# code block it includes is not merely copied; it is actively tested. The bash tool is employed to execute these code samples. For simple snippets, Atlas might invoke dotnet fsi to run them interactively and capture the output. For more complex examples, especially those demonstrating API usage, Atlas can integrate the sample into a temporary F# project or an existing test project. It then compiles and runs these examples using dotnet build and dotnet test (Expecto). This ensures that the F# code not only compiles but also behaves as described, providing confidence that readers can copy and paste the examples directly into their own F# projects and expect them to work. This proactive verification eliminates the common problem of outdated or incorrect code samples, making your F# documentation a reliable resource.

Step by step

  1. 01Run Atlas in your F# solution directory containing an .fsproj file to initialize its understanding of your project structure.
  2. 02Instruct Atlas to document a specific F# module; Atlas will use the lsp tool's documentSymbol operation to enumerate its public API from your .fs files.
  3. 03Atlas will then use the read tool to inspect the implementation of each F# export and codebase_search to find real-world usage examples within your F# codebase.
  4. 04Atlas will grep your repository for an existing README.md to match its heading structure and tone, ensuring consistency for your F# project.
  5. 05Atlas drafts the new README.md using the write tool, quoting real F# signatures and file paths, then presents a unified diff for your approval.
  6. 06Atlas verifies every F# code sample in the drafted README.md by running it with the bash tool, potentially using dotnet fsi or dotnet test (Expecto), to ensure accuracy.
  7. 07Review the proposed README.md changes and approve the write operation; Atlas will then apply fantomas to any F# code it modified or generated.

Frequently asked questions

How does Atlas ensure F# documentation is up-to-date?
Atlas generates F# documentation by directly reading your current .fs source files and .fsproj structure, using the lsp tool to enumerate public APIs and read to understand their implementation, ensuring the documentation always reflects the code as it exists today.
Can Atlas verify F# code examples in the README?
Yes, Atlas rigorously verifies every F# code sample in the documentation. It uses the bash tool to execute these snippets, either directly with dotnet fsi or by running them as part of a test project with dotnet test (Expecto), guaranteeing their accuracy.
How does Atlas handle F# specific constructs like discriminated unions?
Atlas is paired with F# and understands its specific constructs, including discriminated unions, modules, and computation expressions. It reads your .fsproj to respect file order and can even suggest idiomatic F# refactorings like Option pipelines.
What F# tools does Atlas integrate with for documentation?
Atlas integrates deeply with the F# toolchain. It uses dotnet test (Expecto) for verifying code, NuGet (dotnet add package) for dependency management context, and fantomas for formatting any F# code it generates or modifies.
Is it safe to let Atlas modify my F# project's README?
Yes, Atlas prioritizes safety. Every write operation, including modifying your README.md, is permission-gated. Atlas presents a unified diff of all proposed changes for your review and explicit approval before writing any files to your F# project.
How does Atlas find existing F# documentation style?
Atlas uses the grep tool to search your repository for an existing README.md or similar documentation files. This allows it to analyze the current heading structure, tone, and formatting, ensuring the new F# module documentation matches your project's established style.
Can Atlas help add Expecto tests to my F# project?
Yes, Atlas can assist with F# testing. You can ask Atlas to add Expecto tests to your test project. It will then run dotnet test (Expecto) behind a permission prompt and present a diff for your review before committing the changes.

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.

Atlas for F#: A Terminal-Native AI Coding Agent for .fsproj Solutions in 2026

Atlas is a terminal-native AI coding agent for F# in 2026. It respects .fsproj file order, maps discriminated unions, runs dotnet test behind a prompt, and runs Fantomas.

Audit an F# Repository with Parallel Subagents in Atlas in 2026

Audit F# repositories in 2026 with Atlas's parallel subagents. Sweep code for problems using `dotnet test (Expecto)` and `fantomas` without blowing your main session's context window.

Self-review your working diff before committing in F# with Atlas in 2026

Catch F# coding mistakes before CI. Atlas helps F# developers in 2026 self-review uncommitted diffs, run `dotnet test (Expecto)`, and apply `fantomas` formatting, all from your terminal.

Refactor a legacy F# module with Atlas in 2026

Safely refactor legacy F# modules using Atlas, the terminal-native AI coding agent. Pin behavior with `dotnet test (Expecto)`, apply changes, and ensure F# code quality with `fantomas`.

Write unit tests for untested code in F# with Atlas in 2026

In 2026, Atlas helps F# developers add unit tests to existing modules, respecting .fsproj file order and using dotnet test (Expecto) and Fantomas.

Trace a runtime bug from a stack trace in F# with Atlas in 2026

In 2026, F# developers can use Atlas to trace runtime bugs from production stack traces directly to the responsible line of code and apply a fix, all without attaching a debugger. Atlas integrates with your F#

Migrate a deprecated API across every callsite in F# with Atlas in 2026

Efficiently migrate deprecated F# APIs across your entire codebase in 2026 using Atlas. Leverage dotnet test (Expecto), NuGet, and fantomas for a verified, complete transition.

Browse this resource hub