Adopt Elide in an existing project

Migrate a Java, Kotlin or Spring Boot project to Elide with an AI coding harness.

elide adopt starts an AI coding harness with a migration prompt for the project in the current directory. The harness edits files; Elide does not. Other languages in the project are kept.

What works today

These shapes pass elide install, elide build, elide test, startup, and the original build, starting from a fresh checkout:

Project shapeExisting buildTested on
Java, Spring Boot applicationMavenSpring Petclinic: dependencies, resources, tests, runnable app, JAR
Java, Spring Boot serviceGradleSpring REST service: dependencies, resources, tests, HTTP readiness
Kotlin/JVM command-line appGradle Kotlin DSLSingle module with Kotlin serialization and coroutines

The prompt is tested with Codex. Multi-module, Android, and unusual generated-source or annotation-processing setups are untested.

Before you start

  1. Install and sign in to a harness:

    ChoiceExecutableHarness
    codexcodexOpenAI Codex CLI
    claudeclaudeClaude Code
    ompompOMP
  2. Commit the project, so the migration is one reviewable diff.

  3. Build it once with Maven or Gradle, so there is a known-good baseline.

Interactive adoption

elide adopt

Elide asks three questions, then starts the harness.

Choose a build strategy

StrategyHarness does
Elide buildWrites elide.pkl, switches to elide build, and validates with Elide. Maven or Gradle files stay until that passes.
Existing buildKeeps Maven or Gradle; adopts Elide runtime and toolchain commands only.

For a Spring Boot app built with Elide, choose Elide build; the prompt checks the entry point, Spring dependencies and plugins, resources, tests and packaging.

Choose a harness

Choose codex, claude or omp. Elide prints the path of the harness log before starting, then shows a status display. --log also streams the harness output; manual approval always streams it.

Success means the harness exited 0, not that the migration is correct.

Append Markdown guidance to the prompt; repeat the flag to add fragments in order:

elide adopt --prompt-append ./adoption-guidance.md

Choose an approval mode

ModeBehaviorUse for
auto-approveThe harness’s automatic approval; its sandbox rules apply.A committed worktree you will review.
manual-approveYou approve each action.Unfamiliar or sensitive repositories.
yoloBypasses the harness’s approvals and sandbox where it can.Disposable environments without secrets.

Cancelling a question exits without starting the harness. Ctrl+C stops the harness, keeps the log, and exits 130.

Run without questions

elide adopt \
  --build elide \
  --harness codex \
  --approval auto-approve \
  --non-interactive

--non-interactive requires --build, --harness and --approval (auto-approve or yolo). Without it, preset answers skip their questions:

elide adopt --build elide --harness claude

Validate the migration

Review the diff: dependency versions, source and resource directories, entry point, tests and packaging. Then run:

elide install
elide build
elide test

Run the original Maven or Gradle build too, while it exists. If the result is wrong, read the log, revert, and retry with a --prompt-append file.