Approved catalog listing
SKILL #4054
skillshunter.net
Listing Approved Approved on: December 1, 2026

Adopt

Bring a repo up to date with the dotfiles conventions, one pending version at a time.

Rate this skill

No ratings yet

Editor's Note

The user must ensure that the repo is a valid Git repository and that all symlinks and Git settings resolve correctly before running `/adopt`. The first deliverable is the updated `.claude/conventions` file, which records the latest convention version applied.

When to Use It

  • Updating a repository to align with current dotfiles conventions
  • Ensuring a repo meets convention requirements before committing changes
  • Resolving convention gaps in a forked project

SKILL.md

SkillsHunter provides this listing for informational purposes only. Review the skill’s source, license, and required permissions before use. You are responsible for deciding whether to install or run it. Terms of Use

↓ Download .md

Adopt

A convention defined in the dotfiles repo is a claim about every repo on this machine, and changing one leaves the rest in the old shape. Every change an already-conforming repo has to do something about ships as a numbered version: a folder of prose saying what changed, how to migrate an existing repo, when the migration is a no-op, and which continuing rule — if any — the version hands to the checker. This skill walks the versions this repo has not adopted, one at a time, and moves its number up by one for each.

A version is a migration, so the walk performs it. Most versions carry prose rather than a script, and reading that prose and doing what it says is the adoption. Where a migration deletes or rewrites a committed file, the README says what would be lost — show that and get a yes before running it. In an unattended walk the review of the local commit is that yes, as ## Unattended says.

The session-start notice that sends the user here is a systemMessage — it reaches their screen and never the transcript — so the gap is re-derived below rather than taken from what they pasted.

Context

  • Repo root: !git rev-parse --show-toplevel 2>/dev/null || echo "(not a git repo)"
  • This repo, commits it is behind its push target: !git fetch -q "$(git for-each-ref --format='%(push:remotename)' "$(git symbolic-ref -q HEAD)")" 2>/dev/null || echo "(fetch failed — what follows compares against the last fetch that worked)"; git -c push.default=current log --oneline HEAD..@{push} 2>/dev/null || echo "(no push target on the remote)"; echo "(end of list)"
  • Dotfiles checkout, commits it is behind its upstream: !git -C ~/.claude/skills fetch -q 2>/dev/null || echo "(fetch failed — what follows compares against the last fetch that worked)"; git -C ~/.claude/skills log --oneline HEAD..@{upstream} 2>/dev/null || echo "(no upstream configured)"; echo "(end of list)"
  • Record file ignored by: !git check-ignore -q "$(git rev-parse --show-toplevel 2>/dev/null)/.claude/conventions" && git check-ignore -v "$(git rev-parse --show-toplevel 2>/dev/null)/.claude/conventions" || echo "(not ignored — the record will be tracked, unless Repo root above says this is not a repo at all)"
  • Install check: !python ~/.claude/hooks/check-install.py 2>&1 | grep FAIL || echo "(every symlink and git setting resolves)"
  • Conventions status: !python ~/.claude/conventions/engine.py status "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" 2>&1

The dotfiles line reaches the checkout through ~/.claude/skills because that link is live by construction — this file was loaded through it — and ~/.claude/conventions is the same working tree seen through a second link.

Two of those lines have a trap in them, and both are why they are written the way they are. A commit line appearing above (end of list) is the only thing that means behind — an empty git log and a fetch that failed print the same nothing otherwise, so offline would read as up to date. And the ignore line asks check-ignore -q for the yes-or-no, using -v only to explain it: the -v form exits 0 on a negated pattern, printing !.claude/conventions as the matching rule for a file it is reporting as not ignored, so a record correctly re-included by the fix below would otherwise read as still hidden and every later run would loop on a .gitignore that is already right.

The repo line compares against the branch this clone pushes to, because the other machine's pushes are what the gate exists to catch, and in a triangular fork @{upstream} is the third-party project instead. The named-remote fetch and -c push.default=current both come from ~/.claude/learnings/git-fork-push-target.md, which holds the measurement and the reasons; change the recipe there and here together.

What the number means

The record is <repo>/.claude/conventions — committed, one integer on its own content line. vN says every migration up to and including N was performed here, in ascending order, by a session that read it. Four things it deliberately does not say:

  • That the repo still conforms. A property that has to hold continuously is a rule, re-measured by ~/.claude/conventions/check.py — which the repo's commit gate runs, and which this walk runs too. The number is history; the checker is the present tense.
  • That every version applied. A version whose ## When it does not apply is satisfied here ran to a no-op, and the number advances just the same. There is no n/a: an exception to a convention belongs in the convention, written into that section and re-evaluated in every repo, not remembered per repo as a line nobody re-reads.
  • That every version was performed, in a fork. A fork — origin is the user's, the upstream remote is someone else's — may decline a version whose README frontmatter says optional: forks. The record then carries decline <n> <reason> below the number, and the checker runs none of that version's rules. The convention still decides where the choice exists; the fork only answers it. Everywhere else, and for every version not marked that way, there is no decline.
  • That the rules it brought in are the only ones running here. The number decides the versioned rules and nothing else: one introduced by v7 starts running when the number reaches 7. Beside them, ~/.claude/conventions/universal/ holds the rules no version gates — they run in every repo whatever its number, an exempt one included, and they fail the commit gate exactly as a versioned rule does. That directory is the smaller half on purpose, because a rule added to it reaches every repo the moment it is committed, with no adoption in between; a property a repo can adopt belongs in a version instead.

