Languages

Atlas for Fortran: fpm.toml, Explicit Interfaces, and fprettify in 2026

Updated 6 min read

Atlas is a terminal-native AI coding agent for Fortran in 2026, spanning modern Fortran from legacy FIXED-form numerics to modules, interfaces, and coarrays under the Fortran Package Manager. Atlas runs in a project with an fpm.toml, and it reads your modules, your explicit interfaces, and the intent declarations on every dummy argument. Atlas can move a common block into a module, add test-drive unit tests under test/, run fpm test behind a permission prompt while iterating on gfortran diagnostics, and run fprettify over the changed sources before you approve the diff.

Why Fortran programmers use Atlas

Fortran programmers use Atlas in 2026 because most Fortran repositories are two repositories in a trench coat: legacy FIXED-form sources beside modern module-based Fortran. Atlas reads your modules, explicit interfaces, and the intent declarations on every dummy argument.

Fortran keeps its load-bearing facts in declarations, not in the body of a subroutine. Whether a dummy argument is intent(in), intent(out), or intent(inout) decides whether a call can be reordered. Whether a procedure has an explicit interface decides whether gfortran checks argument shapes at all, and an implicit interface is a standing invitation to pass a rank-2 array where a rank-1 was expected and get silence instead of an error. Because Atlas indexes by AST declarations rather than blind line windows, a search resolves to the subroutine and the dummy arguments it declares. Asking which procedures mutate an array returns the ones declared intent(inout), not every source file naming that array in a comment above a loop.

Moving a common block into a module

Ask Atlas to move a common block into a module, the single highest-value edit available in legacy Fortran in 2026. A common block is shared storage with no type checking and no visibility control, and Atlas plans the migration before touching a source file.

Turning a common block into a module with explicit public and private declarations gives the compiler something to check and gives a reader something to trust. The difficulty is reach. Twenty subroutines may reference that block, each now needing a use statement, ideally with an only clause so the module does not simply become a new global namespace with better manners. Atlas drafts the whole migration in a read-only plan agent first: which module absorbs the block, which callers gain a use statement, which dummy arguments finally receive intent declarations. Subagents run in the foreground or in parallel background sessions, so twenty call sites migrate in one reviewed pass.

fpm test, test-drive, and gfortran diagnostics

Atlas runs fpm test behind a permission prompt and iterates on gfortran diagnostics. Every Atlas tool call is permission-gated against 3 rules, allow, ask, and deny, so a Fortran project allows fpm test and asks before anything rewrites fpm.toml.

gfortran is precise about exactly the errors Fortran gets wrong: rank mismatches, shape conformance failures, an argument that disagrees with the explicit interface it was passed to. Atlas runs fpm test, reads those diagnostics, and revises, instead of handing a person a wall of compiler output. Adding test-drive unit tests under test/ is what makes the loop mean anything, since a subroutine with no test has no definition of correct and a refactor cannot be verified against one. The permission split is deliberate: allow fpm test freely, ask before fpm.toml changes, because pinning or bumping a dependency is a reproducibility decision that outlives the change.

fprettify on the changed sources, not the whole file

Have Atlas run fprettify over the changed sources before you approve the diff. Fortran maintained since the 1980s carries every indentation fashion anyone ever tried, and reformatting a whole file would bury the actual edit under realigned continuation lines.

Running fprettify over the changed sources alone keeps a Fortran diff legible. What remains visible is the part worth reading: a new intent(in) on a dummy argument, a use statement gaining an only clause, a coarray image index, a loop bound that moved by one. Every edit is surfaced as a unified diff for approval before writing, which is not ceremony in Fortran, because a modernization pass that changes association or the order of operations can move a result in the last decimal place while every test still passes. File changes are snapshotted as git patches, so a refactor that shifted a result by a rounding bit is reverted rather than excavated.

Running Atlas where the Fortran already lives

Atlas is a terminal-native TUI rendered with SolidJS through the OpenTUI renderer, so in 2026 it runs in the same shell as fpm build and gfortran. Atlas can build its code index with local Ollama embeddings, keeping code off third-party servers.

Fortran usually lives on a machine you reach through a terminal and nowhere else, which rules out tooling that expects a desktop window. Because Atlas is a terminal-native TUI, it runs in the session where fpm build already runs, with nothing to forward. Local Ollama embeddings build the index over your modules and legacy FIXED-form sources on hardware you control, so source that cannot leave the institution does not. Switching the active model and provider on the fly with favorites and recents keeps an fprettify cleanup and a question about coarray synchronization from sharing one model, and once fpm test is green, git branches, status, and diffs are read directly so the commit can be staged for you.

Getting started

  1. 01Run atlas in a project with an fpm.toml
  2. 02Let Atlas read your modules, explicit interfaces, and intent declarations on every dummy argument
  3. 03Ask Atlas to move a common block into a module or add test-drive unit tests under test/
  4. 04Let Atlas run fpm test behind a permission prompt and iterate on gfortran diagnostics
  5. 05Review the unified diff for changed intent declarations before approving
  6. 06Have Atlas run fprettify over the changed sources before you approve the diff

Frequently asked questions

does atlas work with fortran and fpm
Yes. Atlas runs in a project with an fpm.toml, reads your modules and explicit interfaces, and runs fpm test behind a permission prompt.
can an ai coding agent modernize legacy fortran
Ask Atlas to move a common block into a module. Atlas reads legacy FIXED-form sources alongside modern modules and shows the migration as a unified diff first.
does atlas understand intent(in) and intent(inout) in fortran
Atlas reads the intent declarations on every dummy argument along with your explicit interfaces, so a proposal respects which arguments a procedure may mutate.
how do i add test-drive unit tests to fortran with an ai agent
Ask Atlas to add test-drive unit tests under test/, then let it run fpm test behind a permission prompt and iterate on the gfortran diagnostics.
does atlas run fprettify on fortran source
Yes. Atlas runs fprettify over the changed sources before you approve the diff, so a legacy file is not reformatted end to end.
can an ai coding agent run in a terminal only environment
Atlas is a terminal-native TUI rendered with SolidJS through the OpenTUI renderer, so it runs in the same shell session as fpm build and gfortran.
is atlas safe for fortran source that cannot leave the building
Atlas can build its code index with local Ollama embeddings, keeping code off third-party servers, so the index is built on hardware you control.

Try Atlas in your terminal

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

Install Atlas

Related guides

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

Fortran developers in 2026 can use Atlas to diagnose hanging or slow fpm builds and scripts. Identify if commands are blocked on input or genuinely slow, and get them unstuck efficiently.

Extract a Shared Helper from Duplicated Fortran Code with Atlas in 2026

Refactor your Fortran codebase in 2026 by extracting shared helpers from duplicated logic. Atlas uses semantic search to find copies and automates the creation of new modules and replacement of calls, all while

Trace a runtime bug from a stack trace in Fortran with Atlas in 2026

Pinpoint Fortran runtime bugs from production stack traces using Atlas in 2026. Leverage fpm and gfortran diagnostics to quickly identify and fix issues without a debugger attached.

Run Atlas Headless in CI for Fortran in 2026

Fortran developers in 2026 can run Atlas headless in CI pipelines to automate tasks, integrate with fpm, and get machine-readable output for robust automation.

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.

Plan a Multi-File Change in Fortran with Atlas Before Editing in 2026

Design and review complex Fortran code changes across multiple files using Atlas in 2026. Plan safely with fpm, fprettify, and gfortran integration before modifying a single line.

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.

Browse this resource hub