Stacks

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

Updated 6 min read

In 2026, Fortran developers can use Atlas to meticulously plan multi-file code changes, ensuring design approval before any modifications. Atlas integrates directly with your `fpm.toml` project, allowing you to research your codebase with tools like `lsp` and `codebase_search` while keeping all edit permissions locked, preventing accidental changes to your Fortran modules or `test-drive` unit tests. This workflow ensures a robust design phase, leveraging Atlas's plan agent to draft a comprehensive strategy.

How does Atlas help plan multi-file Fortran changes?

Atlas, the terminal-native AI coding agent, helps Fortran developers in 2026 plan multi-file changes by providing a dedicated plan agent that disallows all edit tools, ensuring research and design cannot accidentally turn into an edit of your Fortran source files.

The Atlas plan agent is specifically designed for the initial design phase of complex Fortran projects. When you switch to this agent, its permission set denies edit access for every path except a designated plan markdown file, typically located under `.atlas/plans/*.md`. This strict read-only environment for your Fortran codebase means you can safely use Atlas's `codebase_search` to find relevant Fortran modules, `grep` to locate specific patterns in legacy FIXED-form numerics, `read` to inspect source files, and the `lsp` tool to understand explicit interfaces and intent declarations on dummy arguments. This comprehensive research capability allows you to fully grasp the implications of a multi-file change across your Fortran project, from `fpm.toml` configurations to coarray implementations, all without the risk of unintended modifications.

What Fortran tools does Atlas use for planning?

Atlas integrates with the Fortran toolchain, allowing developers to leverage familiar components like `fpm` and `gfortran` diagnostics during the planning phase in 2026, ensuring a deep understanding of the codebase before any modifications are proposed.

During the planning phase, Atlas uses its `lsp` tool to parse and understand your Fortran codebase, including modules, explicit interfaces, and intent declarations on every dummy argument. This deep understanding is crucial for designing changes that touch many files, as Atlas can accurately identify dependencies and potential impacts. While in plan mode, Atlas respects your `fpm.toml` project structure, allowing it to navigate your source files and existing `test-drive` unit tests under the `test/` directory. Although the plan agent disallows running `fpm test` or `fprettify` directly on your Fortran code, it uses the structural information provided by these tools and the `lsp` to inform its research and planning. This ensures that the proposed plan is grounded in the realities of your Fortran project's setup and conventions, preparing for eventual implementation where `gfortran` diagnostics and `fpm test` will be critical.

How does Atlas ensure safe Fortran design review?

Atlas ensures safe Fortran design review by enforcing a strict permission model in its plan agent, which denies edit access to all Fortran source files and only permits writing to a dedicated plan markdown file, preventing unintended modifications in 2026.

The core safety mechanism in Atlas's planning workflow for Fortran is its permission-gated system. In plan mode, Atlas's permissions explicitly deny any edit operations on your Fortran source files, `fpm.toml`, or `test/` directory. The only allowed write operation is to the plan markdown file, which serves as the central document for your multi-file change design. This means you can draft a detailed plan, outlining changes to Fortran modules, interfaces, and even new `test-drive` unit tests, without ever touching the actual code. Once the plan is complete, you call the `plan_exit` tool. Atlas then asks, 'Plan at <path> is complete. Would you like to switch to the build agent and start implementing?' This explicit prompt allows you and your team to review the comprehensive markdown plan for your Fortran changes. Answering 'No' keeps you in plan mode to refine the design, while 'Yes' transitions to the build agent, where actual Fortran code modifications, unified diffs, and `fpm test` runs will eventually occur, all under your approval.