A repo that must never adopt carries exempt <reason> on that content line instead of a number. A clone of someone else's project — origin owned by another account — adopts nothing and records nothing, with no file needed; a fork is not a clone and adopts like any other repo of the user's.

What can never carry a version at all — agent behaviour, code content, an unbounded property, a global setting — is enumerated in ~/.claude/conventions/not-versioned.md. Read it when the user asks what "current" covers, so the answer is "every versionable convention has been adopted" rather than "everything in CLAUDE.md is satisfied here".

Unattended

An unattended walk, started as /adopt unattended, is for a walk nobody is watching. Without that argument the walk runs as everything below describes. With it, the walk differs in these places, and this list is the one statement of them that authoring.md and docs/convention-versions.md point to:

  • Each pending version's asks: line, printed under it in Conventions status, says whether its migration needs the user. never walks on. always stops before the version, unless its ## When it does not apply holds or the repo is already in its shape (sub-steps 2 and 3), which need nobody. when <case> stops only where that case holds in this repo: settle it with the evidence the README asks for, exactly as an attended walk would before putting the question.
  • A stop is a report, not a question. Record nothing for the stopping version and leave its tree untouched: undo any part of its migration already made, because a half-applied migration commits as if done. Commit the versions adopted before it through §4, then end with the README's question verbatim, the stock-take sub-step 4 would have shown beside it, and the case from asks: that held. The walk ends there; the user's answer comes through a later attended /adopt.
  • A rewrite or deletion of a committed file needs no yes. The commit is local and reviewed before any push, so the review is the yes. List each such change in the report with what the README says it loses. A file git does not track, such as v17's per-machine wrapper, is not covered: git cannot give it back, so deleting one stops the walk as a question does, whatever asks: says. The exception is a file the README names as holding nothing the migration did not already carry elsewhere, such as v17's standard pass-through wrapper: delete it and name it in the report. Editing an untracked file in place, such as v15 and v17 trimming the per-machine config/deploy.env, is not a stop, but git cannot undo it either: list each such edit in the report with the lines it removed, so a later stop can restore them by hand.
  • A fork's decline offer (sub-step 2) is a question, so a version marked optional for forks whose migration applies in a fork stops the walk.
  • Anything the walk would need the screen for, such as a relaunch Taking Over the Machine covers, is a stop where an attended walk would ask, unless the README says what an unattended walk does instead, as v17 step 6 does by filing a memo for the relaunch.
  • An asks: line that proves wrong in this repo (the README asks something its when case does not name) is a stop where an attended walk would simply ask. Say so in the report, because the line is fixed in the dotfiles repo.

A §3 failure stops an unattended walk just as it stops an attended one.

0. Gates, before anything is read or run

  • Not a git repo — if Repo root says so, stop. A record written here would be a file nothing tracks, in a directory no clone ever sees, and the engine would report it as written. Three real project directories on this machine have no .git at all, which is why the session-start notice says so rather than staying silent — and that notice is the most likely reason someone typed /adopt here. Offer git init as its own decision, not as part of this walk.
  • This repo behind its push target — if This repo, commits it is behind its push target shows any commit line above (end of list), propose the sync and stop. A migration that deletes a file the other machine just appended to merges cleanly and loses the append silently; that near-loss is written up in ~/.claude/learnings/git-stash-pull-safety.md, and the tree is dirty by premise here, so follow that file rather than reaching for git pull --rebase.
  • A repo cloned on two machines gets one walk, not two. These repos are worked from both machines, so a repo behind on conventions is behind in both clones, and the session-start notice fires in both. Two walks from the same base migrate the same files twice and write two records claiming the same number — the conflict §4 ends with. The machine the user typed /adopt in walks; the other clone takes the result through /pull, which is work for the session that owns it and never for this one. Before walking, find out whether that clone already is: /repo-status reports both clones' convention records. It answers a different question from the behind-its-push-target gate, which is about commits and has already run by here. A peer clone already ahead on the record, or holding an uncommitted adoption, means stopping here and pulling instead. A peer that cannot be reached is not evidence of a second walk — say it went unmeasured, and walk.
  • The dotfiles checkout behind its upstream — if Dotfiles checkout, commits it is behind its upstream shows any commit line above (end of list), stop and propose pulling it. A walk run from a stale checkout records this repo as current against a latest that has already moved.
  • The record must be trackable — if Record file ignored by names a file, line and pattern, the record would be untracked and therefore worthless. Fix the repo's .gitignore first: a wholesale .claude/ exclusion becomes .claude/* plus explicit ! re-includes, because git cannot re-include a path underneath an excluded directory. Show the edit and apply it on a yes.
  • A dirty working tree is not a gate. Do not refuse on uncommitted changes and do not ask the user to stash them. Several repos hold a convention's work already done and never committed; the new number and that pending change commit together at §4, which is what makes them the best-verified case rather than a refusal.
  • Install check is report-only and never blocks. Mention any FAIL line it produced: a ~/.claude/hooks that is a copy rather than a link freezes the session-start notice forever, so this repo would go quiet about being behind without anything appearing to break.

1. Read the gap

