Atlas helps Erlang developers in 2026 pinpoint the exact file and symbol responsible for a behavior, even when only the software's function is known, by combining semantic code search, precise keyword matching, and symbol graph navigation within `rebar3` projects.
How Atlas Locates Erlang Behavior Semantically
In 2026, Atlas begins locating Erlang behavior implementations by understanding what the code does, not just what it is called. Its `codebase_search` tool uses hybrid semantic and keyword retrieval, indexing code by AST declarations with tree-sitter, to return candidate declarations even when your description does not appear verbatim in the source.
When an Erlang developer describes a system's behavior, such as 'how a `gen_server` handles a specific message' or 'where a `supervisor` restarts a child process,' Atlas's `codebase_search` tool processes this natural language query. Unlike traditional text search, Atlas builds its code index using AST declarations, allowing it to grasp the structural and conceptual meaning of Erlang modules, functions, and `gen_server` callbacks. This means you can describe a behavior like 'the logic for processing an incoming HTTP request in `cowboy`' without knowing the exact module or function names. Atlas can even build its code index with local Ollama embeddings, ensuring your proprietary Erlang code remains off third-party servers, a critical security feature for many organizations in 2026. The initial results from `codebase_search` provide a strong starting point, offering relevant Erlang modules and function declarations that semantically match the described behavior, even if the keywords are absent.
Pinpointing Erlang Code with Keyword Search and File Access
After semantic retrieval, Atlas refines its search for Erlang behavior implementations using precise keyword matching. The `grep` tool, powered by `ripgrep`, allows developers to confirm candidate declarations with real regex patterns, including path and file filters, ensuring accuracy across `rebar3` projects. This step is crucial for validating semantic hunches.
Once `codebase_search` provides a set of semantically relevant Erlang modules or functions, the next step is to confirm these findings with exact text. Atlas's `grep` tool is invaluable here, allowing you to run powerful regular expressions across your entire `rebar3` codebase. For instance, if `codebase_search` suggests a `gen_server` module, you might `grep` for specific patterns like `handle_call` or `init/1` within that module's directory, perhaps `src/my_module.erl`. You can specify include filters like `*.erl` or path filters to narrow the search to specific application directories within a larger Erlang/OTP system. This combination of semantic understanding and precise keyword search helps an Erlang developer quickly narrow down the possibilities. When a promising file is identified, the `read` tool allows you to open and inspect its contents. A wrong guess fails loudly with 'File not found' and a 'Did you mean' list, preventing wasted time on incorrect paths and ensuring you always work with valid Erlang source files.
Tracing Erlang Function Calls with the LSP Tool
To fully understand an Erlang behavior's implementation, Atlas leverages the Language Server Protocol (LSP) in 2026. The `lsp` tool's `findReferences` operation reveals every callsite for a given function, while `workspaceSymbol` allows jumping directly to a declaration by name, providing a comprehensive view of the Erlang symbol graph within your `rebar3` application.
With a candidate Erlang module and function identified, the `lsp` tool becomes critical for understanding its role within the larger system. For example, if you've found a `handle_call` clause in `src/my_gen_server.erl` that seems to implement the behavior, you can use `lsp findReferences` on that specific function. This will show you every location in your `rebar3` project where that `handle_call` is invoked, helping you trace the call path back to its origin, perhaps a `gen_server:call/2` in another module. Conversely, if you know the name of a `gen_server` or `supervisor` module but not its exact file, `lsp workspaceSymbol MyGenServer` can instantly jump you to its declaration. This deep integration with the Erlang/OTP symbol graph, built upon `rebar.config` and `src/*.app.src` definitions, allows Atlas to provide a rich, interactive experience for navigating complex Erlang codebases, revealing how different parts of the supervision tree or `relx` release configuration interact.
Ensuring Safety and Review for Erlang Code Edits
Atlas prioritizes safety and developer control when locating and potentially modifying Erlang behavior implementations. Every Atlas tool call is permission-gated against allow, ask, and deny rules, ensuring no actions are taken without explicit consent. In 2026, this granular control is essential for maintaining code integrity in `rebar3` projects.
When Atlas assists in locating a behavior, it operates with a strong emphasis on safety and transparency. Before any tool like `grep` or `lsp` is executed, Atlas checks against predefined permission rules. For instance, if Atlas suggests running `rebar3 eunit` to confirm a test case related to the behavior, it will first ask for your approval. Atlas drafts a plan in a read-only plan agent, detailing its intended steps, and asks for your permission before switching to a build agent that can make changes. If Atlas were to suggest adding a `handle_call` clause or a new Common Test suite under `test/`, it would compute a unified diff for every file edit and surface it for your approval before writing. This allows Erlang developers to review proposed changes, such as modifications to `src/my_module.erl` or `rebar.config`, ensuring they align with project standards and `erlfmt` style. Atlas also snapshots file changes as git patches, so edits can be easily diffed and rolled back, providing a robust safety net for any exploration or modification of Erlang code.
Summarizing Erlang Behavior Implementation Paths
After successfully locating an Erlang behavior, Atlas provides a clear, concise summary of its implementation path. This summary includes concrete file and line references, allowing developers to quickly grasp the architecture. This final step consolidates all findings, making the complex task of understanding Erlang/OTP systems more manageable in 2026.
Once Atlas has guided you through the process of identifying the relevant Erlang modules, functions, and call sites responsible for a specific behavior, it synthesizes this information into an actionable summary. For example, if you were looking for how a specific message is handled by a `gen_server`, Atlas might report: 'The behavior for processing `{'my_message', Data}` is implemented in `src/my_gen_server.erl` at line 42 within the `handle_call/3` function, which is invoked by `my_app_sup:start_child/1` in `src/my_app_sup.erl` at line 15.' This summary provides a direct, traceable path through your Erlang codebase, connecting the high-level behavior description to the exact lines of code. This capability is particularly valuable in large Erlang/OTP applications, where understanding the flow of control through supervision trees and `gen_server` interactions can be challenging. Atlas's ability to fan out work to subagents, running in foreground or parallel background sessions, means it can efficiently gather and present these complex call paths, making the process of understanding and modifying Erlang behaviors significantly faster and more reliable.
Step by step
- 01Describe the Erlang behavior to Atlas using `codebase_search`, for example: "Find where the `gen_server` handles a `start_link` message in `my_app`."
- 02Review the semantic index results from `codebase_search`, which will return candidate Erlang declarations even if your words don't appear in `src/*.erl`.
- 03Confirm the candidate Erlang modules or functions with `grep`, using a real regex and path filters like `src/my_module.erl` to pinpoint exact text matches.
- 04Open the best candidate Erlang file with `read src/my_module.erl`. If the path is wrong, Atlas will loudly report 'File not found' and suggest alternatives.
- 05Use the `lsp` tool's `findReferences` operation on a specific Erlang function, like `handle_call/3`, to see every callsite within your `rebar3` project.
- 06Alternatively, use `lsp workspaceSymbol MyGenServer` to jump directly to the declaration of an Erlang module or function by its name.
- 07Summarize the call path back to the user with concrete Erlang file and line references, such as `src/my_gen_server.erl:42`.
Frequently asked questions
- How does Atlas find Erlang code when I only know what it does, not its name?
- Atlas uses `codebase_search` with hybrid semantic and keyword retrieval. It indexes Erlang code by AST declarations, understanding the meaning of `gen_server` callbacks or `supervisor` definitions, allowing you to describe a behavior in natural language rather than needing exact function names.
- Can Atlas work with my existing `rebar3` Erlang project structure?
- Yes, Atlas is designed for Erlang/OTP systems built with `rebar3`. It understands `rebar.config` and `src/*.app.src` files, maps supervisor callbacks, `gen_server` modules, and `relx` release configurations, integrating direct with your existing project setup.
- How does Atlas ensure I don't accidentally change my Erlang code?
- Atlas employs a robust safety system. All tool calls are permission-gated, requiring your approval. It drafts plans in a read-only agent, computes unified diffs for any proposed changes to Erlang files, and snapshots edits as git patches for easy rollback, ensuring full control over your codebase.
- What Erlang-specific tools does Atlas integrate with?
- Atlas integrates directly with the core Erlang toolchain. It can run `rebar3 eunit` for tests, manage dependencies with `rebar3`, and apply code formatting with `erlfmt` on touched modules, all behind permission prompts to maintain project style and integrity.
- Can Atlas help me trace function calls in a complex Erlang supervision tree?
- Absolutely. Atlas's `lsp` tool provides `findReferences` to see every callsite of an Erlang function and `workspaceSymbol` to jump to declarations. This allows you to trace the flow of control through `gen_server` calls and `supervisor` child specifications, even in intricate Erlang/OTP systems.
- Does Atlas send my Erlang source code to external servers for indexing?
- No, Atlas can build its code index with local Ollama embeddings. This capability ensures that your Erlang source code, including sensitive business logic within `src/*.erl` files, remains entirely on your local machine, never leaving your development environment.
Try Atlas in your terminal
The terminal-native AI coding agent. Free core, single binary.
Install AtlasRelated guides
Locate Where a Behavior Is Implemented with Atlas in 2026
How to locate where a behavior is implemented with Atlas in 2026: codebase_search for meaning, grep for exact text, and the lsp tool for the symbol graph.
Atlas for Erlang in 2026
Atlas is a terminal-native AI coding agent for Erlang/OTP in 2026. Run it in an app with a rebar.config, map supervisors and gen_server modules, review every diff.
Write Unit Tests for Untested Code in Erlang with Atlas in 2026
In 2026, Erlang developers use Atlas to write unit tests for untested modules, leveraging `rebar3 eunit` and `erlfmt` to match existing project conventions and ensure code quality.
Self-review Your Working Diff Before Committing in Erlang with Atlas in 2026
Erlang developers in 2026 use Atlas to self-review uncommitted diffs, catching mistakes before CI. Leverage rebar3, erlfmt, and eunit with AI assistance.
Review a Pull Request in Erlang with Atlas in 2026
Streamline Erlang pull request reviews in 2026 with Atlas, the terminal-native AI coding agent. Catch subtle bugs by leveraging Erlang's rebar3, eunit, and erlfmt toolchain for comprehensive context.
Upgrade a Dependency and Fix Breakage in Erlang with Atlas in 2026
In 2026, Erlang developers use Atlas to upgrade dependencies like `rebar3` packages, automatically fixing compile and test failures. Atlas leverages `rebar3 eunit` and `erlfmt` for a streamlined workflow.
Run Atlas Headless in CI in Erlang with Atlas in 2026
Automate Erlang development in CI/CD with Atlas. Run Atlas headless, integrate with rebar3 and erlfmt, and get machine-readable output for Erlang/OTP projects in 2026.
Run the Erlang Test Suite and Triage Failures with Atlas in 2026
Erlang developers in 2026 use Atlas to efficiently triage rebar3 eunit test failures, transforming extensive red output into a prioritized list of distinct root causes for rapid resolution.