/grey-matter:adopt-projectfrom grey-matter
Adopt a brownfield repo into grey-matter: characterize its as-is model, subsume existing agent config, seed a triaged board, and wire plumbing.
Ships in grey-matter. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
The tracked migration and survey helper roles are indexed in the tool-script catalog.
Bring the grey-matter workflow into a repo that already has code and history — the brownfield
twin of init-project (which scaffolds a fresh repo forward from intent). Where init-project
assumes nothing to preserve and nothing to back-fill from, adopt-project inverts the source of
truth: characterize the as-is model backward from the existing code, then reconcile grey-matter's
structure around what's already there.
The end state is a fully adopted project: plumbing wired, an honest as-is model characterized,
the existing backlog captured and triaged into a workable frontier (tkt ready returns real work).
"Fully adopted" means the project is fully represented and operable under the workflow — not that
future work has been planned. It orchestrates existing skills rather than reimplementing them.
Bounded by "derivable from the repo as it is." Everything characterizable or capturable from
existing code, history, and conventions is in scope. The moment the next step needs a future the
repo doesn't yet contain, that is the seam where adoption ends and building begins — so adoption
recommends wayfinder for forward work and stops, rather than running it.
1. Safety — reconcile on git, never clobber. Require a clean working tree before starting
(hard guardrail — refuse otherwise). Also adopt on a current base: git fetch, then
git rev-list --left-right --count HEAD...@{u}; fast-forward when 0 ahead, refuse when diverged
(an adoption on a stale checkout collides with upstream tickets and moves). An empty
init-project stub (a .memory/CONTEXT.md with no terms, an empty adr/) is not knowledge;
delete it. Reconcile existing files, never overwrite them. Present
everything at the approval gate. Git is the backup — the diff is the audit and git revert is the
undo; no bespoke .bak machinery. Commit shape: one reviewable adoption commit (relocation,
reconcile, plumbing, safe fixes), then one evidence commit (the audit reports), then the board
commits tkt new/batch make on their own. They revert together. Never rewrite history (LFS
migration of old commits, purging a file) inside an adoption; name it as an owner decision.
2. Polarity — install vs subsume (set in Step 1, governs Steps 3–5). One binary gate: is there an incumbent agent layer? Classify agent artifacts by role, not by presence:
AGENTS.md/CLAUDE.md doctrine,
a tracker of any kind, .kiro//.claude/ config, committed agent notes (e.g. .memory/). This is
what polarity counts and what subsume-semantics replaces.When the role is unclear, ask at the gate. Then:
AGENTS.md; a real backlog → tkt; decisions → ADRs; committed knowledge →
grey-matter paths), then replace the incumbent structure with grey-matter's. Wholesale automatic
replacement happens only when the user specifically asks.Design rationale: docs/adr/0001-adopt-project-adoption-boundary.md (adoption boundary),
docs/adr/0002-adopt-project-soft-lens-polarity-gate.md (soft-lens + polarity gate), and
docs/agents/proposals/05-adopt-project-pilot-revisions.md (first-pilot revisions).
One linear flow. The archetype detected in Step 1 is a soft lens — it tunes where effort is high vs low, it does not branch the pipeline (see Archetypes).
Read before writing anything. Inventory the cross-harness agent layer: .kiro/,
AGENTS.md/AGENT.md, CLAUDE.md/GEMINI.md, .cursorrules + .cursor/rules/*.mdc,
.github/copilot-instructions.md, .windsurfrules + .windsurf/rules/*, .clinerules/*, .rules/*,
CONTRIBUTING.md/DEVELOPMENT.md, .scratch//.memory/, any SKILL.md, a tracker (.tickets/ or
other), GLOSSARY.md, docs/, .references/. Detect the build/test command (justfile /
package.json / Cargo.toml / project.godot / Makefile / pyproject / go.mod / mise.toml) and run it
once as the baseline every later step is verified against. Map structure with a symbol-map tool
if the harness has one, otherwise git ls-files plus targeted grep; surface the high-centrality
modules — don't read everything, and state what wasn't examined.
Also detect repo hygiene (detail: references/repo-hygiene.md):
artifact roles/storage through repository-artifact-hygiene, sensitive or out-of-place tracked content, and whether
.references/ has a committed rehydration index.
Then: name the archetype(s), classify each agent artifact by role (agent layer vs shipped), and set the polarity bit.
Build an honest description of what the repo currently is and does, from the code. Call the Skill tool
with domain-modeling (or game-modeling for a game's systems — detect an engine marker; load both for
a game with a backend) and run its mandatory code cross-check as the primary loop: mine domain
vocabulary from the symbol map and module structure, not from intent. Offer ADRs only for decisions
already baked into the code that a newcomer would question.
Call the Skill tool with conformance-audit on the existing skills, tool scripts, agent guidance, and
docs — it produces findings (safe-auto-fix vs needs-judgment) against current grey-matter standards.
Then reconcile the existing agent layer:
.memory/) to grey-matter paths with
scripts/relocate-knowledge.mjs (in this skill's folder): links are rewritten by location,
recorded evidence is never rewritten, and the baseline's tests + link check must pass again
after. Procedure and default map: references/relocation.md.Reshape AGENTS.md by its purpose (both polarities). First decide who actually loads it — agents
developing this repo, or also consumers of what it ships (shipped artifacts usually don't carry the
root AGENTS.md with them). Then cut it to its job: standing rules, non-derivable gotchas, and
navigation pointers. Delete what the environment already answers (task lists, skill lists, --help)
and what has a canonical home elsewhere. Lossless rule: before deleting a line, confirm its
canonical home holds it; if none does, keep it or move it there. Show the before/after size at the gate,
and run node scripts/check-guidance.mjs --repo <target> --no-global from a grey-matter checkout before
and after: dead paths, commands and skills it reports are reshape input, and the after run should drop them.
Capture the backlog the repo already has — TODO/FIXME, open issues, a foreign tracker — into tkt.
Call the Skill tool with triage so raw items land as backlog/ready-for-agent and tkt ready
isn't flooded.
tkt init a second board beside a live one, and never merely defer to theirs.Audit findings are migration findings, not ready work. Step 2's contradictions and Step 3's judgment findings come from an outside audit and may misread the design. With approval at the gate, file them one ticket per decision (not one per finding), backlog by default, framed for the project's own agent to review first:
Review migration finding: and tag migration-finding;Confirmation status: unconfirmed, reproduce each point and
mark it confirmed / rejected / re-scoped before changing code; rejecting every point is a valid close;AGENTS.md saying what the tag means.Commit the audit reports into the target (docs/agents/research/adoption-<date>/) so tickets cite
durable evidence, not .scratch/. If the repo keeps a plan table tkt reconciles, add rows.
Call the Skill tool with init-project to create only the genuinely-absent plumbing (it is
create-what's-missing and idempotent): AGENTS.md-primary + CLAUDE.md pointer, .scratch/,
.references/ + its rehydration README, gitignore entries, the tkt block (tkt init --write adds it
to an existing AGENTS.md), and the consistency checks. It runs after reconcile has decided what's
safe, so it fills real gaps rather than bailing on a non-empty repo.
Then the hygiene wiring from Step 1 (references/repo-hygiene.md):
the approved artifact storage plan (current tree only, preserving Git hook ownership), untrack
sensitive content, and complete the .references/ index with a clone command per entry.
tkt init beside a
still-live tracker (Step 4 migrated it first).Present the whole adoption for human correction: the glossary verdicts and staged terms (Step 2), the
relocation map, the reconcile/subsume plan, the AGENTS.md before/after, and the conformance fixes
(Step 3), the migration findings to file (Step 4), and the plumbing and hygiene changes (Step 5),
plus any history-rewrite follow-ups for the owner. This is the approval gate — nothing lands before
it. Then commit in the shape above, verify against the Step 1 baseline (tests, link check, a fresh
clone if LFS changed), and push. Finally, recommend wayfinder for the first forward chunk of work
and stop. Adoption ends here.
When the user wants to bring several repos over (a migration off another skill set, a new machine), survey the sibling repos before adopting any of them:
node <skill-dir>/scripts/survey-repos.mjs [<parent-dir>] [--exclude <name> ...] [--fresh-days 30] [--warm-days 90]
It defaults to the current repo's parent and is read-only. It ranks every git repo there by freshness
(last commit, commits in the fresh window) and reports what adoption would face: a dirty tree, an
incumbent .memory/, a tracker, and AGENTS.md references to skills that no longer exist. Exclude
tool repos and retired projects that aren't candidates. Present the tiers and offer two options:
Either way, one repo at a time: the gate per repo is what keeps adoption honest.
Name the repo's starting state to set expectations and tune effort. These overlap and one axis (tests/docs) is orthogonal; they do not select different procedures — the pipeline is one flow, and the one real divergence (install vs subsume) is the polarity gate, not the archetype.
AGENTS.md, its own tracker, its own skills.
Subsume-semantics; the weight is in Step 3 (migrate its governance + decisions, then replace) and
Step 4 (migrate its tracker's tickets into tkt).AGENTS.md + one tracker, already roughly grey-matter-shaped.
Subsume-semantics, light: align to current conventions, fill gaps, dedupe. Expect the weight to
move into relocation (Step 3) and migration findings (Step 4).wayfinder), not part of adoption.tkt ready surfaces, grey-matter's consistency checks wired in.wayfinder), not done.wayfinder, recommended at the end — adoption is bounded
by what's derivable from the repo as it is.init-project; glossary is domain-modeling/game-modeling;
standards-conformance is conformance-audit; backlog capture is triage. adopt-project orchestrates.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub smileynet/grey-matter --plugin grey-matterOther plugins' skills for the same job
51 skills in this plugin
/changelogMaintain CHANGELOG.md in Keep a Changelog format with user-facing entries. Use when recording what changed for a release, updating the Unreleased section, or asked to write/update the changelog./cheat-sheetList every skill in this set by category with a one-line description. Use when the user wants a quick reference card of available skills, asks "what skills are there", or "list all commands"./codebase-designShared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.