Take the pending versions from Conventions status in Context — number, slug, title, and the rules each introduces.

  • An exempt line stops the run here. Report the reason it records. The exemption is from the versions and from nothing else: the universal rules are gated by no number, so they run in that repo too and its commit gate can still fail on one — say that, rather than leaving exempt to read as nothing being checked here.
  • A declined vN line names a version this fork chose not to take on. It is not pending, and the walk never re-offers it. If the user asks to take one on now, read its README as §2 does, perform the migration, and run engine.py adopt "<repo root>" <N> with that number: the engine accepts a declined version below the record, drops its decline line, and leaves the number where it is.
  • Status saying this record declines versions but no upstream remote is configured means a clone of a fork that never had the remote added — git does not commit remotes. The declines still hold. Before walking, tell the user, and ask for the upstream URL to add with git remote add upstream <url>, or a version this fork would have declined gets migrated here instead.
  • Nothing pending: say the repo is current and name the version it is current through. Then run python ~/.claude/conventions/check.py "<repo root>" anyway and report what it says, because current is a statement about migrations and the checker is the one that can still find something broken, including a universal rule that being current never covered.
  • A record naming a version above this checkout's newest one — status prints this as its own line — means the dotfiles repo here is behind the machine that wrote the record. Stop and propose pulling it. This is a different condition from §0's dotfiles gate, which compares the checkout with its own upstream and stays clean whenever the other machine pushed the repo but not the dotfiles.

2. Walk the pending versions, one at a time, ascending

One version per pass, in number order. Never batch them, never reorder them, and never start the next before the current one's number is recorded — a later migration may depend on what an earlier one wrote. The engine enforces the order anyway: adopt and decline take only the current number plus one, the one exception being a declined version taken on later, which §1 describes.

  1. Read the version's README in full first — ~/.claude/conventions/versions/<NNN-slug>/README.md, every heading, before touching anything. Its four sections are what the rest of this pass runs on: what changed and why, how to migrate an existing repo, when the migration is a no-op here, and the continuing rule the version hands to the checker.

  2. Settle ## When it does not apply, with the positive evidence it asks for. Name the command you ran or the file you read and show what came back; "nothing found" and "nothing looked at" must not read the same (~/.claude/memory/feedback_not_run_is_not_pass.md). If none of its conditions holds, the migration applies here — continue. If one does, change nothing and go to sub-step 5.

    In a fork, ask about a version marked [optional for forks] before migrating it. Status prints a fork of <owner>'s project when this repo is one, and tags each such version in the pending list. Only where the migration applies — a no-op needs no decision — ask the user whether this fork takes it on or declines it, saying what the migration would change here and that declining keeps the fork closer to its upstream. Ask in plain text, for the same reason sub-step 4 gives. A decline takes the user's reason in their words and goes straight to sub-step 5's decline form; nothing is migrated.

  3. Check whether the repo is already in the target shape. Work done by hand, or on the other machine days ago, is common, and the answer is the same as a no-op: change nothing and go to sub-step 5. Say which of the two it was, since "already in this shape" and "does not apply here" are different facts that leave the same empty diff.

  4. Do the migration.

    • Where the README carries a question, take stock of what the repo holds that bears on it, then put it to the user verbatim with those findings beside it — or, in an unattended walk, end the walk with both as ## Unattended describes. Look wherever the README says to look, and show what you found and where. The question itself stays unedited and unsummarised, with nothing added but the repo's name if that is not already obvious. Ask it in plain text below the findings, not through AskUserQuestion, whose box covers the text above it (~/.claude/memory/feedback_link_inside_the_question.md). The findings are evidence, never an answer: a question exists precisely because no file can settle it, so a plausible answer read off the surrounding repo is the guess ~/.claude/memory/feedback_surface_the_gap_dont_fill_it.md forbids. The stock-take lets the user answer from what the repo actually has rather than from memory. If their answer amounts to "not here", treat it as sub-step 2's no-op and say so — their reason is stored nowhere, so if it would hold for every repo it belongs in that version's ## When it does not apply or in a later version, which is work in the dotfiles repo and its own session's task. Offer a memo for it. If their answer is that it applies and they do not want it done, that is a §3 stop — unless this is a fork and the version is marked optional for forks, where it is the decline sub-step 2 describes.
    • Where the folder carries an apply.py, run it rather than doing the work by hand — python ~/.claude/conventions/versions/<NNN-slug>/apply.py "<repo root>". It exists because the work is mechanical and tedious, it prints what it did, and it exits non-zero on any line it cannot classify, which is a §3 stop with the tree left as it found it.
    • Otherwise perform it yourself, following the README's named files and transformation. Where it deletes or rewrites a committed file, show what would be lost and how to compare against the diff, and get a yes before doing it. Ordinary additions need no ceremony — do them and show the result.
    • Then run the README's own after-the-migration check and report what it returned.
  5. Advance the number by one: python ~/.claude/conventions/engine.py adopt "<repo root>" <N>. It refuses to lower the number, to skip one, or to go above the newest version in this checkout, and a refusal is a §3 stop rather than something to work around. A version the fork declined advances with python ~/.claude/conventions/engine.py decline "<repo root>" <N> <reason> instead, which also refuses outside a fork and for a version not marked optional.

  6. Run the checker: python ~/.claude/conventions/check.py "<repo root>". Exit 0 is done; exit 1 — a violation or a rule that could not be measured — is a §3 stop, except for the one kind of finding the Findings this walk did not cause heading below carves out. It runs after the number moves because it runs the versioned rules introduced at or below the adopted version, so the rule this version brings in is unmeasurable until the record names it. That order is safe in the direction that matters: the number only ever claims the migration ran, and this repo's commit gate re-runs the same checker, so a half-done migration cannot reach a commit. Report which rules ran — the header counts them as X rule(s) taken on, Y universal and every finding is labelled <name> (v7) or <name> (universal), so a version whose ## Continuing rule says None adds nothing to the first count, and that count is how you can tell.

Findings this walk did not cause

Only a finding numbered above the version this walk started from says the migration just performed is incomplete. The other two kinds were already failing in this repo before /adopt was typed, and they are not read the same way.

