In 2026, Clojure developers can design extensive, multi-file changes and secure team review before modifying any code by leveraging Atlas's dedicated Plan agent. This agent integrates directly with your `deps.edn` project, allowing you to research your codebase using tools like `grep` and `lsp`, then draft a detailed plan, all while preventing accidental edits to your `src/` or `test/` directories.
How Atlas's Plan Agent Secures Clojure Codebase Research
Atlas's Plan agent, introduced in 2026, provides a secure environment for Clojure developers to research their `deps.edn` projects without risk of accidental modification. This specialized agent disallows all edit tools, ensuring that your `src/` and `test/` directories remain untouched while you explore the codebase.
When you initiate Atlas in a Clojure project, you can explicitly switch to the Plan agent. This agent's permission set is meticulously configured to deny write access to all project files except for a designated plan markdown file, typically located under `.atlas/plans/*.md`. This read-only mode is crucial for complex refactorings or feature additions that span multiple Clojure namespaces. You can safely use Atlas's `codebase_search` to find relevant `deftype` or `defrecord` definitions, `grep` to locate specific keywords across `src/` and `test/` files, `read` to inspect `core.clj` or `utils.clj` files, and the `lsp` tool to understand function signatures or macro expansions, all without the possibility of inadvertently altering your Clojure source code. This separation of concerns ensures that the design phase is purely about understanding and planning, not implementation.
Drafting Multi-File Clojure Changes in a Dedicated Plan
After thorough research, Clojure developers in 2026 can draft their multi-file change proposals directly within Atlas's Plan agent, using a dedicated markdown file. This approach ensures that the design document is version-controlled and directly linked to the planning workflow, facilitating clear communication.
The core of planning a multi-file change in Clojure with Atlas involves writing your detailed strategy into the allowed plan markdown path. For instance, if you're planning to introduce a new `component` or `integrant` system map, or refactor a large `defmulti` dispatch, you would document the proposed changes to `src/my_app/system.clj`, `src/my_app/api.clj`, and `test/my_app/api_test.clj`. This markdown file becomes the single editable artifact within the Plan agent. You can outline new function signatures, describe how existing `defn` or `defmacro` calls will be modified, and even sketch out new `deftest` cases for `kaocha`. Atlas's ability to snapshot file changes as git patches means that even your plan document itself can be diffed and rolled back, providing a robust audit trail for your design decisions before any actual Clojure code is touched.
Ensuring Safety and Review for Clojure Refactorings
Atlas provides robust safety and review mechanisms for Clojure refactorings in 2026, ensuring that multi-file changes are thoroughly vetted before implementation begins. The Plan agent's strict permissions prevent premature code modifications, while the `plan_exit` tool manages the transition to the build phase.
The primary safety feature of Atlas's Plan agent is its permission-gated execution. By denying edit permissions for all paths except the plan markdown, Atlas guarantees that your research and design activities cannot accidentally lead to code modifications in your `src/` or `test/` directories. Once your multi-file change plan, detailing modifications to `deps.edn` aliases, new namespaces, or `cljfmt` conventions, is complete and reviewed, you use the `plan_exit` tool. This tool prompts you with a clear question: 'Plan at <path> is complete. Would you like to switch to the build agent and start implementing?' Answering 'Yes' initiates the handoff to the build agent, which then has the necessary permissions to begin modifying your Clojure codebase. Answering 'No' raises a `Question.RejectedError`, keeping you in the Plan agent to refine your design further. This explicit approval step is vital for maintaining control over complex Clojure projects, especially when dealing with critical `core.clj` or `db.clj` files.
direct Transition from Clojure Plan to Implementation
Transitioning from a meticulously crafted Clojure plan to its implementation is direct with Atlas in 2026, thanks to the `plan_exit` tool. This tool facilitates a controlled handoff from the read-only Plan agent to the fully capable Build agent, ready to apply changes.
Once your multi-file change plan for your Clojure project, perhaps involving a new `defprotocol` or a significant update to `deps.edn` dependencies, has been finalized and approved, the `plan_exit` tool acts as the gateway to implementation. After confirming your readiness to proceed, Atlas switches the active agent from Plan mode to Build mode. The Build agent then gains the necessary permissions to interact with your Clojure codebase, allowing it to modify files, run `clojure -M:test` with `kaocha`, and apply `cljfmt` for formatting. This structured transition ensures that the implementation phase begins only after a clear, reviewed design is in place, minimizing errors and maximizing efficiency in your Clojure development workflow. The plan document itself serves as a direct blueprint for the Build agent, guiding its actions and ensuring alignment with the approved design.
Step by step
- 01Start Atlas in your Clojure project directory containing `deps.edn`.
- 02Switch to the Plan agent to ensure read-only access to your Clojure codebase: `atlas agent switch plan`.
- 03Research your Clojure project using `codebase_search` for `defrecord` definitions, `grep` for keywords in `src/my_app/core.clj`, `read` for `deps.edn` configurations, and `lsp` for function signatures, all within the Plan agent's safe environment.
- 04Write your detailed multi-file change plan into the designated markdown file, e.g., `.atlas/plans/my_feature_plan.md`, outlining modifications to `src/my_app/feature.clj` and `test/my_app/feature_test.clj`.
- 05Review your plan, ensuring it covers all necessary changes, including potential updates to `deps.edn` aliases or `cljfmt` rules.
- 06Call the `plan_exit` tool: `atlas plan_exit`. Atlas will ask if you want to switch to the build agent.
- 07Answer 'Yes' to the `plan_exit` prompt to transition to the Build agent and begin implementing your planned Clojure changes.
Frequently asked questions
- How does Atlas prevent accidental edits to my Clojure code during planning?
- Atlas's Plan agent operates with a strict permission set that denies write access to all files except the designated plan markdown document. This ensures that while you research your `src/` and `test/` directories, no accidental modifications can occur to your Clojure code.
- Can I use my existing Clojure tools like `deps.edn` and `kaocha` with Atlas's planning workflow?
- Yes, Atlas is designed to integrate direct with your existing Clojure toolchain. It reads your `deps.edn` configuration, and while in the Build agent, it can run `clojure -M:test` with `kaocha` and apply `cljfmt` for formatting, all behind permission prompts.
- What happens if I decide not to implement the plan after drafting it in Atlas?
- If you decide not to proceed with implementation, you can answer 'No' when prompted by the `plan_exit` tool. This will keep you in the Plan agent, allowing you to refine or discard the plan without ever modifying your actual Clojure codebase.
- How does Atlas help with reviewing multi-file Clojure changes before they are coded?
- Atlas facilitates review by centralizing your multi-file change design into a single, version-controlled markdown plan. This document can be shared and reviewed by your team, ensuring alignment on the proposed changes to `src/` and `test/` files before any actual coding begins.
- Does Atlas support specific Clojure project structures or idioms?
- Atlas is built to understand Clojure projects driven by `deps.edn`, recognizing namespaces, aliases, and REPL-shaped code. It indexes code by AST declarations, allowing it to intelligently search and understand your Clojure idioms, `deftype` definitions, and `defprotocol` implementations.
- Can Atlas help me understand complex Clojure macros or function calls during planning?
- Yes, within the Plan agent, you can utilize Atlas's `lsp` tool to query your Clojure codebase. This allows you to inspect function signatures, macro expansions, and type information, providing deeper insights into complex `defn` or `defmacro` definitions without leaving the terminal.
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.
Atlas for Clojure: A Terminal-Native AI Coding Agent for deps.edn and Kaocha in 2026
Atlas is a terminal-native AI coding agent for Clojure in 2026. It reads deps.edn aliases and namespace requires, runs clojure -M:test with Kaocha, and applies cljfmt.
Automate GitHub Issue and Pull Request Triage in Clojure with Atlas in 2026
Streamline GitHub issue and pull request triage for your Clojure projects using Atlas in 2026. Automate responses safely with `deps.edn` and `kaocha`.
Debug a single failing test in Clojure with Atlas in 2026
In 2026, Clojure developers use Atlas to efficiently debug failing tests. Learn how Atlas integrates with `deps.edn`, `kaocha`, and `cljfmt` to pinpoint and fix code issues.
Run Atlas Headless in CI for Clojure Projects in 2026
Automate Atlas in your Clojure CI/CD pipeline. Learn to run Atlas headless with `deps.edn`, `kaocha`, and `cljfmt` for machine-readable output and safe code changes in 2026.
Review a Pull Request in Clojure with Atlas in 2026
Streamline Clojure pull request reviews in 2026 with Atlas, the terminal-native AI agent. Catch subtle bugs by leveraging `deps.edn`, `kaocha`, and `cljfmt` for deep context.
Add a Regression Test for a Clojure Bug Fix with Atlas in 2026
In 2026, Clojure developers use Atlas to lock in bug fixes with regression tests. Learn how Atlas integrates with deps.edn, kaocha, and cljfmt for robust testing workflows.
Onboard to an Unfamiliar Clojure Codebase with Atlas in 2026
In 2026, Clojure developers use Atlas to quickly build a mental model of new repositories. Leverage `deps.edn`, `kaocha`, and `cljfmt` with AI-powered code exploration.