# Review a Pull Request in Clojure with Atlas in 2026

> Atlas helps Clojure developers in 2026 review pull requests by integrating with `deps.edn`, `kaocha`, and `cljfmt` to provide deep contextual analysis beyond simple diffs.

In 2026, Atlas empowers Clojure developers to review pull requests with unprecedented depth, moving beyond line-by-line diffs to catch subtle bugs that human eyes often miss. Atlas integrates directly with your existing Clojure toolchain, understanding `deps.edn` configurations, running `kaocha` tests via `clojure -M:test`, and applying `cljfmt` for consistent code style. It fetches the full context of changed files, checks for breaking signature changes across your codebase, and ensures all relevant patterns are updated, providing a comprehensive review before any code is committed.

## Key takeaways

- Atlas deeply integrates with the Clojure toolchain, including `deps.edn`, `kaocha`, and `cljfmt`.
- Review Clojure pull requests with full file context, not just diff hunks, to catch subtle bugs.
- Atlas uses `lsp findReferences` to detect breaking changes in Clojure function signatures across namespaces.
- Automate `kaocha` test execution and `cljfmt` formatting with permission-gated Atlas tools.
- Maintain full control with Atlas's read-only plan agent and explicit approval for all file edits and commands.

## How does Atlas get full context for Clojure pull request reviews?

In 2026, Atlas reviews a Clojure pull request by first fetching the branch and producing a raw diff using its VCS layer, which exposes git data. Unlike traditional tools, Atlas then uses its `read` tool to pull the full contents of changed files, not just the hunks, ensuring complete surrounding context is visible for a thorough review.

Atlas begins a Clojure pull request review by leveraging its robust VCS capabilities. It uses `bash` to interact with `git`, fetching the specific branch associated with the pull request and generating a raw patch. This initial step provides the foundational changes. However, a line-by-line diff often obscures crucial context. To overcome this, Atlas employs its `read` tool to retrieve the entire content of any file modified in the pull request. This means that if a change occurs in a `src/my_app/core.clj` file, Atlas reads the *entire* `core.clj` file, allowing it to analyze how the changes interact with surrounding code that might not be part of the immediate diff hunks. This comprehensive file access is vital for understanding the full impact of a Clojure change, especially when dealing with nested data structures or complex macro definitions where context is paramount. Atlas also builds its code index using AST declarations via tree-sitter, providing a deeper understanding of Clojure namespaces, aliases, and function definitions within your `deps.edn` project.

## How does Atlas check for breaking changes in Clojure namespaces?

Atlas ensures Clojure code integrity by using its `lsp` tool's `findReferences` operation to detect breaking changes in 2026. For every modified function signature within a Clojure namespace, Atlas proactively checks all callers across the codebase, even those not directly touched by the diff, preventing silent regressions.

After understanding the full context of changed Clojure files, Atlas moves to proactively identify potential breaking changes. For any function or macro signature that has been altered in a file like `src/my_app/utils.clj`, Atlas invokes its `lsp` tool. Specifically, it uses the `findReferences` operation to locate every call site of that modified signature throughout the entire project. This is critical for Clojure, where changes in a core utility function could ripple through many dependent namespaces. A standard diff would only show the changes in `utils.clj`, but Atlas's `lsp` integration reveals if `src/my_app/api.clj` or `src/my_app/service.clj` now have broken calls due to the signature change. Furthermore, Atlas employs its `grep` tool to search for specific patterns that *should* have been updated but might have been missed. This includes old constant names, stale copies of code, or feature flags that were intended to be removed or modified, ensuring a thorough cleanup and consistency across the Clojure codebase.

## How does Atlas run Clojure tests with Kaocha during a PR review?

Atlas integrates directly with the Clojure testing ecosystem in 2026, running `kaocha` tests to validate pull request changes. Before any commit, Atlas executes `clojure -M:test` via its `bash` tool, reporting findings as a `todowrite` list ordered by severity, ensuring all `deftest` cases under `test/` are thoroughly checked.

A crucial step in any Clojure pull request review is verifying that changes haven't introduced regressions and new features work as expected. Atlas automates this by directly invoking your project's test suite. Using its `bash` tool, Atlas executes the standard Clojure CLI command `clojure -M:test`, which in a well-configured `deps.edn` project, will run your `kaocha` test runner. This command targets all `deftest` cases defined within your `test/` directory, such as `test/my_app/core_test.clj`. Atlas waits for the test results and then processes them. Any failures or errors are compiled into a `todowrite` list, which is then presented to the developer, ordered by severity. This ensures that critical test failures are immediately visible and addressed. The execution of `clojure -M:test` is permission-gated, meaning Atlas will ask for your explicit approval before running external commands, maintaining transparency and control over your development environment.

## How does Atlas ensure Clojure code formatting with cljfmt?

Atlas helps maintain consistent Clojure code style in 2026 by integrating with `cljfmt`, the community-standard formatter. Before finalizing a pull request, Atlas can apply `cljfmt` via its `bash` tool, ensuring that all new or modified code adheres to your project's indentation conventions and style guidelines.

