Fission-AI/OpenSpec · error

Skipping legacy /skills/ migration because it resolves…

Error message

Skipping legacy ${legacyRoot}/skills/${dirName} migration because it resolves outside this project.

What it means

Safety skip warning in migrateSkillDirs: a legacy skills/<dir> source path for a workflow skill canonicalizes outside the project, so its SKILL.md is not migrated. The move is skipped rather than copying across project boundaries; the legacy file stays where it is.

Solutions

  1. Copy the legacy SKILL.md into the current skills directory by hand
  2. Remove the symlink in the legacy path and restore real files inside the project
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src/core/migration.ts:247 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Fission-AI/OpenSpec@6926ccb18a (2026-08-25). Data as JSON: /api/errors/1ff08d8c7e9c7275. Report an issue: GitHub.

Appendix: source

Thrown at src/core/migration.ts:247

  requireDestination = false
): { moved: number; kept: number } {
  const legacySkillsDir = path.join(projectPath, legacyRoot, 'skills');
  if (!fs.existsSync(legacySkillsDir)) return { moved: 0, kept: 0 };
  const currentSkillsDir = path.join(projectPath, currentRoot, 'skills');
  let moved = 0;
  let kept = 0;

  for (const workflowId of ALL_WORKFLOWS) {
    const dirName = WORKFLOW_TO_SKILL_DIR[workflowId];
    const source = path.join(legacySkillsDir, dirName);
    const sourceSkill = path.join(source, 'SKILL.md');
    if (!fs.existsSync(sourceSkill)) continue;

    const destination = path.join(currentSkillsDir, dirName);
    const destinationSkill = path.join(destination, 'SKILL.md');
    if (requireDestination && !fs.existsSync(destinationSkill)) continue;
    if (!areProjectArtifacts(projectPath, sourceSkill, destinationSkill)) {
      console.warn(
        `Skipping legacy ${legacyRoot}/skills/${dirName} migration because it resolves outside this project.`
      );
      continue;
    }
    const disposition = classifyManagedFile(sourceSkill, destinationSkill);
    if (disposition === 'skip') continue;
    if (disposition === 'keep') {
      kept++;
      continue;
    }
    if (!apply) {
      moved++;
      continue;
    }

    try {
      // Move the generated file, never the directory around it. A skill
      // directory can also hold files the user wrote, and this destination is

View on GitHub (pinned to 6926ccb18a)