Atlas empowers MATLAB developers in 2026 to design multi-file changes and secure review approval before any code is modified, leveraging a dedicated plan agent that disallows edits to `.m` files while permitting extensive research. This ensures that proposed architectural shifts or refactorings, which might impact `matlab.unittest (runtests)` or require `MATLAB Format Code` adjustments, are fully vetted and documented upfront.
How Atlas plans multi-file MATLAB changes without editing
In 2026, Atlas's plan agent provides a read-only environment specifically designed for MATLAB developers to strategize multi-file changes without the risk of accidental modifications. This agent's permission set explicitly denies edit access for all paths except a designated plan markdown file, ensuring research and design remain distinct from implementation.
Atlas's core capability for planning multi-file changes in MATLAB revolves around its 'plan' agent, which operates in a strictly read-only mode for your codebase. When you switch to the plan agent, its permissions are configured to deny all edit tools for every file path, with the sole exception of a markdown file located under `.atlas/plans/*.md`. This architectural decision ensures that a MATLAB developer can thoroughly research, analyze, and design a complex change affecting numerous `.m` function files, `classdef` blocks, or `matlab.unittest.TestCase` subclasses without inadvertently altering any production code. The agent's description explicitly states 'Plan mode. Disallows all edit tools,' providing a secure sandbox for high-level design before committing to any implementation details. This separation is crucial for large-scale refactorings or new feature designs that might touch many parts of a MATLAB project, allowing for a comprehensive review of the proposed changes before a single line of code is modified or `MATLAB Format Code` is applied.
Researching MATLAB code with Atlas's plan agent
The Atlas plan agent in 2026 offers powerful research tools like `codebase_search`, `grep`, `read`, and `lsp`, all fully enabled for MATLAB codebases. These tools allow developers to deeply understand existing `classdef` blocks, function signatures, and `matlab.unittest` test structures without altering any `.m` files.
Within the Atlas plan agent, MATLAB developers gain access to a suite of powerful research tools that remain fully functional and permission-allowed. The `codebase_search` tool, for instance, leverages hybrid semantic and keyword retrieval fused by reciprocal rank fusion to quickly locate relevant MATLAB code snippets, function definitions, or `classdef` implementations across your project. Atlas indexes code by AST declarations using tree-sitter, not blind line windows, providing a precise understanding of MATLAB's syntax and structure, including `function` headers, `classdef` properties, and `events` blocks. For privacy-conscious teams, Atlas can build its code index with local Ollama embeddings, keeping sensitive MATLAB code off third-party servers. Additionally, `grep` allows for traditional text-based searches, `read` provides direct file content access, and the `lsp` tool offers language server protocol capabilities, enabling detailed inspection of MATLAB function signatures, variable usages, and class hierarchies. These tools collectively empower a MATLAB developer to gather all necessary context and identify all affected `.m` files, `buildfile.m` scripts, or `matlab.unittest` test files, forming a solid foundation for their multi-file change plan.
Documenting your MATLAB change plan in a dedicated file
Atlas's plan agent in 2026 ensures that your multi-file MATLAB change design is meticulously documented within a specific markdown file, typically located under `.atlas/plans/*.md`. This is the single path where the plan agent has write permissions, guaranteeing that your research culminates in a concrete, reviewable plan.
After conducting thorough research using Atlas's `codebase_search`, `grep`, `read`, and `lsp` tools on your MATLAB project, the next step is to document the proposed multi-file change. The Atlas plan agent is uniquely configured to allow writing only to a markdown file within the `.atlas/plans/` directory. This constraint is a fundamental safety feature, preventing any accidental modifications to your `.m` files, `buildfile.m`, or `matlab.unittest` test suites during the planning phase. The developer writes the detailed plan, outlining the architectural changes, affected MATLAB functions, new `classdef` structures, and any anticipated impacts on `matlab.unittest (runtests)` or `MATLAB Add-On Manager (mpm)` dependencies. This markdown document serves as the definitive blueprint for the change, ready for review by team members. Once the plan is complete and documented, the `plan_exit` tool is used to signal readiness, prompting Atlas to ask for confirmation before transitioning to the implementation phase.
Safe transition from MATLAB plan to implementation
Upon completion of a multi-file MATLAB change plan, the `plan_exit` tool in Atlas provides a permission-gated transition to the build agent in 2026. This critical step ensures that the documented design is approved before any actual code modifications begin, maintaining a clear separation between planning and execution.
When a MATLAB developer has finalized their multi-file change plan within the `.atlas/plans/*.md` file, they invoke the `plan_exit` tool. This tool initiates a crucial safety check, presenting a prompt: 'Plan at <path> is complete. Would you like to switch to the build agent and start implementing?' Answering 'Yes' signals approval to proceed, allowing Atlas to hand off the context to the 'build' agent, which possesses the necessary permissions to modify `.m` files and interact with the MATLAB toolchain. Answering 'No' raises a `Question.RejectedError`, keeping the developer in the plan agent to refine the design further. This explicit approval step is vital for ensuring that the entire team has reviewed and agreed upon the proposed changes before any implementation work begins. Once in the build agent, Atlas computes a unified diff for every file edit, including those resulting from applying `MATLAB Format Code` conventions, and surfaces it for approval before writing to disk. This layered approval process, from plan completion to individual file edits, provides robust control over the entire multi-file change workflow in MATLAB.
Step by step
- 01Initialize Atlas in your MATLAB project directory containing `.m` files and `buildfile.m`.
- 02Switch to the Atlas plan agent to enter read-only mode for your MATLAB codebase.
- 03Research your MATLAB code using Atlas tools: `codebase_search` for semantic queries, `grep` for text patterns, `read` for file content, and `lsp` for function signatures and `classdef` structures.
- 04Document your multi-file MATLAB change plan in a markdown file, for example, `.atlas/plans/refactor_matrix_ops.md`, which is the only path the plan agent can write to.
- 05Call the `plan_exit` Atlas tool to indicate your MATLAB plan is complete and ready for review.
- 06Approve the prompt to switch to the build agent, allowing Atlas to begin implementing the changes in your `.m` files.
- 07As Atlas proposes edits, review the unified diffs for each change, including those from `MATLAB Format Code`, before approving the write to disk.
- 08Instruct Atlas to run `matlab.unittest (runtests)` to verify the changes and review any failing assertions.
Frequently asked questions
- How does Atlas prevent accidental edits in MATLAB during planning?
- Atlas's plan agent operates in a strictly read-only mode for your MATLAB codebase. Its permission set explicitly denies all edit tools for every file path except for a designated markdown file under `.atlas/plans/*.md`. This ensures that while you research and design, no `.m` files, `buildfile.m` scripts, or `matlab.unittest` test files can be accidentally modified.
- Can Atlas search my MATLAB code locally without sending it to a server?
- Yes, Atlas can build its code index with local Ollama embeddings, keeping your MATLAB code entirely off third-party servers. This allows `codebase_search` to perform hybrid semantic and keyword retrieval on your `.m` files and `classdef` blocks directly on your machine, ensuring privacy and security for your proprietary MATLAB algorithms.
- What MATLAB-specific tools does Atlas integrate with for planning?
- While in the planning phase, Atlas integrates with the conceptual understanding of MATLAB's structure, indexing `function` signatures and `classdef` blocks via AST declarations. For implementation and verification, Atlas directly interacts with `matlab.unittest (runtests)` for test execution, `MATLAB Add-On Manager (mpm)` for package management context, and applies `MATLAB Format Code` conventions to touched files before approval.
- How does Atlas ensure my MATLAB code changes are reviewed before writing?
- Atlas employs a multi-stage approval process. First, the `plan_exit` tool requires explicit confirmation to switch from the read-only plan agent to the build agent. Second, once in the build agent, Atlas computes a unified diff for every proposed file edit, including those from `MATLAB Format Code`, and surfaces it for your approval before writing any changes to your `.m` files on disk. This ensures every modification is reviewed.
- What happens if I decide not to implement a MATLAB plan after writing it?
- If you decide not to proceed with implementing a MATLAB plan after documenting it in `.atlas/plans/*.md`, you can simply answer 'No' when prompted by the `plan_exit` tool. This will raise a `Question.RejectedError` and keep you in the plan agent, allowing you to refine the plan further or discard it without any `.m` files being modified.
- Does Atlas understand MATLAB class definitions and function signatures?
- Yes, Atlas indexes code by AST declarations using tree-sitter, which provides a deep understanding of MATLAB's syntax. This means Atlas can accurately parse and understand `classdef` blocks, including properties, methods, and events, as well as `function` signatures and their inputs/outputs within your `.m` files, enabling precise `codebase_search` and `lsp` tool functionality.
Try Atlas in your terminal
The terminal-native AI coding agent. Free core, single binary.
Install AtlasRelated 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.
Write unit tests for untested code in MATLAB with Atlas in 2026
Add real unit tests to your MATLAB code in 2026 using Atlas. Learn how Atlas leverages matlab.unittest (runtests) and existing repo conventions for robust testing.
Audit a repo with parallel subagents in MATLAB with Atlas in 2026
Sweep your MATLAB repository for issues without context window limits. Atlas uses parallel subagents to audit .m files, classdef blocks, and matlab.unittest test classes efficiently.
Upgrade a dependency and fix the breakage in MATLAB with Atlas in 2026
In 2026, Atlas helps MATLAB developers upgrade dependencies and fix breaking changes. Automate MATLAB Add-On Manager (mpm) updates, repair compile errors, and resolve matlab.unittest failures with AI-driven precision.
Review a Pull Request in MATLAB with Atlas in 2026
Atlas helps MATLAB developers in 2026 review pull requests by providing full code context, checking function references, and running matlab.unittest (runtests) for comprehensive bug detection.
Run Atlas Headless in CI for MATLAB Projects in 2026
Automate Atlas in your MATLAB CI/CD pipelines. Get machine-readable output, pre-approve tools, and integrate with matlab.unittest and MATLAB Format Code for efficient, non-interactive code generation and review.
Migrate a deprecated API across every callsite in MATLAB with Atlas in 2026
Streamline deprecated API migrations in MATLAB codebases with Atlas in 2026. Automate finding all callers, applying patches, and verifying with `matlab.unittest (runtests)` for a complete, safe transition.
Document a module with a README in MATLAB with Atlas in 2026
Learn how Atlas helps MATLAB developers in 2026 generate accurate README documentation directly from source code, using `matlab.unittest (runtests)` and `MATLAB Add-On Manager (mpm)`.