Consistent code formatting is essential for readability and maintainability in any Clojure project. Atlas understands this and integrates direct with `cljfmt`, the widely adopted Clojure formatter. As part of the pull request review workflow, Atlas can be instructed to apply `cljfmt` to the changed files. This is achieved by using its `bash` tool to execute the appropriate `cljfmt` command, typically configured as an alias in your `deps.edn` file, such as `clojure -M:cljfmt check` or `clojure -M:cljfmt fix`. This step ensures that all new code in `src/my_app/new_feature.clj` or modifications to existing files like `src/my_app/core.clj` conform to the project's established indentation and style conventions. By automating `cljfmt` application, Atlas helps prevent formatting-related comments during human review, allowing developers to focus on the logic and correctness of the Clojure code. Atlas will present a unified diff of any formatting changes for your approval before writing them to disk, ensuring you always have the final say.

## What safety features does Atlas offer for Clojure pull request reviews?

Atlas prioritizes safety and transparency in 2026 by implementing several robust features for Clojure pull request reviews. Every Atlas tool call, including `bash` commands for `kaocha` or `cljfmt`, is permission-gated, requiring explicit user approval before execution, ensuring developers retain full control over their `deps.edn` projects.

Atlas is designed with developer control and safety at its core, especially when interacting with your Clojure codebase. Before any tool call, such as running `clojure -M:test` with `kaocha` or applying `cljfmt` via `bash`, Atlas presents a permission prompt, allowing you to `allow`, `ask`, or `deny` the operation. This granular control ensures that no commands are executed without your explicit consent. Furthermore, Atlas drafts a comprehensive plan in a read-only plan agent, detailing its intended actions before switching to a build agent to execute them. This allows you to review the entire strategy for the pull request review, from fetching branches to running tests, before any changes are made. For every file edit Atlas proposes, it computes a unified diff and surfaces it for your approval, ensuring you can inspect and confirm every modification before it's written. Atlas also snapshots file changes as git patches, providing a robust mechanism for diffing edits and rolling back if necessary, offering an unparalleled level of safety and transparency for your Clojure development workflow.

## Steps

1. Fetch the Clojure branch and produce the diff: Use Atlas's VCS layer to `bash` `git fetch` the pull request branch and then `git diff` to generate the initial patch.
2. Read full Clojure files for context: Employ Atlas's `read` tool to retrieve the complete contents of all changed Clojure files, such as `src/my_app/core.clj`, ensuring context beyond the diff hunks is visible.
3. Check for breaking Clojure signature changes: For every modified function or macro signature, use Atlas's `lsp` tool with `findReferences` to identify any callers in other Clojure namespaces that the diff does not show.
4. Grep for unupdated Clojure patterns: Utilize Atlas's `grep` tool to search for old constant names, stale code copies, or feature flags that should have been updated or removed across your Clojure project.
5. Run Clojure tests with Kaocha: Execute `clojure -M:test` via Atlas's `bash` tool, leveraging your `deps.edn` configuration to run `kaocha` against all `deftest` cases in your `test/` directory.
6. Apply Clojure formatting with cljfmt: Have Atlas apply `cljfmt` using a `bash` command, such as `clojure -M:cljfmt fix`, to ensure all changed Clojure files adhere to your project's style guidelines.
7. Review and approve Atlas's findings: Examine the `todowrite` list of findings, review the unified diffs for proposed changes, and approve or reject Atlas's suggested edits before they are committed.

## FAQ

### How does Atlas understand my Clojure project's dependencies and aliases?

Atlas builds its code index by parsing your `deps.edn` file, allowing it to understand your project's dependencies, `:aliases`, and the structure of your Clojure namespaces. This deep understanding informs its contextual analysis and tool interactions.

### Can Atlas run specific `kaocha` tests or just the entire suite?

Atlas uses its `bash` tool to execute `clojure -M:test`, which typically runs your entire `kaocha` test suite as configured in `deps.edn`. While it runs the full suite for comprehensive review, you can configure `deps.edn` aliases for more granular `kaocha` execution if needed.

### How does Atlas ensure my Clojure code adheres to `cljfmt` conventions?

Atlas can invoke `cljfmt` via its `bash` tool, applying formatting fixes to changed Clojure files. It then presents a unified diff of these formatting changes for your approval, ensuring your `cljfmt` conventions are consistently applied.

### What kind of permissions does Atlas ask for when reviewing Clojure code?

Atlas operates with permission-gated tool calls. For actions like running `clojure -M:test` or applying `cljfmt`, it will prompt you to `allow`, `ask`, or `deny` the execution, giving you explicit control over your Clojure environment.

### How does Atlas provide more context than a standard `git diff` for Clojure?

Beyond the raw `git diff`, Atlas uses its `read` tool to pull the full contents of changed Clojure files. It also indexes code by AST declarations and uses `lsp findReferences` to check for impacts across namespaces, providing a holistic view.

### Does Atlas keep my Clojure code on third-party servers for analysis?

No, Atlas can build its code index with local Ollama embeddings, ensuring your Clojure code remains on your machine and off third-party servers, maintaining privacy and security.

### How does Atlas handle staging and committing changes in a Clojure workflow?

Atlas reads `git` branches, status, and diffs. It can stage and create commits on your behalf, but always surfaces a unified diff for approval before writing any file edits and before committing, giving you final control over your Clojure project's history.

---

Canonical HTML: https://runatlas.sh/resources/stacks/review-a-pull-request-in-clojure
Source of truth: aeo_pages row `/resources/stacks/review-a-pull-request-in-clojure` (segment: Stacks) (this file is generated from it, never hand-edited).
Licence: Atlas is proprietary with a free core. It is not open source and there is no public source repository.
