# Onboard to an unfamiliar Kotlin codebase with Atlas (2026)

> Atlas onboards you to a Kotlin repo by querying a semantic index with codebase_search, mapping Gradle modules with glob, and delegating fan-out to a read-only explore subagent.

Onboarding to an unfamiliar Kotlin repository with Atlas starts from meaning, not filenames. You ask codebase_search a plain-language question, for example how requests are authenticated, and it queries the semantic index and returns ranked snippets with file paths, which in a Gradle project means it can point at a coroutine-based interceptor several modules away from where you would have started guessing. glob then maps the directory shape, showing you the build.gradle.kts files and the src/main/kotlin package layout before you open anything. read pulls only the two or three files that actually matter. Heavy fan-out goes to Atlas's explore subagent through the task tool, which is defined with a deny-by-default permission set that only allows grep, glob, read, bash, webfetch, and websearch, so it is read-only and cannot change anything while it looks around.

## Key takeaways

- codebase_search answers a plain-language question about a Kotlin repo with ranked snippets and real file paths, so onboarding starts from meaning, not filenames.
- glob maps the Gradle module layout, the build.gradle.kts files, and the src/main/kotlin package structure before you open a single class.
- Atlas's explore subagent has a deny-by-default permission set allowing only grep, glob, read, bash, webfetch, and websearch, so reconnaissance cannot become an edit.
- The lsp tool's goToDefinition operation resolves Kotlin extension functions and DI-wired interface methods that no import statement reveals.
- A todowrite list preserves the open questions from an onboarding pass, so the next session does not rediscover them.
- The real Kotlin toolchain stays in the loop: JUnit 5 via gradle test, Gradle, and ktlint.

## How do you understand an unfamiliar Kotlin codebase without reading every file?

Atlas onboards you to a Kotlin repo in 5 documented steps, starting with a plain-language codebase_search question such as how requests are authenticated. codebase_search queries the semantic index and returns ranked snippets with file paths, which in a multi-module Kotlin project can point at a suspend function 3 Gradle modules from where you would have looked.

Kotlin repositories hide their entry points well. A Gradle multi-module build spreads code across :app, :core, and :data, coroutine dispatch means the code that runs is not the code that was called, and extension functions live in files whose names say nothing about what they extend. codebase_search sidesteps all of that by working from meaning: the semantic index returns ranked snippets with real file paths for a plain-language question. Atlas indexes code by AST declarations using tree-sitter, not blind line windows, so a returned snippet is a whole Kotlin declaration, a class, an object, or a suspend fun, rather than an arbitrary slice.

## How do you map the Gradle module layout of a new Kotlin repo?

Atlas runs its glob tool on the top-level directories before opening any file, step 2 of the documented workflow. In a Kotlin project, glob shows the settings.gradle.kts, the per-module build.gradle.kts files, and the src/main/kotlin package structure, which gives you module boundaries and naming conventions in 1 pass.

Directory shape is information. A Kotlin repo with :feature-auth, :feature-billing, and :core-network has already told you how the team thinks about boundaries, and a glob over the top level surfaces that before you have read a line of code. The build.gradle.kts files themselves are worth reading early, because they name the dependencies each module is allowed to see, which is a stronger constraint than any documentation. Atlas's documented Kotlin setup is to run atlas in a project with a build.gradle.kts and let it read your modules, coroutines, and Gradle configuration.

## What is Atlas's explore subagent and why is it read-only?

Atlas's explore subagent is delegated through the task tool for wide sweeps and is defined with a deny-by-default permission set that allows only 6 tools: grep, glob, read, bash, webfetch, and websearch. It can look around a Kotlin repo exhaustively without being able to change a single .kt file.

Onboarding fan-out is expensive in context and cheap in risk, which is exactly the shape a subagent should have. Atlas fans out work to subagents that can run in the foreground or in parallel background sessions, and the explore subagent is the one built for reconnaissance. Its allowlist is grep, glob, read, bash, webfetch, and websearch, and everything else is denied by default, so an exploration of a Kotlin monorepo cannot become an edit. Every Atlas tool call is permission-gated against allow, ask, and deny rules before it runs, and the explore subagent's deny-by-default set is that mechanism applied at the agent level.

## How do you follow imports through a Kotlin codebase with Atlas?

Atlas reads the 2 or 3 files codebase_search ranked highest, then follows imports with the lsp tool's goToDefinition operation. In Kotlin, goToDefinition is what resolves an extension function or an interface method to the actual implementation, which an import statement alone will never tell you.

