adopt
/adopt
Przejmuje istniejący zestaw systemu projektowego w repozytorium i przełącza go etapami, zamiast tworzyć nowy.
- Autor
- darioabc ↗
- Repozytorium
- massimo ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 10.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 2
Brak sygnałów. Repozytorium zmienione 10.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Przejmuje istniejący zestaw systemu projektowego w repozytorium i przełącza go etapami, zamiast tworzyć nowy.
Argumenty
/adopt [class or step to resume]
Oryginalny opis (EN)
Adopt the design-system setup a repo already has (its own story lane, ds header keys, generated graph, ratchet and token inventory, and the script that writes them) instead of generating a new one. massimo scans what is there and who depends on it, plans what becomes of each part, configures itself to read it, runs beside the repo's own tools until the two agree, then cuts over one asset class at a time and retires the old setup only on the user's OK. Use for the adopt phase of a massimo project, or when the user wants massimo to take over an existing graph, story lane, ratchet or token list.
Jak działa
- Where adopt stands
- The flow
- Rules
- End of a session
Podgląd SKILL.md
---
name: adopt
description: Adopt the design-system setup a repo already has (its own story lane, ds header keys, generated graph, ratchet and token inventory, and the script that writes them) instead of generating a new one. massimo scans what is there and who depends on it, plans what becomes of each part, configures itself to read it, runs beside the repo's own tools until the two agree, then cuts over one asset class at a time and retires the old setup only on the user's OK. Use for the adopt phase of a massimo project, or when the user wants massimo to take over an existing graph, story lane, ratchet or token list.
argument-hint: "[class or step to resume]"
---
# massimo: adopt
A repo that already keeps its own design-system data should not lose it, or have it copied into a second system that drifts. Adopt keeps what works, drives it through massimo's config, and proves massimo reads the repo exactly as the repo's own tools do before anything is switched over. Nothing old is removed until a dry run finds nothing that still depends on it, and the user says yes.
Plugin root: two directories above this skill's base directory. Follow `<plugin>/reference/project.md` → Session protocol. `<project>` is the project folder: `projectDir` in `massimo.config.json`, `design-system` by default. Every command below is `node <project>/scripts/adopt.mjs <command>` unless it names another script.
## Where adopt stands
The ledger, `<project>/adopt/ledger.json`, is the source of truth. Each class (graph, stories, audit, tokens, docs) moves through found, mapped, shadowed, proven, cut-over and retired, one state at a time, with `mark`. The adopt phase in `state.json` follows the ledger by itself: never set it by hand, except to skip it. At the start of every session run `status` and tell the user, in two or three lines, which class is where and what is next.
## The flow
| Step | Commands | The user approves |
|---|---|---|
| 1. Scan | `scan` | what was found, and who depends on it |
| 2. Plan | `plan`, `status`, `mark <class> mapped` | each loss that is not clean, class by class |
| 2a. Convert | Ladle repos only: `config --lane csf`, `config --write --lane csf`, `plan`, `convert stories` | the csf config diff, the frozen files, the redirect map and the removal patch |
| 3. Configure | `config`, `config --write` | the config diff |
| 4. Shadow | install the shadow workflow, `mark <class> shadowed` | the workflow file |
| 5. Prove | `verify <class>`, `accept`, `mark <class> proven` | each verify table, each accepted difference, and any server started for the visual proof |
| 6. Cut over | one batch per class, `mark <class> cut-over --batch <id>` before its commit | each batch's diff, before its commit |
| 7. Retire | `retire <class> --dry-run`, `historical <path>`, `mark <class> retired` before its commit | each retirement, as its own decision |
1. **Scan.** `scan` reads the repo without running any of it and writes `<project>/adopt/inventory.json` and `inventory.md`. Before init it prints the inventory instead (`node <plugin>/scripts/adopt.mjs scan`, with `--root <package>` when the project lives in a package). Summarise it: the story lane or story tools, the `ds:` header keys beyond the built-in ones, the repo's own generated files and the script that writes them, and the consumers by class (deploy, ci, hand-run, docs). A story tool's consumers include whatever runs its own command (`ladle preview`, `storybook build`), such as a Playwright web server, a workflow step or a shell script, and a hosting config (`netlify.toml`, `vercel.json`, at any depth) whose build runs a package script makes that script and the config deploy consumers. When scan runs in a folder below the git toplevel (`--root <package>`), it reads nothing above that folder and says so in a note: read the toplevel's workflows and scripts with the user for what runs this package's tool or scripts. Ask the user whether anything is missing: a path built at run time escapes the text search, and the deploy build and CI of each cut-over batch are the backstop for it.
2. **Plan.** `plan` writes the ledger and `<project>/adopt/config.proposed.json`, and prints the ledger. Go class by class. For each asset, say its decision (keep, convert or retire) and its loss (clean, carried, lost or blocker) with the lines that explain it. The user agrees each loss that is not clean, or changes the decision or the loss in the ledger by hand. A blocker stops its class at mapped until it is resolved. For the audit class, show `audit.verify` in the ledger: the repo's ratchet, the map of its rules to massimo's kinds that plan proposed from the rule names, and the rules with no kind, which stay the repo's (as a project check under `guard.extraChecks`, or a loss the user accepts). Edit the map by hand where a rule needs more than one kind, such as `raw-colour=color+tailwind-palette`. Record each agreement with `state.mjs decide`, then `mark <class> mapped`.
2a. **Convert (Ladle repos only).** Skip this step for any other repo. A Ladle repo stays on the 0.3.0 plan until it opts in: plan keeps its stories as they are, and nothing below runs. For a Ladle repo, decide the opt-in before step 2 marks `stories` mapped, since plan marks the tool `convert` only while the class is at found. Opting in is the user's call, since it moves the repo's story files onto massimo's csf lane (the stories skill, `recipes/vite-csf.md`): the files stay where they are, massimo's Vite plugin serves them, and Ladle keeps running until step 7.
1. `config --lane csf` prints the csf config as a diff against `massimo.config.json`, from the saved inventory (run `scan` after init if there is none) and Ladle's own settings: the lane, Ladle's id rule, its story glob, story order and default story, viewports from its width options (or, with none, one per Ladle default width name the stories' `meta.width` uses, and Full), and a port that neither Ladle's port nor its preview port holds. A Ladle setting massimo cannot read without running the config (one written as code, such as a story list built when the config runs or a `storyOrder` function, or one the config may take from an object it spreads in) is not guessed: nothing is proposed from it, and a `note:` line names the key to set by hand. Everything else the lane needs (its frame, switchers, CSS, story-only modules and output folder) is the scaffold's hand work in step 2. On the user's OK, `config --write --lane csf` adds it, never overwriting a value they set, and sets `"minScripts": "0.4.0"`. A repo with no Ladle refuses `--lane`. Then run `plan` again while the `stories` class is still at found, and check that `tool:ladle` now reads `convert`: plan keeps the decision of any asset past found, so the ledger still says `keep` until then. Agree its loss with the user and `mark stories mapped`. If the class is already past found, run `mark stories found --force` first, then `plan`.
2. Scaffold the lane per `recipes/vite-csf.md`, with the user's OK for each file it writes. Serving it runs the repo's own code, so ask before starting any server. The scaffold is massimo's own lane, not part of the repo's setup: detect still reports it under `storyTools.lane`, marked `csf: true`, so nothing is scaffolded over it, but `scan` lists no story lane for it, `plan` leaves the `stories` class where it was, and `config` proposes nothing from it. A ledger that already lists the scaffold as a `lane:` asset drops it on the next `plan`, which says so.
3. `convert stories` writes one record per story file and `removal.patch` under `<project>/adopt/stories/work/` (a folder that ignores itself, so neither reaches a commit), the redirect map `<project>/adopt/stories/redirects.json` (commit it), and `<project>/adopt/stories/edits.md` when the ledger converts or retires the story tool. Besides the tool's folder, scripts, commands, package and ids, edits.md lists the tool's output folder (Ladle's `outDir`, any `-o` its scripts, workflows, hosting configs or shell scripts pass, and `build` when its config leaves `outDir` out and one of those builds with no `-o`) where code and config name it, such as a deploy's assets folder or a lint ignore, to point at `stories.outDir`, and a test or script that reads a tool script by its exact name (`scripts['dev']`, or a quoted name that names nothing else, such as `'ladle:build'`). An ignore file's entry for the old folder still works and holds nothing up; the lane's folder needs an entry of its own. It prints the frozen candidates, the files that keep `args` or `argTypes` at run time and the stories that set `parameters`, which the canvas does not read; those are for a hand pass. A story that sets `parameters.width` gets no width on the canvas, as in Ladle, which reads only `meta.width`. Show the user each list. A frozen file is a design target kept byte for byte: for each candidate the user confirms, run the `convert stories --freeze <file>` line convert printed for it, which pins the file in `stories.frozen`, then run `convert stories` again so the patch leaves them alone. A candidate the user declines stays unpinned, and convert keeps listing it. `convert stories --check` proves every file is unchanged outside its type import and every frozen file matches its hash; `--refreeze <file>` pins a frozen file again after the user changes it on purpose. `--ids-from <meta.json>` reads the old ids from the `meta.json` of a Ladle build, and `--types <file>` names the types file the patch points at. When a file keeps the tool's import (a frozen file), the patch also adds `src/stories/legacy-story-types.d.ts`, which declares the tool's module so its package can go.
4. The patch is applied, if at all, in the cut-over batch (step 6), not here.
3. **Configure.** `config` prints the proposal as a diff against `massimo.config.json`; on the user's OK, `config --write` adds it, never overwriting a value they set. For a Storybook the repo keeps, the proposal holds its stories keys: `include` from the stories list in `.storybook/main`, and the dev command, port, url and `storyUrl` (`<url>/iframe.html?id={id}&viewMode=story`) from the script that runs `storybook dev`; plan prints a note for each part it could not read. `config --write` adds to `stories.include` and never removes from it, so when the config already holds the native lane's glob that setup wrote (such as `src/**/*.story.vue`), take it out by hand once Storybook's globs are in. Then fill in what scan cannot know, with the user: `graph.taxonomy.rules` for the files with no `ds:group` line, the taxonomy's placement text and `notLive`, `stories.componentless`, the audit settings (`audit.kinds`, `audit.exempt` by role, tier or group), and `tokens.mirror`, `tokens.inventory` and `tokens.breakpoints` where the repo's style files stay the source. When the config turns on a key from 0.3.0 (`tokens.mirror`, `tokens.inventory`, `audit.kinds`, `graph.strictFaults` and the like), set `"minScripts": "0.3.0"` at its top, so older vendored scripts refuse the config instead of misreading it. A key from 0.4.0 (the csf lane's `stories.*` keys, including `stories.policy`) takes `"0.4.0"`; `config --write` raises `minScripts` by itself, and a key added by hand needs it set. The story title, coverage and banner rules a repo enforces go in `stories.policy`, and reference/project.md says what each option checks. Then build massimo's outputs, in this order: `tokens.mjs mirror`, `tokens.mjs build` and `tokens.mjs resolved` where they are on (`tokens.mjs check`, which `ds:check` runs, wants the build's outputs too), then `graph.mjs` (it records the token set, so a mirror written after it leaves it stale), then `audit.mjs --import <ratchet> --map <map>` to compare the audit (it writes nothing without `--write`, and its story kinds count what `graph.json` holds).
4. **Shadow.** For GitHub Actions, copy `<plugin>/templates/design-system-shadow.yml` to `.github/workflows/design-system-shadow.yml`, replace `<project>` with the project folder, and match the Node version and install step of the repo's other workflows. A project kept in a package (made with `init.mjs --root <package>`) is found from the folder the scripts run in, so the job runs in that package: uncomment the template's `defaults: run: working-directory:` lines and set them to the package's path from the repo root. It runs on pull requests only and never blocks: `ds:check` and `adopt.mjs verify` beside the repo's own checks, both allowed to fail. It grows by itself as classes land, since `check.mjs` runs each check once its files exist. For another CI system, add an equivalent job that is not required and show the user. Tell the user it runs on their next pull request; never push. Once a pull request has run it for a class, `mark <class> shadowed`.
5. **Prove.** `verify <class>` (or `verify` for all four) prints a table of what it compared and every difference, and exits 1 on any difference the ledger has not accepted. Show the user each table. For each open difference, fix its cause (the config, or the code), or, on the user's word, accept it with their reason: `accept <class> '<key>' --why '<reason>'`, the key exactly as verify printed it. Accept runs verify first and refuses a key it does not report. For a difference only some flags produce, pass accept the flags verify took: `--against <file>`, or the visual proof's flags for a `shot:` key (below). It keeps the difference's detail, so a later change under the same key (another group, a higher count, more values) is open again until the user accepts it again. The detail leaves out what moves while the difference stays the same: a line number in the repo's page, and a shot's measured percentage. A class verify could not run shows one open difference, `error`, with the reason: fix it, since an error is never accepted. Verify stories sets the lane as scan reads it now beside `graph.json`, so after a story is added, run `graph.mjs` before verifying again.
A class whose cut-over changes the story lane or its chrome also gets a visual proof, which compares the lane on the main branch with the lane on the adopt branch. Serving a lane runs the repo's own code, so ask the user before starting any server. Then:
1. `git worktree add <dir> main`, with `<dir>` outside the repo, and the repo's install step in `<dir>`.
2. In `<dir>`, start the config's `stories.devCommand` on a second port, such as `npm run stories:dev -- --port 4331` when the command pins its own port.
3. In the repo, on the adopt branch, start `stories.devCommand` on `stories.port`.
4. `verify stories --pairs <file> --a http://localhost:<second port> --b http://localhost:<stories.port> --shoot` writes a pairs file from the manifest (each entry at light and dark, at 390 and 1440 wide, on its frame route when it has one, and the tier `--dom-tier` names, Pages by default, compared by page text) and runs it through `shoot.mjs`, with `--playwright <path>` when the repo has no Playwright of its own. `--pairs` and `--out` are read from the repo root. To accept a `shot:` difference, on the user's word, run accept with the same `--pairs`, `--a`, `--b`, `--shoot` and `--playwright` while both servers are up, since accept shoots the pairs again. It keeps what differs (the pixels, the page text, the sizes, or that the pair could not be shot), so the acceptance holds while the pair still differs that way.
5. Stop both servers, then `git worktree remove <dir>`.
On a csf lane (a Ladle repo after step 2a), `verify stories` compares the lane with the tool it replaces, and the visual proof above is replaced by these:
1. `verify stories --against <meta.json>`, with the `meta.json` of a Ladle build. It checks that the lane has the same ids, files, exports and merged meta, and that every id and id prefix the repo's specs, scripts, skills and docs use still resolves. An id the tool never had either is listed as dead before the move, not as a loss.
2. `verify stories --against <meta.json> --sweep <base url>` opens every state of the lane on a running server (ask the user first, and stop it after) and counts those that reach `html[data-story-ready]`, hold an element, raise no page error and do not set `html[data-story-error]`. Add `--ready <selector>` where the stories mark readiness otherwise, `--ids-from <meta.json>` to take the ids from Ladle's list, and `--legacy` to load each as `/?story=<id>&mode=preview`. For a state that already fails on the main branch, on the main branch, with the user's OK and its server up, run `node <project>/scripts/shoot.mjs --sweep <base url> --legacy --ids-from <meta.json> > <file>` (its one JSON line is the result), then pass `--sweep-baseline <file>`: a failure the baseline also had is excused, but only if that baseline reached 98% ready, and the excused states are printed for the user to decide. A server that is not up, or no Playwright (`--playwright <path>` borrows one), is one open difference, never a pass.
3. The shell check, by hand, with the user: `/stories` shows one state at a time at the sizes in `stories.viewports`, a canvas URL `/stories/<slug>/<state>` reloads, and an old Ladle link `/?story=<id>&mode=preview` renders in place.
4. The parity pairs: `verify stories --pairs <file> --a <Ladle url> --b <lane url> --a-route '/?story={id}&mode=preview' --b-route '/stories/{slug}/{state}?mode=preview' --shoot` shoots each state in both and compares them. To accept a `shot:` difference, on the user's word, pass accept the same flags, `--a-route` and `--b-route` included, while both servers are up.
Verify records nothing: when it passes and the shadow job has run for as long as the user chose to soak it, `mark <class> proven`. For the audit, a proven class records its baseline from the ratchet: `audit.mjs --import <ratchet> --map <map> --write`.
6. **Cut over.** One class per batch, consumers before producers: first what reads the old outputs at build or run time (the deploy consumers the ledger names), then the CI jobs, then the docs, and the producer last. For a Ladle repo, the csf lane's batch also holds the removal patch (applied from the repo root) and the edits that `adopt/stories/edits.md` lists for the story tool's consumers, while Ladle itself stays installed. A generated doc that names an asset changes through its writer, then is regenerated, as the ledger's line says. Each batch is one commit whose message ends with a trailer, `Adopt-Batch: <id>`, the id being the class and a number, such as `graph-1`. Run the repo's own build and checks, then `mark <class> cut-over --batch <id>`, so the ledger's move is part of the batch. Show the user the diff, the ledger included, and commit on their OK; if they say no, put the ledger back with `mark <class> proven --force`. One `git revert` of that commit then undoes the batch and the ledger's move together. Find the commit with an anchored search, `git log --grep '^Adopt-Batch: graph-1$'`: without the anchors, `graph-1` also matches `graph-10` and `graph-1-retire`.
7. **Retire.** Only after cut-over, and only on the user's OK for this class. A class whose every asset is kept (a Storybook that stays, a lane massimo reads in place) has nothing to retire: it ends at cut-over, and `mark` refuses `retired` for it. `retire <class> --dry-run` lists what goes (the assets marked retire, and those marked convert, whose place massimo's output takes), the package scripts that run them, the workflow jobs that run those scripts, files a retiring generator also writes for another class, any file that goes while a generator that stays still writes it, and every consumer still outside the docs the ledger marks historical. On a csf lane it also prints the edits still open for the story tool (its config folder, its scripts and commands, its package, and the ids in specs, scripts and docs that the lane lacks), and `--against <meta.json>` tells an id that was dead already from one the move loses. A package script counts as the tool's only when it runs the tool, directly or through npm, pnpm, yarn or bun running another script that does; a script only named for it is listed as prose and does not block retire, so read the list before removing the tool. It exits 1 while a writer that stays or a consumer remains. A generator counts as a writer only while its own code names the file. Retire a writer with what it writes, retire its class first, or change the writer so it no longer writes the file. Repoint each consumer, or, on the user's word, mark a doc that only records how things were with `historical <path>`; it refuses a file that code depends on. Once the dry run is clean, remove what it lists and run `mark <class> retired`, so the ledger's move is in the same commit. That commit's trailer keeps the class's cut-over id with `-retire` (`Adopt-Batch: graph-1-retire`), and its own anchored search finds it: `git log --grep '^Adopt-Batch: graph-1-retire$'`. `retire` without `--dry-run` refuses: deleting is this step's job, never the script's.
## Rules
- Consumers before producers, always. A producer is removed only when its dry run is clean.
- One class per batch, one commit per batch, each with its `Adopt-Batch` trailer and its ledger move. Never mix a cut-over with a retirement.
- Ask the user before starting any of the repo's servers, and stop each one you started.
- The repo's own story lane stays where it already meets massimo's lane contract (the stories skill): native, gated, discoverable, states side by side, real content. Configure massimo to read it through `stories.lane`, `stories.manifest`, `stories.pages` and `stories.frames`; never scaffold over it.
- Never push, open a pull request or merge. Branch protection, such as making `ds:check` a required check, is a setting the user changes (the guard skill says how).
- Retire only on the user's OK, per class, after a clean dry run. A loss the user has not agreed is never retired.
- Accept a difference only with the user's reason, in their words. Never accept one to make a table pass.
- A config that turns on a 0.3.0 key sets `"minScripts": "0.3.0"`, and one that turns on a 0.4.0 key sets `"minScripts": "0.4.0"` (`config --write` raises it).
- A Ladle repo moves to the csf lane only when the user opts in with `config --write --lane csf`. Convert never edits a frozen file and never removes the story tool: that is step 7, on the user's OK.
## End of a session
Follow the session protocol's End steps in `<plugin>/reference/project.md`. The adopt phase's note is rebuilt from the ledger on each `plan` and `mark`, so it needs no `state.mjs set`. Rewrite STATUS.md's hand-written sections: where each class stands, the one next step (the next `verify`, batch or dry run, and `/massimo:adopt` to run it), and any difference or loss still waiting on the user under Open questions. Offer to commit `<project>/adopt/` and the config with a conventional message; a cut-over or retirement batch is committed only as step 6 or 7 says.
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · darioabc/massimo | 90 | MIT |
| A7-studio/jobmigo | 100 | MIT |
| Nazhra05/Super-set | 100 | MIT |
| Nazhra05/Super-set | 100 | MIT |
| alvaroarmijos/iphone-duo-plugin | 100 | MIT |
| chatquill/claude-code-websites | 100 | MIT |
| hemi1986/kataster | 100 | MIT |
| pawangai/pawang-agents | 100 | MIT |
| dupe-com/standdown | 100 | MIT |
Migawka bazy z 13.11.2026 · wersja paczki cc764451d414 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100graph
Buduje i utrzymuje graf systemu projektowego repozytorium: komponenty, ich użycie, właściwości, historyjki i tokeny CSS. - 100start
Uruchamia lub wznawia projekt systemu projektowego w repozytorium: wykrywa stos, zadaje pytania i prowadzi dalsze kroki. - 90st-adopt
Przejmuje istniejący PR, gałąź lub wątek agenta i dokańcza jego cel, zachowując zasługi pierwszych autorów.