`init` writes .claude/skills/*/SKILL.md into every new repository from the constants in skills_content, so each skill exists twice: once as the copy this repository uses, once as the copy it ships. Editing one and not the other went unnoticed by validate and by every test. It had already happened. The shipped repository-adoption skill still told its reader to use `--strategy normalize --recipe documents-to-content-root` -- an operation the CLI does not offer and CLAUDE.md forbids claiming -- and said nothing about the owner requirement or acknowledged findings. Every repository bootstrapped since would have received that copy. Sync both, and add a test that compares each shipped skill against the checked-in one so the next divergence fails instead of shipping. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
32 lines
1.7 KiB
Markdown
32 lines
1.7 KiB
Markdown
---
|
|
name: repository-adoption
|
|
description: Assess and adopt an existing repository into Repository Stewardship using repoctl adopt. Use when connecting an existing, non-templated repository without moving its domain content.
|
|
---
|
|
|
|
# repository-adoption
|
|
|
|
Thin wrapper around `repoctl adopt`. The canonical procedure is
|
|
`docs/adoption-runbook.md`; this skill only collects missing decisions, calls the CLI
|
|
with machine output, and explains findings. It must not duplicate the runbook logic.
|
|
|
|
## Procedure
|
|
|
|
1. Run `repoctl adopt --repo <path> --mode assess --output json` (read-only).
|
|
2. Present the classification, detected content roots, and any `questions` that need
|
|
owner confirmation.
|
|
3. Run `repoctl adopt --repo <path> --mode plan --owner <owner> --output json` once open
|
|
questions are resolved. This is still read-only and returns an `AdoptionPlan` with a
|
|
`planHash`. `plan` refuses without a confirmed owner, and refuses while `assess` left
|
|
an error-severity finding; an owner who accepts one lists it under
|
|
`acknowledgedFindings` (with a `reason`) in the `--answers` file.
|
|
4. Show the full plan (files created, patched managed blocks, preserved paths,
|
|
forbidden changes) before asking for approval.
|
|
5. Only after explicit approval, run
|
|
`repoctl adopt --repo <path> --mode apply --plan <plan-file> --approve <planHash>`.
|
|
6. Run `repoctl adopt --repo <path> --mode verify --output json` and report the
|
|
`AdoptionReport`, including any `unresolvedFindings`.
|
|
|
|
The only implemented strategy is `overlay`. Normalization recipes are specified in the
|
|
runbook but not implemented, and the CLI does not offer them: do not describe
|
|
`--strategy normalize` or `--recipe` as available.
|