A finding labelled (universal) is a §3 stop. Those rules are gated by no version, so adopting nothing would have left it failing just the same, and the walk cannot clear it: the remedy is a command that can reach outside the repo's tree — this machine's project-memory cache link is the case that exists today — so running it is the user's decision rather than a step of the walk. Report the fix: line printed under the finding verbatim.

A finding numbered at or below the walk's starting number is not a stop. That rule was entitled to run before the walk began, so the finding predates it, and the thing that clears it may be a version still pending in this very walk: v13 is written to delete the project /tmp/ line that v2's gitignore-scope-global reports, so a repo at v11 carrying that line meets the finding the moment v12 records its number — before the remedy is reachable. Stopping there cannot be right, because the stop forbids the one version that fixes it. Carry on to the next version, say in the report that you did and which finding you carried, and read the checker again after each one. It becomes the stop only if it still stands once the last pending version is done; name it then with whatever printed it, and say the walk completed with the gate still refusing for a reason older than the walk. Nothing is skipped by this — the version just recorded was performed in full — so §3's reason for refusing a skip does not reach it.

3. The first failure stops the run

A migration you cannot complete, an apply.py exiting non-zero, an adopt or decline refusal, a check.py exit 1 that Findings this walk did not cause does not carve out, or a user who wants the convention's work not done where no decline is on offer — any of these ends the walk. Leave the tree exactly as it is, name the failing items whatever printed them reported, and say which versions were adopted before it. Do not skip the failing version and carry on with the next: later migrations may depend on it, and the engine will refuse the skip regardless. The repo stays behind at that number, and the session-start notice keeps saying so, which is the pressure working rather than a gap being filed away.

4. Commit the walk

One commit for the whole walk, subject:

chore(conventions): adopt through vN

N is the new number — re-run engine.py status to read it rather than counting the versions you walked. The record and whatever the migrations changed in the working tree commit together: run the repo's gate first (python3 ~/.claude/skills/shared/gate_pushed_tree.py --caller adopt --record), write the subject to a file under tmp/, and commit every path git status --short lists that the walk changed with python3 ~/.claude/skills/shared/commit.py -F <file> <paths…>, which checks the message, scans what the commit adds and signs it. Nothing here commits any other way.

Leave the push to the user's next /yolo or /wrap-up; its push step asks the other machine's session to /pull, which is how that clone takes this walk. What that session must not do is run /adopt: its own session-start notice was derived before the pull arrived and will still report a convention gap, which is the one thing that turns this into the record conflict this section ends with.

Two things to say once the walk is over. If this repo's .claude/commit-checks.sh does not run check.py, the rules this walk just took on were measured by the walk and by nothing since, and the universal rules with them — say so rather than leaving "adopted" to read as "checked from here on". And if the record file conflicts on a later pull, both machines walked from the same base: keep the higher number, whose migrations are all present in the merged tree. Decline lines need one more look, since one machine may have declined a version the other performed: keep a decline only where the merged tree does not carry that version's migration, and ask the user where you cannot tell.

There is no audit step

Re-checking is only meaningful for a property that has to keep holding, and such a property must not be sampled by a command someone has to remember to run. That half is the commit gate's: check.py measures every rule the repo's number entitles it to and every universal rule beside them, on every commit, and reports a rule it could not measure as unmeasured rather than as a pass. Nothing re-derives a migration afterwards, because a migration is not a standing claim — it ran, and the number says how far.

Out of scope

  • Never touch another repository. The session running in a repo is the only one that may commit there. A repo found behind is reported, never adopted from here.
  • Do NOT walk the same versions in another machine's clone of this repo, and do NOT drive that clone from here. It takes this walk's commit through /pull.
  • Do not author a new convention version. That happens in the dotfiles repo, in the session that is changing the convention itself, not in the one adopting it here.
  • Do not edit a shipped version's README or its apply.py to make this repo pass. A version folder is shared by repos that run it at different times, so editing one gives two repos different behaviour under one number; a convention that is wrong is corrected by a later version. A fix to how a rule detects something is different — that belongs in the rule file, under rules/ or universal/, where it applies everywhere at once.
  • Do not hand-write, or lower, the record file. The engine's adopt and decline are the only writers, and one version at a time is what keeps the number from claiming a migration nobody read.
  • Do not create the artifact a version's ## When it does not apply says is absent — an empty .claude/memos/, a guessed LICENSE, an invented engines.node. The no-op is the version working correctly.
View original Markdown
---
name: adopt
description: >-
  Bring a repo up to date with the dotfiles conventions, one pending version at a time.
  TRIGGER when: the user runs /adopt; a session-start message says this repo is N versions behind or has
  no convention record; or the user asks where it stands on the conventions.
  DO NOT TRIGGER when: authoring a new convention version, or in a third-party clone.
allowed-tools: Read, Write, Edit, Glob, Grep, AskUserQuestion, Skill, Bash(echo *), Bash(git rev-parse:*), Bash(git fetch:*), Bash(git log:*), Bash(git status:*), Bash(git check-ignore:*), Bash(git show:*), Bash(git ls-files:*), Bash(git diff:*), Bash(git -C ~/.claude/skills:*), Bash(python ~/.claude/conventions/engine.py:*), Bash(python3 ~/.claude/skills/shared/commit.py:*), Bash(python ~/.claude/skills/shared/commit.py:*), Bash(python3 ~/.claude/skills/shared/gate_pushed_tree.py:*), Bash(python ~/.claude/skills/shared/gate_pushed_tree.py:*), Bash(python ~/.claude/conventions/check.py:*), Bash(python ~/.claude/conventions/versions/:*), Bash(python ~/.claude/hooks/check-install.py:*)
---

