/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.
| 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.
It searches upward from your working directory for a .github directory, then collects two
kinds of file:
copilot-instructions.md — repo-wide instructionsinstructions/*.instructions.md — path-scoped instructions, read in sorted orderPath-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.
/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:
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.
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.
/init — guided AGENTS.md setup for a project with no existing instructionsAGENTS.md,
since skills load on demand rather than occupying context on every turn