Atlas helps Fortran developers in 2026 rapidly build a working mental model of unfamiliar codebases by starting from meaning, not just filenames. It integrates directly with your Fortran Package Manager (`fpm`) projects, allowing you to explore modules, interfaces, and `test-drive` unit tests with precision, all while respecting your existing `fprettify` formatting and ensuring every action is permission-gated.
How does Atlas understand Fortran code structure and dependencies?
Atlas builds a deep understanding of Fortran code structure by indexing AST declarations, not blind line windows. This allows it to precisely map modules, explicit interfaces, and coarrays within your `fpm.toml` project, providing a 2026 developer with an accurate mental model from the first query, even for complex dependencies.
Atlas uses advanced AST (Abstract Syntax Tree) declarations, powered by tree-sitter, to index your Fortran codebase. This means it understands the actual structure of your `MODULE`s, `INTERFACE` blocks, and `INTENT` declarations on dummy arguments, rather than just scanning lines of text. When you ask `codebase_search` a question like 'how requests are authenticated', Atlas queries this semantic index, returning highly relevant Fortran snippets and file paths. It can identify where a `USE` statement originates and where a `MODULE` is defined, providing a precise map of your Fortran project's internal dependencies, whether it's a modern `fpm` project or a legacy system.
How do I explore an unfamiliar Fortran repository with Atlas?
Exploring an unfamiliar Fortran repository with Atlas begins by querying its semantic index, then mapping the directory shape. You can ask 'how requests are authenticated' and Atlas will return ranked snippets, often pointing to key `module` files, allowing you to focus on the 2 or 3 most relevant files first, saving significant time in 2026.
The onboarding workflow with Atlas is designed for efficiency. First, use `codebase_search` with a plain-language question to find relevant Fortran code snippets. For instance, `atlas codebase_search "how are database connections managed?"` might point you to a `database_module.f90` file. Next, run `glob` on the top-level directories to quickly grasp the `fpm` package layout and naming conventions, such as the common `src/` and `test/` directories. Then, `read` the two or three Fortran files `codebase_search` ranked highest. From there, use the `lsp` tool's `goToDefinition` operation to follow `USE` statements and explore related `MODULE`s or `INTERFACE`s. For wider sweeps, delegate to the `explore` subagent via the `task` tool; it's permissioned read-only, ensuring it cannot alter your Fortran codebase while it looks around.
How does Atlas ensure safe Fortran code exploration and changes?
Atlas prioritizes safety and control when working with Fortran code, ensuring every action is permission-gated. Before any tool call, like running `fpm test` or applying `fprettify`, Atlas asks for your explicit approval, providing a unified diff for review in 2026, giving you complete oversight of proposed changes.
Safety is built into Atlas's core. Every Atlas tool call, whether it's `read`, `bash`, or `lsp`, is permission-gated against allow, ask, and deny rules. This means Atlas will always prompt you before executing commands like `fpm test` to run your `test-drive` unit tests or `fprettify` to format your Fortran sources. Atlas drafts a plan in a read-only plan agent first, asking for your approval before switching to a build agent that can make changes. For every file edit, Atlas computes a unified diff and surfaces it for your approval before writing. Furthermore, Atlas snapshots file changes as git patches, so any edits it proposes to your Fortran files can be easily diffed and rolled back, providing a robust safety net for your codebase.
Can Atlas help me add Fortran unit tests or refactor common blocks?
Yes, Atlas can assist with specific Fortran development tasks, such as adding `test-drive` unit tests under the `test/` directory or refactoring `COMMON` blocks into modern `MODULE`s. It can even run `fpm test` behind a permission prompt and iterate on `gfortran` diagnostics, streamlining your workflow in 2026.
Atlas is not just for exploration; it's a powerful assistant for Fortran development. You can ask Atlas to move a legacy `COMMON` block into a modern `MODULE` or to add `test-drive` unit tests for a specific subroutine under the `test/` directory. Atlas can then run `fpm test` to execute these tests, prompting you for permission first, and help you iterate on any `gfortran` diagnostics that arise. Once changes are made, you can have Atlas run `fprettify` over the changed Fortran sources. It will then present a unified diff of the formatted code for your approval, ensuring your codebase remains consistent with your team's formatting standards before you approve the final commit.
Step by step
- 01Start Atlas in your Fortran project, ensuring an `fpm.toml` file is present for package management.
- 02Use `atlas codebase_search "how are requests authenticated?"` to semantically query your Fortran codebase and identify relevant `MODULE`s or subroutines.
- 03Run `atlas glob` on the top-level directories to quickly understand the `fpm` package layout and common Fortran file naming conventions.
- 04Execute `atlas read <file_path>` on the 2-3 highest-ranked Fortran source files, then use `atlas lsp goToDefinition` to follow `USE` statements and explore related `MODULE`s.
- 05Delegate wider exploration to the read-only `explore` subagent with `atlas task "explore the test/ directory for fpm test examples and common block usage"`.
- 06Record open questions, findings, and future tasks as a `todowrite` list, for example: `atlas todowrite "Investigate module_x's dependency on external_library.f90"`.
- 07Ask Atlas to add `test-drive` unit tests for a specific Fortran `SUBROUTINE` under the `test/` directory, then approve `fpm test` execution.
- 08Have Atlas run `fprettify` over any changed Fortran sources and review the unified diff before approving the write operation.
Frequently asked questions
- How does Atlas handle Fortran `MODULE` dependencies and `USE` statements?
- Atlas uses AST indexing to understand `MODULE` declarations and `USE` statements, allowing it to accurately map dependencies and navigate your Fortran codebase. It can trace where a module is defined and where it is used, providing a clear picture of your project's structure.
- Can Atlas run `fpm test` for my Fortran `test-drive` unit tests?
- Yes, Atlas can run `fpm test` for your `test-drive` unit tests, but only after you approve the permission prompt. It can also help you iterate on `gfortran` diagnostics, streamlining the testing and debugging process for your Fortran code.
- Does Atlas support `fprettify` for Fortran code formatting?
- Absolutely. Atlas can run `fprettify` over changed Fortran sources. It will present a unified diff of the formatted code for your approval before writing any changes, ensuring your Fortran codebase adheres to your preferred style.
- How does Atlas ensure my Fortran code isn't sent to third-party servers?
- Atlas can build its code index with local Ollama embeddings, ensuring your Fortran source code remains entirely on your machine. This keeps your proprietary Fortran code off third-party servers, maintaining data privacy and security.
- What if I want to roll back changes Atlas made to my Fortran files?
- Atlas snapshots file changes as git patches. This means any edits it proposes to your Fortran files can be easily diffed, reviewed, and rolled back if needed, providing a robust mechanism for managing and undoing changes.
- Can Atlas help me understand legacy FIXED-form Fortran code?
- Yes, Atlas is designed to work with modern Fortran, from legacy FIXED-form numerics to modules, interfaces, and coarrays under the Fortran Package Manager. It can provide context and assist in understanding various Fortran styles, including older codebases.
- How does Atlas handle `gfortran` compiler diagnostics for Fortran code?
- Atlas can run `fpm test` and process `gfortran` diagnostics. It can help you understand and iterate on compiler errors or warnings, guiding you through the process of resolving issues in your Fortran source code.
Try Atlas in your terminal
The terminal-native AI coding agent. Free core, single binary.
Install AtlasRelated guides
Onboard to an Unfamiliar Codebase with Atlas in 2026
How to onboard to an unfamiliar codebase with Atlas in 2026: use codebase_search, glob, read, lsp, task, and todowrite to build a mental model fast.
Atlas for Fortran: fpm.toml, Explicit Interfaces, and fprettify in 2026
Atlas is a terminal-native AI coding agent for Fortran in 2026. It reads modules, explicit interfaces, and intent declarations, runs fpm test behind a prompt, and runs fprettify.
Research a third-party API before integrating it in Fortran with Atlas in 2026
Fortran developers in 2026 can research third-party APIs efficiently with Atlas. Use `websearch` and `webfetch` for current docs, then integrate with confidence, verifying against `fpm` project conventions.
Add a Regression Test for a Fortran Bug Fix with Atlas in 2026
Fortran developers in 2026 use Atlas to add regression tests for bug fixes. Leverage fpm test (test-drive) to confirm failures and passes, ensuring robust code quality.
Locate where a behavior is implemented in Fortran with Atlas in 2026
Fortran developers in 2026 can use Atlas to pinpoint exact code implementations. Leverage semantic search, grep, and LSP tools to navigate modules, interfaces, and fpm projects, ensuring precise code discovery and
Automate GitHub Issue and Pull Request Triage in Fortran with Atlas in 2026
Automate GitHub issue and pull request triage for Fortran projects using Atlas. Safely respond to PRs and issues, run `fpm test`, and format with `fprettify` for trusted users in 2026, ensuring code quality and security.
Review a Fortran Pull Request with Atlas in 2026
Streamline Fortran pull request reviews in 2026 with Atlas. Leverage `fpm`, `fprettify`, and `gfortran` diagnostics to catch subtle bugs and ensure robust code quality.
Write Unit Tests for Untested Code in Fortran with Atlas in 2026
Boost your Fortran codebase in 2026 by adding robust unit tests with Atlas. Learn to use fpm test and fprettify to ensure code quality and maintainability.