# Adopt

A convention defined in the dotfiles repo is a claim about every repo on this machine, and changing one
leaves the rest in the old shape. Every change an already-conforming repo has to *do something* about
ships as a numbered **version**: a folder of prose saying what changed, how to migrate an existing repo,
when the migration is a no-op, and which continuing rule — if any — the version hands to the checker.
This skill walks the versions this repo has not adopted, one at a time, and moves its number up by one
for each.

A version is a migration, so the walk performs it. Most versions carry prose rather than a script, and
reading that prose and doing what it says *is* the adoption. Where a migration deletes or rewrites a
committed file, the README says what would be lost — show that and get a yes before running it. In an
unattended walk the review of the local commit is that yes, as `## Unattended` says.

The session-start notice that sends the user here is a `systemMessage` — it reaches their screen and
never the transcript — so the gap is re-derived below rather than taken from what they pasted.

## Context
- Repo root: !`git rev-parse --show-toplevel 2>/dev/null || echo "(not a git repo)"`
- This repo, commits it is behind its push target: !`git fetch -q "$(git for-each-ref --format='%(push:remotename)' "$(git symbolic-ref -q HEAD)")" 2>/dev/null || echo "(fetch failed — what follows compares against the last fetch that worked)"; git -c push.default=current log --oneline HEAD..@{push} 2>/dev/null || echo "(no push target on the remote)"; echo "(end of list)"`
- Dotfiles checkout, commits it is behind its upstream: !`git -C ~/.claude/skills fetch -q 2>/dev/null || echo "(fetch failed — what follows compares against the last fetch that worked)"; git -C ~/.claude/skills log --oneline HEAD..@{upstream} 2>/dev/null || echo "(no upstream configured)"; echo "(end of list)"`
- Record file ignored by: !`git check-ignore -q "$(git rev-parse --show-toplevel 2>/dev/null)/.claude/conventions" && git check-ignore -v "$(git rev-parse --show-toplevel 2>/dev/null)/.claude/conventions" || echo "(not ignored — the record will be tracked, unless Repo root above says this is not a repo at all)"`
- Install check: !`python ~/.claude/hooks/check-install.py 2>&1 | grep FAIL || echo "(every symlink and git setting resolves)"`
- Conventions status: !`python ~/.claude/conventions/engine.py status "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" 2>&1`

The dotfiles line reaches the checkout through `~/.claude/skills` because that link is live by
construction — this file was loaded through it — and `~/.claude/conventions` is the same working tree
seen through a second link.

Two of those lines have a trap in them, and both are why they are written the way they are. A
commit line appearing above `(end of list)` is the only thing that means behind — an empty `git
log` and a `fetch` that failed print the same nothing otherwise, so offline would read as up to
date. And the ignore line asks `check-ignore -q` for the yes-or-no, using `-v` only to explain it:
the `-v` form exits **0 on a negated pattern**, printing `!.claude/conventions` as the matching
rule for a file it is reporting as *not* ignored, so a record correctly re-included by the fix
below would otherwise read as still hidden and every later run would loop on a `.gitignore` that is
already right.

The repo line compares against the branch this clone pushes to, because the other machine's pushes
are what the gate exists to catch, and in a triangular fork `@{upstream}` is the third-party project
instead. The named-remote fetch and `-c push.default=current` both come from
`~/.claude/learnings/git-fork-push-target.md`, which holds the measurement and the reasons; change the
recipe there and here together.

## What the number means

The record is `<repo>/.claude/conventions` — committed, one integer on its own content line. `vN` says
every migration up to and including N was performed here, in ascending order, by a session that read it.
Four things it deliberately does not say:

- **That the repo still conforms.** A property that has to hold *continuously* is a rule, re-measured by
  `~/.claude/conventions/check.py` — which the repo's commit gate runs, and which this walk runs too. The
  number is history; the checker is the present tense.
- **That every version applied.** A version whose `## When it does not apply` is satisfied here ran to a
  no-op, and the number advances just the same. There is no `n/a`: an exception to a convention belongs
  *in* the convention, written into that section and re-evaluated in every repo, not remembered per repo
  as a line nobody re-reads.
- **That every version was performed, in a fork.** A fork — `origin` is the user's, the `upstream` remote
  is someone else's — may decline a version whose README frontmatter says `optional: forks`. The record
  then carries `decline <n> <reason>` below the number, and the checker runs none of that version's
  rules. The convention still decides where the choice exists; the fork only answers it. Everywhere else,
  and for every version not marked that way, there is no decline.
- **That the rules it brought in are the only ones running here.** The number decides the versioned rules
  and nothing else: one introduced by v7 starts running when the number reaches 7. Beside them,
  `~/.claude/conventions/universal/` holds the rules no version gates — they run in every repo whatever
  its number, an exempt one included, and they fail the commit gate exactly as a versioned rule does.
  That directory is the smaller half on purpose, because a rule added to it reaches every repo the moment
  it is committed, with no adoption in between; a property a repo can adopt belongs in a version instead.

A repo that must never adopt carries `exempt <reason>` on that content line instead of a number. A clone
of someone else's project — `origin` owned by another account — adopts nothing and records nothing, with
no file needed; a fork is not a clone and adopts like any other repo of the user's.

What can never carry a version at all — agent behaviour, code content, an unbounded property, a global
setting — is enumerated in `~/.claude/conventions/not-versioned.md`. Read it when the user asks what
"current" covers, so the answer is "every versionable convention has been adopted" rather than
"everything in CLAUDE.md is satisfied here".

