Skip to content
Development
Skill

/adopt

Use when an existing project that was not built with X2 must be migrated to run under it, with documentation sprawl to dissolve, stories to harvest at epic altitude, an as-built design to baseline, and existing enforcement to map and arm. Runs the migration on a dedicated branch

From plugin
x2
1513 skills

Claude Code

$ npx -y skills add teklabsdigital/x2-method --skill adopt --agent claude-code

SKILL.md

adopt.SKILL.md
name: adopt
description: Use when an existing project that was not built with X2 must be migrated to run under it, with documentation sprawl to dissolve, stories to harvest at epic altitude, an as-built design to baseline, and existing enforcement to map and arm. Runs the migration on a dedicated branch with three human gates. Do not use for a new project (that is seed), and do not use it to redesign the product or refactor code beyond what arming the enforcement requires.

X2 adopt: migrate an existing project onto X2

You are migrating a project that was built under another method onto X2. The end state: no stray documentation artifacts in the project tree, the epic story set identified and approved, `docs/` initialised and baselined with the X2 decision layer, the as-built UI replicated into `design/prototype/` and locked, the existing enforcement mapped onto the claims and armed in CI, and the project resuming under the normal X2 skills.

The philosophy guard (read first, and hold it)

The existing documentation will distract and confuse you. It is documentation-heavy: detailed acceptance criteria, plans, test plans, briefs, traceability prose. That style documents what must be true and checks code against the documents. X2 makes what must be true unbreakable or derivable, and reserves prose for decisions a machine cannot witness:

  • Cross-cutting properties become invariants, stated once, enforced by the build.
  • User-visible behaviour becomes the locked prototype; tests derive from it, never authored ahead.
  • Interaction contracts that are not UI-visible live in one behaviour spec.
  • Stories stay at epic altitude. Their job is to drive decomposition and slicing, not to fan out

into criteria. Elaborating a story toward ACs is over-production, not thoroughness.

So: keep the epochs and the stories, not the ACs. Detailed acceptance criteria are dissolution input, never story material. When you feel the pull to preserve a detailed document because it is good, ask which of the three destinations its content belongs to (invariant, locked design, behaviour spec) and send it there or record it as owed. Do not adopt the old corpus's style.

Only these survive as prose: decision records, the behaviour spec, runbooks for humans operating the system, and the claims' human-readable statements. Everything descriptive of code dies once code or a test says it; code wins over descriptive docs.

Three sources of truth, one reconciliation

Adoption inherits three independently produced accounts of the product, and they will not agree:

1. **The code: what is actually built.** The authority on what exists. It cannot describe intent, but it cannot lie about behaviour. 2. **The epics and stories: what was intended.** Scattered through the old .md corpus. In X2 the approved story set (Gate A) becomes the authority on intent, but during adoption the old docs only NOMINATE story candidates; the code and the running app CONFIRM them. An .md story the code does not witness is dead intent until the human rules otherwise; a code capability no doc mentions is a missing story. Never let a document win a conflict with the code by default: that is how a legacy documentation corpus suffocates the adoption. 3. **The UI design: how it should look and behave on screen.** The current design export becomes the authority from Gate C forward.

The triangle is reconciled edge by edge, each at its gate, divergences always surfaced and ruled, never silently resolved:

  • **stories vs code** in phase 1: the harvest reads primarily from the code and the app, lists

doc-vs-code divergences (dead intent, missing story), and the human rules at Gate A.

  • **stories vs design** in phase 4: the congruence map, ruled at Gate C.
  • **design vs code** in phase 4: the theme drift and fidelity check, ruled at Gate C.

After the three gates, the triangle is closed: the story set matches what is built, the locked design matches the stories, and the client's divergence from the locked design is named and scheduled. That closed triangle is the adoption baseline.

Measurement

The adoption run is measured like an acceptance test. Keep an append-only turn ledger from the first message (number, what, why the human was needed, bucket), feed every human turn to it as it happens, and produce the exit report at the end. A compactible context is not durable storage: write the ledger to a file immediately, and re-read this skill after any compaction.

Phase 0: safety net

1. Verify the working tree is clean; commit anything pending under direction. 2. Tag the pre-migration state (for example `pre-x2`). Git history is the real archive: after this tag, removed files remain retrievable forever, so removal later is safe. 3. Create the migration branch (for example `x2-migration`). All adoption work happens on it. 4. **Arm the existing gates in CI now**, before anything moves: one workflow running the project's real verification commands as they stand (test suites, architecture tests, lint chains, in-process claim linters). Prove it runs green on the branch. Every later phase then works under a net: a relocation that breaks load-bearing machinery goes red on push, not at the end. Branch protection waits for phase 5; the workflow does not. 5. Submodules are out of scope entirely: they are their own repos. Record each submodule pin in VERSIONS.md during phase 2 and never touch their contents or their doc corpora.

Phase 1: survey and story harvest, then Gate A

Survey the repo and produce two artifacts:

1. **The documentation census**, every doc sorted into exactly one of four buckets:

  • absorbed by enforcement: a rule a test or lint already enforces, or cheaply could; the prose

dies once the enforcement exists (note the claim or test that absorbs it).

  • survives as a decision: distills into D-000-as-found or a D-0xx; the source is superseded.
  • commodity byproduct: plans, briefs
Read more
@teklabsdigital
Ships withx2

An agentic software engineering method: AI agents do the building, the build enforces the rules that must always hold, a person decides only at the gates, and the method measures its own cost in human turns.

Stars on GitHub

Momentum

stars in total
15
Star history of teklabsdigital/x2-method on GitHub, a chart by star-history.com

Other skills on x2.

decompose

decompose

Use after the repo is seeded to run the D-000 five-lens decomposition, record persistent schema decisions, define slice one, and…

@teklabsdigital@teklabsdigitalInstall Skill
derive-tests

derive-tests

Use only after the lock (gate 2b) is on record for the slice portion, to derive the fidelity ledger and acceptance scenarios from…

@teklabsdigital@teklabsdigitalInstall Skill
design

design

Use when D-000 exists and the whole-product prototype does not, to run Claude Design in its own context and produce the prototype…

@teklabsdigital@teklabsdigitalInstall Skill
extract

extract

Use when an X2 project completes (or reaches a major milestone) to run the extraction loop, the quality feedback that folds the…

@teklabsdigital@teklabsdigitalInstall Skill
help

help

Use when someone asks what an X2 skill does, which skill to run next, how the gates work, or where an artifact lives. A quick…

@teklabsdigital@teklabsdigitalInstall Skill
implement

implement

Use when the slice portion is locked and its derived tests exist, to build all of the locked portion to green autonomously.…

@teklabsdigital@teklabsdigitalInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about adopt.

Which coding agents can use adopt?
adopt installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.