agentleFS
ryukirinryukirin/openspec-code-migration/skills/migration-inventory/SKILL.md

migration-inventory

Skill0 starsChanged 35 days agoMITView on GitHub

Migration step 1. Scan the legacy system read-only and write legacy-inventory.md (components plus a migration readiness check) and legacy-baseline.md (observable behaviour). States plainly whether missing material, such as a database schema, blocks the migration. Records facts only and makes no migration decisions.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Write legacy-inventory.md: one INV-### per component, with evidence as relative/path:symbol.

    line 21
  2. Very specific:

    Write legacy-baseline.md: one LEGACY-### per observable behaviour, marked STATIC (read from code) or RUNTIME (observed while running).

    line 22
  3. Very specific:

    If the migration target cannot be settled without it, it is blocking: open a GAP-### with the evidence, the impact, and how to unblock it.

    line 25
  4. Very specific:

    Run gate lint --root migration-plans/<name> and fix what it reports.

    line 27

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Migration Inventory

Record what the legacy system is today. What to keep and how to migrate is decided in the migration-strategy skill.

The user may name the migration; if not, derive a kebab-case name from the project and say so. <schema> is the path from openspec schema which code-migration --json; if the schema is not found, run the migration-setup skill first.

  • Planning pack: migration-plans/<migration-name>/, created if missing
  • Templates: <schema>/templates/legacy-inventory.md and legacy-baseline.md
  • gate: node <schema>/scripts/migration_gate.mjs

Steps

  1. Scan the legacy code read-only: entry points, modules, dependencies and versions, build, routes and interfaces, persistence and SQL, configuration, authentication and authorization, static assets, tests. On a rerun, update the files in place and keep existing IDs.
  2. Write legacy-inventory.md: one INV-### per component, with evidence as relative/path:symbol.
  3. Write legacy-baseline.md: one LEGACY-### per observable behaviour, marked STATIC (read from code) or RUNTIME (observed while running). Behaviour that looks like a defect or a security issue, and behaviour you cannot pin down, go in their own tables. Facts only, no dispositions.
  4. Migration readiness check, written at the top of legacy-inventory.md. Check every material the migration needs: source code, build and dependencies, database schema, data or seed data, runtime configuration, external services, static assets, and whether the legacy system can run.
    • Material the code uses but the repository does not contain counts as missing. For example, SQL in a data-access class reads a table, but no DDL or data export exists anywhere: the database schema is missing.
    • If the migration target cannot be settled without it, it is blocking: open a GAP-### with the evidence, the impact, and how to unblock it.
    • Any blocking GAP means READINESS: BLOCKED; otherwise READINESS: READY.
  5. Run gate lint --root migration-plans/<name> and fix what it reports. Write machine-specific absolute paths found in legacy code as <redacted-local-path>.

When done

Open the reply with the readiness verdict:

  • READY: the next step is the migration-strategy skill.
  • BLOCKED: list each GAP (what is missing, why it is needed, where the evidence is), then offer two ways forward and let the user choose:
    1. supply the material and rerun migration-inventory;
    2. choose a strategy for each GAP in migration-strategy, for example rebuilding the schema from code or skipping historical data.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.