## Unattended

An unattended walk, started as `/adopt unattended`, is for a walk nobody is watching. Without that
argument the walk runs as everything below describes. With it, the walk differs in these places, and
this list is the one statement of them that `authoring.md` and `docs/convention-versions.md` point to:

- **Each pending version's `asks:` line**, printed under it in **Conventions status**, says whether its
  migration needs the user. `never` walks on. `always` stops before the version, unless its
  `## When it does not apply` holds or the repo is already in its shape (sub-steps 2 and 3), which need
  nobody. `when <case>` stops only where that case holds in this repo: settle it with the evidence the
  README asks for, exactly as an attended walk would before putting the question.
- **A stop is a report, not a question.** Record nothing for the stopping version and leave its tree
  untouched: undo any part of its migration already made, because a half-applied migration commits as
  if done. Commit the versions adopted before it through §4, then end with the README's question
  verbatim, the stock-take sub-step 4 would have shown beside it, and the case from `asks:` that held.
  The walk ends there; the user's answer comes through a later attended `/adopt`.
- **A rewrite or deletion of a committed file needs no yes.** The commit is local and reviewed before
  any push, so the review is the yes. List each such change in the report with what the README says it
  loses. A file git does not track, such as v17's per-machine wrapper, is not covered: git cannot give
  it back, so deleting one stops the walk as a question does, whatever `asks:` says. The exception is
  a file the README names as holding nothing the migration did not already carry elsewhere, such as
  v17's standard pass-through wrapper: delete it and name it in the report. Editing an
  untracked file in place, such as v15 and v17 trimming the per-machine `config/deploy.env`, is not a
  stop, but git cannot undo it either: list each such edit in the report with the lines it removed,
  so a later stop can restore them by hand.
- **A fork's decline offer** (sub-step 2) is a question, so a version marked optional for forks whose
  migration applies in a fork stops the walk.
- **Anything the walk would need the screen for**, such as a relaunch Taking Over the Machine covers,
  is a stop where an attended walk would ask, unless the README says what an unattended walk does
  instead, as v17 step 6 does by filing a memo for the relaunch.
- **An `asks:` line that proves wrong in this repo** (the README asks something its `when` case does
  not name) is a stop where an attended walk would simply ask. Say so in the report, because the line
  is fixed in the dotfiles repo.

A §3 failure stops an unattended walk just as it stops an attended one.

## 0. Gates, before anything is read or run

- **Not a git repo** — if **Repo root** says so, stop. A record written here would be a file nothing
  tracks, in a directory no clone ever sees, and the engine would report it as written. Three real
  project directories on this machine have no `.git` at all, which is why the session-start notice says
  so rather than staying silent — and that notice is the most likely reason someone typed `/adopt` here.
  Offer `git init` as its own decision, not as part of this walk.
- **This repo behind its push target** — if **This repo, commits it is behind its push target** shows any
  commit line above `(end of list)`, propose the sync and stop. A migration that deletes a file the other
  machine just appended to merges cleanly and loses the append silently; that near-loss is written up in
  `~/.claude/learnings/git-stash-pull-safety.md`, and the tree is dirty by premise here, so follow that
  file rather than reaching for `git pull --rebase`.
- **A repo cloned on two machines gets one walk, not two.** These repos are worked from both machines, so
  a repo behind on conventions is behind in both clones, and the session-start notice fires in both. Two
  walks from the same base migrate the same files twice and write two records claiming the same number —
  the conflict §4 ends with. The machine the user typed `/adopt` in walks; the other clone takes the
  result through `/pull`, which is work for the session that owns it and never for this one. Before
  walking, find out whether that clone already is: `/repo-status` reports both clones' convention
  records. It answers a different question from the behind-its-push-target gate, which is about commits and
  has already run by here. A peer clone already ahead on the record, or holding an uncommitted
  adoption, means stopping here and pulling instead. A peer that cannot be reached is not evidence of a
  second walk — say it went unmeasured, and walk.
- **The dotfiles checkout behind its upstream** — if **Dotfiles checkout, commits it is behind its
  upstream** shows any commit line above `(end of list)`, stop and propose pulling it. A walk run from a
  stale checkout records this repo as current against a `latest` that has already moved.
- **The record must be trackable** — if **Record file ignored by** names a file, line and pattern, the
  record would be untracked and therefore worthless. Fix the repo's `.gitignore` first: a wholesale
  `.claude/` exclusion becomes `.claude/*` plus explicit `!` re-includes, because git cannot re-include
  a path underneath an excluded directory. Show the edit and apply it on a yes.
- **A dirty working tree is not a gate.** Do not refuse on uncommitted changes and do not ask the user
  to stash them. Several repos hold a convention's work already done and never committed; the new number
  and that pending change commit together at §4, which is what makes them the best-verified case rather
  than a refusal.
- **Install check** is report-only and never blocks. Mention any `FAIL` line it produced: a
  `~/.claude/hooks` that is a copy rather than a link freezes the session-start notice forever, so this
  repo would go quiet about being behind without anything appearing to break.

## 1. Read the gap

Take the pending versions from **Conventions status** in Context — number, slug, title, and the rules
each introduces.

- An `exempt` line stops the run here. Report the reason it records. The exemption is from the versions
  and from nothing else: the universal rules are gated by no number, so they run in that repo too and its
  commit gate can still fail on one — say that, rather than leaving `exempt` to read as nothing being
  checked here.