Kotlin's language features are precisely the ones that break naive navigation. An extension function is declared far from the type it extends. An interface method resolved through dependency injection has no textual link to its implementation. A coroutine launched on a dispatcher runs code the call site never names. The lsp tool's goToDefinition operation walks the symbol graph and lands on the real declaration. Atlas searches code with hybrid semantic and keyword retrieval fused by reciprocal rank fusion, so the class name you half-remember and the behavior you are describing both pull the right Kotlin file up the ranking.

## How do you keep what you learned about a Kotlin repo from evaporating?

Record what you learned as an Atlas todowrite list. After an onboarding pass over a Kotlin repo, the open questions, for example which module owns the JUnit 5 integration tests or why :core-network depends on :data, survive into the next turn instead of being lost when the context resets.

Onboarding produces two outputs: understanding, which lives in your head, and open questions, which do not. The todowrite list is where the second one goes. Recording that you still do not know how the Gradle test task is wired, or which module ktlint is configured for, means the next session starts from those questions rather than rediscovering them. From there the ordinary Kotlin workflow resumes: run JUnit 5 via gradle test to see the suite, run ktlint to see the formatting rules the repo actually enforces, and ask Atlas to convert callbacks to coroutines or add tests, reviewing the diff.

## Steps

1. Run atlas in a Kotlin project that has a build.gradle.kts, so Atlas can read your modules, coroutines, and Gradle configuration.
2. Ask codebase_search a plain-language question, for example how requests are authenticated; it queries the semantic index and returns ranked snippets with file paths.
3. Run glob on the top-level directories to see the settings.gradle.kts, the per-module build.gradle.kts files, and the src/main/kotlin package layout before opening anything.
4. Read the two or three files codebase_search ranked highest with the read tool, rather than opening every .kt file in the module.
5. Follow imports with the lsp tool's goToDefinition operation, which resolves Kotlin extension functions and interface methods to their real implementations.
6. Delegate wide sweeps to the explore subagent through the task tool: it is defined with a deny-by-default permission set that only allows grep, glob, read, bash, webfetch, and websearch, so it cannot edit anything.
7. Run JUnit 5 via gradle test to see which suites the repo actually runs, and run ktlint to learn the formatting rules the team enforces.
8. Record what you learned and what you still do not know as a todowrite list, so the open questions survive into the next turn.

## FAQ

### how to quickly understand a large multi-module kotlin codebase

Start with meaning. Ask Atlas's codebase_search a plain-language question such as how requests are authenticated; it queries the semantic index and returns ranked snippets with file paths. Then run glob to map the Gradle module layout and read only the two or three files that ranked highest.

### can an AI agent explore my kotlin repo without changing anything

Yes. Atlas's explore subagent, delegated through the task tool, is defined with a deny-by-default permission set that only allows grep, glob, read, bash, webfetch, and websearch. It can sweep a Kotlin monorepo exhaustively and still be structurally unable to edit a .kt file.

### how do i find the implementation behind a kotlin interface or extension function

Use the lsp tool's goToDefinition operation. Kotlin extension functions are declared far from the types they extend, and DI-wired interface methods have no textual link to their implementations, so goToDefinition walking the symbol graph is what resolves them.

### what should i look at first in an unfamiliar gradle kotlin project

The settings.gradle.kts and the per-module build.gradle.kts files. Atlas's glob tool surfaces them in one pass, and the dependency declarations tell you the module boundaries the team actually enforces, which is stronger information than most documentation.

### does atlas keep notes across turns while onboarding

Atlas records what you learned as a todowrite list, so open questions such as which module owns the JUnit 5 integration tests survive into the next turn instead of being lost when the context resets.

### can atlas run subagents in parallel to explore a codebase

Atlas fans out work to subagents that can run in the foreground or in parallel background sessions. The explore subagent is the read-only one for reconnaissance, and it is delegated through the task tool with a deny-by-default permission set.

### does codebase_search work if i do not know the kotlin class names

That is the case it is built for. codebase_search queries a semantic index rather than matching text, so a plain-language question returns candidate Kotlin declarations even when your words do not appear in the source. Atlas indexes by AST declarations using tree-sitter.

### does atlas understand kotlin coroutines and gradle builds

Atlas is documented for use with Kotlin across Gradle builds and coroutine-based code. Run atlas in a project with a build.gradle.kts, let it read your modules, coroutines, and Gradle configuration, then ask it to convert callbacks to coroutines or add tests and review the diff.

---

Canonical HTML: https://runatlas.sh/resources/stacks/onboard-to-an-unfamiliar-codebase-in-kotlin
Source of truth: aeo_pages row `/resources/stacks/onboard-to-an-unfamiliar-codebase-in-kotlin` (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.
