In 2026, Clojure developers leverage Atlas to produce precise README documentation by directly analyzing their `deps.edn` projects, ensuring the generated content accurately reflects the current state of the code, not outdated specifications. Atlas integrates direct with the Clojure toolchain, employing the `lsp` tool for API enumeration, the `read` tool for implementation details, and the `grep` tool for existing README structure, all while respecting your project's `cljfmt` conventions.
How Atlas Enumerates Clojure Module APIs for Documentation
In 2026, Atlas precisely enumerates a Clojure module's public API using the `lsp` tool's `documentSymbol` operation, ensuring no exported function or macro is overlooked. This method guarantees that the documentation reflects the actual surface area of your `src/my_project/core.clj` namespace.
Atlas begins the documentation process for a Clojure module by invoking the `lsp` tool's `documentSymbol` operation. This capability allows Atlas to query the Language Server Protocol for a definitive list of all public declarations within a given Clojure namespace, such as those defined in `src/my_project/utils.clj`. Unlike methods that might infer APIs from comments or file names, `documentSymbol` provides a verified, real-time enumeration of what the code actually exports. This ensures that every public function, macro, or var in your `deps.edn` project is accounted for in the generated README, preventing omissions or the inclusion of non-existent entities. The result is a foundational understanding of the module's interface, directly derived from the Clojure source code itself, forming the basis for accurate and comprehensive documentation.
Capturing Real Clojure Code Behavior and Usage with Atlas
To ensure documentation describes what the code actually does today, Atlas employs the `read` tool to analyze Clojure implementation details and `codebase_search` to find practical usage examples. This dual approach, critical in 2026, captures the nuances of how functions like `my-project.core/process-data` are truly utilized across your `deps.edn` project.
After enumerating the API, Atlas delves into the actual behavior of each Clojure export. It uses the `read` tool to parse and understand the implementation logic of functions and macros within files like `src/my_project/logic.clj`. Concurrently, Atlas leverages `codebase_search` to scan the entire `deps.edn` project for real-world invocations of these exports. This is crucial for understanding how Clojure developers are actually threading pipelines with `->>` or defining `deftest` cases in `test/my_project/core_test.clj` that exercise the module. By combining direct code analysis with practical usage patterns, Atlas generates documentation that accurately reflects the current operational reality of the Clojure code, rather than relying on potentially outdated design specifications or developer assumptions. This ensures the README is a living document, always synchronized with the codebase.
Structuring and Generating Clojure READMEs with Atlas
Atlas ensures new Clojure READMEs maintain consistency by first using the `grep` tool to analyze existing `README.md` files for established heading structures and tone. In 2026, the `write` tool then generates the documentation, meticulously quoting real Clojure signatures and file paths like `src/my_project/api.clj` to maintain accuracy.
Before generating new documentation, Atlas employs the `grep` tool to search for any existing `README.md` files within your Clojure project. This step is vital for understanding the project's established documentation style, including heading hierarchies, code block formatting, and overall tone. By matching these conventions, Atlas ensures that the new README integrates direct with your project's existing documentation ecosystem. Once the structure is determined, the `write` tool takes over, composing the README content. It directly quotes real Clojure function signatures, such as `(defn my-project.core/calculate [x y])`, and includes precise file paths like `src/my_project/data.clj`. This direct quotation of source elements, combined with the context gathered from API enumeration and usage analysis, results in a README that is both accurate and stylistically consistent with your `deps.edn` project.
Verifying Clojure Code Samples and Reviewing Atlas Edits
In 2026, Atlas rigorously verifies every Clojure code sample within the generated README by executing it with the `bash` tool, preventing the inclusion of non-functional examples. All proposed changes are presented as a unified diff for approval, and `cljfmt` is applied to maintain consistent formatting across your `deps.edn` project.
A critical step in Atlas's documentation workflow is the verification of code samples. After drafting the README, Atlas uses the `bash` tool to execute every Clojure code snippet included in the documentation. This proactive measure ensures that all examples are runnable and produce the expected output, eliminating the liability of outdated or incorrect code samples. For instance, it might run `clojure -M:test` with `kaocha` to validate test cases or execute simple `clojure` commands. Before any changes are committed, Atlas presents a unified diff of all modifications to files like `README.md`. This diff is surfaced for your explicit approval, allowing you to review every line added, removed, or altered. Furthermore, Atlas applies `cljfmt` to the generated documentation, ensuring that all Clojure code blocks adhere to your project's established formatting conventions, maintaining a clean and consistent codebase. Every Atlas tool call is permission-gated, requiring your explicit consent before execution, providing a robust safety net for your `deps.edn` project.
Step by step
- 01Run `atlas` in your Clojure project, ensuring it can read your `deps.edn` configuration, namespace requires, and any `:aliases`.
- 02Ask Atlas to enumerate the module's public API using the `lsp` tool's `documentSymbol` operation, targeting relevant Clojure namespaces like `src/my_project/core.clj`.
- 03Instruct Atlas to `read` the implementation of each Clojure export and use `codebase_search` to find how callers actually use it in practice, for example, observing `->>` threading macros.
- 04Have Atlas `grep` the repository for an existing `README.md` to match heading structure and tone, then `write` the new documentation, quoting real Clojure signatures and file paths.
- 05Permit Atlas to `bash` execute every Clojure code sample in the draft README to verify its correctness and functionality, potentially running `clojure -M:test` with `kaocha`.
- 06Review the unified diff generated by Atlas for the `README.md` and any other changes, then approve the edits, allowing Atlas to apply `cljfmt` for consistent Clojure formatting.
Frequently asked questions
- How does Atlas ensure Clojure documentation is always up-to-date with the code?
- Atlas ensures Clojure documentation is current by directly reading the source code using the `read` tool and analyzing real usage patterns with `codebase_search`. This process, performed in 2026, guarantees that the generated README reflects the actual state and behavior of your `deps.edn` project, not just what was intended a year ago.
- What specific Clojure tools does Atlas integrate with for documentation generation?
- Atlas integrates deeply with the Clojure toolchain. It operates within `deps.edn` projects, uses `lsp` for API discovery, can run `clojure -M:test` with `kaocha` for sample verification, and applies `cljfmt` for consistent code formatting in the generated READMEs.
- Can Atlas verify Clojure code examples included in the README?
- Yes, Atlas rigorously verifies Clojure code examples. It uses the `bash` tool to execute every code snippet within the drafted README. This ensures that all examples are functional and accurate, preventing the inclusion of broken or outdated code in your `README.md`.
- How does Atlas handle existing `README.md` files in a Clojure project?
- Atlas respects existing documentation. It uses the `grep` tool to analyze any present `README.md` files to understand the project's established heading structure, tone, and formatting conventions. This allows Atlas to generate new documentation that direct integrates with your project's existing style.
- Is the documentation process for Clojure modules safe and reviewable with Atlas?
- Absolutely. Atlas prioritizes safety and reviewability. It drafts a plan in a read-only agent, computes a unified diff for every file edit, and surfaces it for your approval. Every tool call, including `lsp` or `bash`, is permission-gated, requiring your explicit consent before execution, ensuring full control over your `deps.edn` project.
- How does Atlas ensure consistent formatting for Clojure code in documentation?
- Atlas ensures consistent formatting for Clojure code by applying `cljfmt` to the generated documentation. After drafting the `README.md`, Atlas will propose changes that adhere to your project's `cljfmt` configuration, maintaining a uniform style across your codebase and documentation.
Try Atlas in your terminal
The terminal-native AI coding agent. Free core, single binary.
Install AtlasRelated guides
Document a Module with a README Using Atlas (2026 Workflow)
How to document a module with a README using Atlas in 2026: the lsp tool's documentSymbol enumerates the real exports, read supplies the behavior, write emits the README.
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.
Run the Test Suite and Triage Failures in Clojure with Atlas in 2026
In 2026, Atlas helps Clojure developers efficiently run `kaocha` test suites, triage failures from `deps.edn` projects, and prioritize fixes using AI-powered tools.
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.
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.
Trace a Runtime Bug from a Stack Trace in Clojure with Atlas in 2026
Pinpoint and fix Clojure runtime bugs from production stack traces using Atlas, the terminal-native AI coding agent. Leverage `deps.edn`, `kaocha`, and `cljfmt` for rapid, verified fixes.
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.
Migrate a Deprecated API Across Every Callsite in Clojure with Atlas in 2026
Effortlessly migrate deprecated APIs across your Clojure codebase using Atlas. Leverage `deps.edn`, `kaocha`, and `cljfmt` for a complete, verified transition.