/adopt

Migrate another AI coding agent's instructions into AGENTS.md

What it does

/adopt <agent> finds another AI coding tool's instruction files in your project, reads them, and reconciles them into a single AGENTS.md that LatentCode uses.

/adopt copilot

Use it once when moving a repository over from another agent, so the conventions your team already wrote down aren't lost.

Supported sources

Source Aliases Files it looks for
copilot github-copilot, gh-copilot .github/copilot-instructions.md, .github/instructions/*.instructions.md

Passing /adopt with no argument, or an unsupported name, prints the supported list rather than doing anything.

How discovery works

It searches upward from your working directory for a .github directory, then collects two kinds of file:

Path-scoped files carry an applyTo glob in their front-matter. That scope is preserved and passed through, so a rule that only applied to src/api/** doesn't silently become a repo-wide rule.

AGENTS.md is written next to the .github directory that was found — not at the workspace root. For a non-git project the root can be /, and writing there would be dangerous.

It's a real model turn, not a file copy

/adopt doesn't concatenate files. It hands the discovered sources to the model with a merge prompt, and the model reconciles them — deduplicating overlapping rules, resolving conflicts between repo-wide and scoped instructions, and rewriting them into AGENTS.md conventions.

Two consequences:

If nothing is found

You get a notice naming exactly what it looked for:

No copilot instructions found (looked for .github/copilot-instructions.md
or .github/instructions/*.instructions.md).

Nothing is written, and no model call is made.

After adopting

AGENTS.md is loaded into the system context on every turn from then on. If you'd rather write one from scratch than migrate an existing config, run /init for guided setup.

Related