- **A `declined vN` line** names a version this fork chose not to take on. It is not pending, and the
  walk never re-offers it. If the user asks to take one on now, read its README as §2 does, perform the
  migration, and run `engine.py adopt "<repo root>" <N>` with that number: the engine accepts a declined
  version below the record, drops its decline line, and leaves the number where it is.
- **Status saying this record declines versions but no `upstream` remote is configured** means a clone of a
  fork that never had the remote added — git does not commit remotes. The declines still hold. Before
  walking, tell the user, and ask for the upstream URL to add with `git remote add upstream <url>`, or a
  version this fork would have declined gets migrated here instead.
- Nothing pending: say the repo is current and name the version it is current *through*. Then run
  `python ~/.claude/conventions/check.py "<repo root>"` anyway and report what it says, because current
  is a statement about migrations and the checker is the one that can still find something broken,
  including a universal rule that being current never covered.
- **A record naming a version above this checkout's newest one** — status prints this as its own line —
  means the dotfiles repo here is behind the machine that wrote the record. Stop and propose pulling it.
  This is a different condition from §0's dotfiles gate, which compares the checkout with its own
  upstream and stays clean whenever the other machine pushed the repo but not the dotfiles.

## 2. Walk the pending versions, one at a time, ascending

One version per pass, in number order. Never batch them, never reorder them, and never start the next
before the current one's number is recorded — a later migration may depend on what an earlier one wrote.
The engine enforces the order anyway: `adopt` and `decline` take only the current number plus one, the one
exception being a declined version taken on later, which §1 describes.

1. **Read the version's README in full first** — `~/.claude/conventions/versions/<NNN-slug>/README.md`,
   every heading, before touching anything. Its four sections are what the rest of this pass runs on:
   what changed and why, how to migrate an existing repo, when the migration is a no-op here, and the
   continuing rule the version hands to the checker.

2. **Settle `## When it does not apply`, with the positive evidence it asks for.** Name the command you
   ran or the file you read and show what came back; "nothing found" and "nothing looked at" must not
   read the same (`~/.claude/memory/feedback_not_run_is_not_pass.md`). If none of its conditions holds,
   the migration applies here — continue. If one does, change nothing and go to sub-step 5.

   **In a fork, ask about a version marked `[optional for forks]` before migrating it.** Status prints
   `a fork of <owner>'s project` when this repo is one, and tags each such version in the pending list.
   Only where the migration applies — a no-op needs no decision — ask the user whether this fork takes
   it on or declines it, saying what the migration would change here and that declining keeps the fork
   closer to its upstream. Ask in plain text, for the same reason sub-step 4 gives. A decline takes the
   user's reason in their words and goes straight to sub-step 5's decline form; nothing is migrated.

3. **Check whether the repo is already in the target shape.** Work done by hand, or on the other machine
   days ago, is common, and the answer is the same as a no-op: change nothing and go to sub-step 5. Say
   which of the two it was, since "already in this shape" and "does not apply here" are different facts
   that leave the same empty diff.

4. **Do the migration.**
   - **Where the README carries a question, take stock of what the repo holds that bears on it, then
     put it to the user verbatim with those findings beside it** — or, in an unattended walk, end the
     walk with both as `## Unattended` describes. Look wherever the README says to
     look, and show what you found and where. The question itself stays unedited and unsummarised,
     with nothing added but the repo's name if that is not already obvious. Ask it in plain text below
     the findings, not through AskUserQuestion, whose box covers the text above it
     (`~/.claude/memory/feedback_link_inside_the_question.md`). The findings are evidence, never an
     answer: a question exists precisely because no file can settle it, so a plausible answer read off
     the surrounding repo is the guess `~/.claude/memory/feedback_surface_the_gap_dont_fill_it.md`
     forbids. The stock-take lets the user answer from what the repo actually has rather than from
     memory. If their answer amounts to "not here", treat it as sub-step 2's no-op and say so — their
     reason is stored nowhere, so if it would hold for every repo it belongs in that version's
     `## When it does not apply` or in a later version, which is work in the dotfiles repo and its own
     session's task. Offer a memo for it. If their answer is that it applies and they do not want it
     done, that is a §3 stop — unless this is a fork and the version is marked optional for forks, where
     it is the decline sub-step 2 describes.
   - **Where the folder carries an `apply.py`, run it** rather than doing the work by hand —
     `python ~/.claude/conventions/versions/<NNN-slug>/apply.py "<repo root>"`. It exists because the
     work is mechanical and tedious, it prints what it did, and it exits non-zero on any line it cannot
     classify, which is a §3 stop with the tree left as it found it.
   - **Otherwise perform it yourself**, following the README's named files and transformation. Where it
     deletes or rewrites a committed file, show what would be lost and how to compare against the diff,
     and get a yes before doing it. Ordinary additions need no ceremony — do them and show the result.
   - Then run the README's own after-the-migration check and report what it returned.

5. **Advance the number by one:** `python ~/.claude/conventions/engine.py adopt "<repo root>" <N>`.
   It refuses to lower the number, to skip one, or to go above the newest version in this checkout, and
   a refusal is a §3 stop rather than something to work around. A version the fork declined advances
   with `python ~/.claude/conventions/engine.py decline "<repo root>" <N> <reason>` instead, which also
   refuses outside a fork and for a version not marked optional.

