A just-installed pack ships seed content — generic AGENTS.md, generic docs/CHARTER.md, generic governance shapes — that needs to be tailored to your actual project's name, stack, and existing conventions. The adapt-to-project skill (shipped in core) walks you through the tailoring with per-item approval. This page explains what the skill does, what answers it asks of you, and how greenfield and brownfield repos differ.
- The
corepack installed in your target repo (or under user scope for user-scope packs). - An
.adapt-install-marker.tomlat the install's scope root — written automatically by every supported install route. The next session-start hook surfaces a nudge to run the skill.
In Claude Code or any agent harness that loads skills:
/adapt-to-project
The skill is the LLM-judgment layer on top of the deterministic agentbundle adapt CLI; the two work together — the CLI handles substitution and companion bookkeeping, the skill handles the non-mechanical decisions (which existing file matches which pack-canonical path, what to do with overlapping shapes, etc.).
Re-invoke any time. The skill dedupes against prior declines, surfaces only what's unresolved, and exits clean when nothing remains.
A fresh repo has nothing to merge against, so adaptation is mostly substitution into the seed AGENTS.md, docs/CHARTER.md, and docs/CONVENTIONS.md. Have these answers ready before you start:
- Project name and a one-line description of what it does and for whom
install,test,lint,build, andruncommands for your stack- A sentence or two on what's in and out of scope (for
docs/CHARTER.md)
The skill walks each <adapt:NAME> marker one at a time; you approve, edit, or skip. Skipped markers come back the next time you invoke the skill.
Your repo already has conventions, so the skill walks four classes of change with per-item approval — not just substitution:
- Substitution. Same
<adapt:NAME>markers as greenfield, but the values usually already exist in yourREADME,package.json, orMakefile; the skill proposes pulling them in. - Companion merges. For each
*.upstream.<ext>file the install left on disk, the skill proposes a merged result against your existing file. Per-file accept, edit, skip, or decline. - Discovery + restructuring. Non-canonical primitives elsewhere in your tree — a
DESIGN.mdat root, a straydocs/architecture.md— get matched against pack-canonical paths (docs/CHARTER.md,docs/architecture/overview.md). Per-finding accept, edit, or decline. - Within-layout consolidation. Overlapping shapes — your
docs/howto/vs. the diátaxis pack'sdocs/guides/how-to/— get folded together per your call.
The skill's class-2 Companion merges walk depends on *.upstream.<ext> files being on disk. The three install routes differ in when those appear:
| Route | When companions appear |
|---|---|
agentbundle install (CLI) |
At install time — the CLI drops them on every Tier-2 collision. |
apm install |
Not at install. Run agentbundle init-state to record a baseline; the next agentbundle upgrade produces companions on Tier-2 collisions. |
/plugin install (Claude Code) |
Same as APM — agentbundle init-state first, then companions surface on agentbundle upgrade. |
The class-2 walk is a no-op if no companions are on disk; the other three classes (substitution, discovery, consolidation) run on every invocation regardless.
Skipped markers don't disappear. The skill records skips against
.adapt-discovery.tomlso re-invocations don't pester you about the same one, but they're not declined — re-invoke explicitly with the skip cleared to revisit.
The skill does not write outside the install scope. Repo-scope invocations confine writes to the repo root; user-scope invocations confine to the scope's user root. A misconfigured marker pointing outside scope is rejected, not silently followed.
docs/specs/adapt-to-project/spec.md— the authoritative spec (LLM skill + CLI split, marker formats, exit conditions).- How to upgrade an installed pack — companion merges from upgrades flow through this skill too.
- RFC-0001 § Adopter file safety contract — the guarantee the skill relies on (Tier-2 files survive install and upgrade).