Step by step

  1. 01Initialize Atlas in your Fortran project, ensuring an `fpm.toml` file is present for project context.
  2. 02Switch Atlas to the plan agent to activate its read-only permissions for all Fortran source files and `test/` directories.
  3. 03Utilize Atlas's `codebase_search`, `grep`, `read`, and `lsp` tools to research existing Fortran modules, explicit interfaces, and coarrays.
  4. 04Draft your multi-file Fortran change plan into the allowed markdown file, typically `.atlas/plans/*.md`, detailing proposed modifications.
  5. 05Review the generated plan markdown with your team to ensure the Fortran design meets all requirements before any code is touched.
  6. 06Call the `plan_exit` tool within Atlas to signal the completion of your Fortran design plan.
  7. 07Approve the prompt to switch to the build agent, preparing Atlas to begin implementing the Fortran changes, where `fpm test (test-drive)` and `fprettify` will be used.
  8. 08If the plan needs refinement, answer 'No' to the `plan_exit` prompt to remain in the plan agent and continue iterating on your Fortran design.

Frequently asked questions

Can Atlas prevent me from accidentally changing Fortran code during planning?
Yes, Atlas's plan agent is specifically designed to prevent accidental edits. It denies write permissions to all Fortran source files, `fpm.toml`, and `test/` directories, allowing you to only write to a dedicated plan markdown file. This ensures your Fortran codebase remains untouched during the design phase.
How does Atlas understand my Fortran modules and interfaces?
Atlas uses its `lsp` tool to build an index of your Fortran codebase by AST declarations, leveraging tree-sitter. This allows it to understand your modules, explicit interfaces, and intent declarations on every dummy argument, providing deep context for planning multi-file changes.
What Fortran tools does Atlas use for planning multi-file changes?
During planning, Atlas uses its `lsp` tool for code understanding, `codebase_search` for semantic retrieval, `grep` for keyword search, and `read` for file inspection. While it respects your `fpm.toml` project structure, actual execution of `fpm test (test-drive)` or `fprettify` is reserved for the build agent after plan approval.
Can I review a Fortran change plan before any code is written?
Absolutely. Atlas's workflow is built around this. You write your entire multi-file Fortran change plan into a markdown file. The `plan_exit` tool then prompts you to review this plan before switching to the build agent, ensuring design approval before any Fortran code is modified.
Does Atlas support modern Fortran features like coarrays?
Yes, Atlas is designed to work with modern Fortran, from legacy FIXED-form numerics to modules, interfaces, and coarrays. Its `lsp` tool and AST indexing capabilities allow it to understand and work through these advanced Fortran features within your `fpm.toml` project.
How does Atlas handle `fpm.toml` projects?
Atlas reads your `fpm.toml` file to understand your Fortran project's structure and dependencies. This integration allows Atlas to accurately search, read, and analyze your Fortran modules and `test-drive` unit tests, providing a comprehensive context for planning multi-file changes.
What happens if I reject the plan after calling `plan_exit`?
If you call `plan_exit` and answer 'No' to the prompt 'Plan at <path> is complete. Would you like to switch to the build agent and start implementing?', Atlas raises a `Question.RejectedError`. This keeps you in the plan agent, allowing you to continue refining your Fortran design plan in the markdown file.

Try Atlas in your terminal

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

Install Atlas

Related guides

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

How to plan a multi-file change with Atlas in 2026: the plan agent denies all edit tools, you research with codebase_search and lsp, then plan_exit hands off.

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.

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.

Upgrade a Fortran Dependency and Fix Breakage with Atlas in 2026

Fortran developers in 2026 can use Atlas to upgrade dependencies, resolve compile errors, and fix test failures. Learn how Atlas integrates with fpm, gfortran, and fprettify for efficient migrations.

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.

Run the Fortran Test Suite and Triage Failures with Atlas in 2026

In 2026, Fortran developers use Atlas to run fpm test suites, triage failures into distinct root causes, and track fixes. Streamline your Fortran debugging workflow.

Audit a Fortran Repo with Parallel Subagents in 2026

Sweep your Fortran codebase for problems without context window limits. Atlas uses parallel subagents to audit fpm projects, leveraging fprettify and fpm test for comprehensive review in 2026.

Onboard to an Unfamiliar Fortran Codebase in 2026 with Atlas

Quickly build a working mental model of any Fortran repository using Atlas. Leverage semantic search, `fpm` package layouts, and `fprettify` formatting for rapid understanding and safe code exploration in 2026.

Browse this resource hub