6. **Run the checker:** `python ~/.claude/conventions/check.py "<repo root>"`. Exit 0 is done; exit 1 —
   a violation or a rule that could not be measured — is a §3 stop, except for the one kind of finding
   the **Findings this walk did not cause** heading below carves out. It runs *after* the number moves
   because it runs the versioned rules introduced at or below the adopted version, so the rule this
   version brings in is unmeasurable until the record names it. That order is safe in the direction that
   matters: the number only ever claims the migration ran, and this repo's commit gate re-runs the same
   checker, so a half-done migration cannot reach a commit. Report which rules ran — the header counts
   them as `X rule(s) taken on, Y universal` and every finding is labelled `<name> (v7)` or
   `<name> (universal)`, so a version whose `## Continuing rule` says `None` adds nothing to the first
   count, and that count is how you can tell.

### Findings this walk did not cause

Only a finding numbered **above** the version this walk started from says the migration just performed is
incomplete. The other two kinds were already failing in this repo before `/adopt` was typed, and they are
not read the same way.

A finding labelled `(universal)` is a §3 stop. Those rules are gated by no version, so adopting nothing
would have left it failing just the same, and the walk cannot clear it: the remedy is a command that can
reach outside the repo's tree — this machine's project-memory cache link is the case that exists today —
so running it is the user's decision rather than a step of the walk. Report the `fix:` line printed under
the finding verbatim.

**A finding numbered at or below the walk's starting number is not a stop.** That rule was entitled to run
before the walk began, so the finding predates it, and the thing that clears it may be a version still
pending in this very walk: v13 is written to delete the project `/tmp/` line that v2's
`gitignore-scope-global` reports, so a repo at v11 carrying that line meets the finding the moment v12
records its number — before the remedy is reachable. Stopping there cannot be right, because the stop
forbids the one version that fixes it. Carry on to the next version, say in the report that you did and
which finding you carried, and read the checker again after each one. It becomes the stop only if it still
stands once the last pending version is done; name it then with whatever printed it, and say the walk
completed with the gate still refusing for a reason older than the walk. Nothing is skipped by this — the
version just recorded was performed in full — so §3's reason for refusing a skip does not reach it.

## 3. The first failure stops the run

A migration you cannot complete, an `apply.py` exiting non-zero, an `adopt` or `decline` refusal, a
`check.py` exit 1 that **Findings this walk did not cause** does not carve out, or a user who wants the
convention's work not done where no decline is on offer — any of these ends the walk. Leave the tree exactly
as it is, name the failing items whatever printed them reported, and say which versions were adopted
before it. Do not skip the failing version and carry on with the next: later migrations may depend on it,
and the engine will refuse the skip regardless. The repo stays behind at that number, and the
session-start notice keeps saying so, which is the pressure working rather than a gap being filed away.

## 4. Commit the walk

One commit for the whole walk, subject:

```
chore(conventions): adopt through vN
```

N is the new number — re-run `engine.py status` to read it rather than counting the versions you walked.
The record and whatever the migrations changed in the working tree commit together: run the repo's gate
first (`python3 ~/.claude/skills/shared/gate_pushed_tree.py --caller adopt --record`), write the subject to a
file under `tmp/`, and commit every path `git status --short` lists that the walk changed with
`python3 ~/.claude/skills/shared/commit.py -F <file> <paths…>`, which checks the message, scans what the
commit adds and signs it. Nothing here commits any other way.

Leave the push to the user's next `/yolo` or `/wrap-up`; its push step asks the other machine's session to
`/pull`, which is how that clone takes this walk. What that session must not do is run `/adopt`: its own
session-start notice was derived before the pull arrived and will still report a convention gap, which is
the one thing that turns this into the record conflict this section ends with.

Two things to say once the walk is over. If this repo's `.claude/commit-checks.sh` does not run
`check.py`, the rules this walk just took on were measured by the walk and by nothing since, and the
universal rules with them — say so rather than leaving "adopted" to read as "checked from here on". And
if the record file conflicts on a later pull, both machines walked from the same base: keep the higher
number, whose migrations are all present in the merged tree. Decline lines need one more look, since
one machine may have declined a version the other performed: keep a decline only where the merged tree
does not carry that version's migration, and ask the user where you cannot tell.

## There is no audit step

Re-checking is only meaningful for a property that has to keep holding, and such a property must not be
sampled by a command someone has to remember to run. That half is the commit gate's: `check.py` measures
every rule the repo's number entitles it to and every universal rule beside them, on every commit, and
reports a rule it could not measure as unmeasured rather than as a pass. Nothing re-derives a migration
afterwards, because a migration is not a standing claim — it ran, and the number says how far.

## Out of scope

- **Never touch another repository.** The session running in a repo is the only one that may commit
  there. A repo found behind is reported, never adopted from here.
- Do NOT walk the same versions in another machine's clone of this repo, and do NOT drive that clone from
  here. It takes this walk's commit through `/pull`.
- Do not author a new convention version. That happens in the dotfiles repo, in the session that is
  changing the convention itself, not in the one adopting it here.
- Do not edit a shipped version's README or its `apply.py` to make this repo pass. A version folder is
  shared by repos that run it at different times, so editing one gives two repos different behaviour
  under one number; a convention that is wrong is corrected by a later version. A fix to how a *rule*
  detects something is different — that belongs in the rule file, under `rules/` or `universal/`, where
  it applies everywhere at once.
- Do not hand-write, or lower, the record file. The engine's `adopt` and `decline` are the only writers,
  and one version at a time is what keeps the number from claiming a migration nobody read.
- Do not create the artifact a version's `## When it does not apply` says is absent — an empty
  `.claude/memos/`, a guessed `LICENSE`, an invented `engines.node`. The no-op is the version working
  correctly.

Community Reviews & Field Notes

Tried this skill on your own project? Share the model you used and the results you got.

Add Your Review

Approved reviews appear publicly with the name or role you enter. See the Privacy Notice.