Fission-AI/OpenSpec · error

Skipping legacy migration because it resolves outside this…

Error message

Skipping legacy ${legacyPath} migration because it resolves outside this project.

What it means

Safety skip warning in migrateCommandFiles: a legacy command file path resolves outside the project (symlinked or mounted path), so that command's migration from the legacy location is skipped. Remaining commands continue to migrate.

Solutions

  1. Move the legacy command file into the current commands directory manually
  2. Fix the symlinked legacy path so it resolves inside the project
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src/core/migration.ts:307 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/9c6d8bad55a2d9c1. Report an issue: GitHub.

Appendix: source

Thrown at src/core/migration.ts:307

  legacyRoot: string,
  apply: boolean
): { moved: number; kept: number } {
  const adapter = CommandAdapterRegistry.get(tool.value);
  if (!adapter || !tool.skillsDir) return { moved: 0, kept: 0 };
  let moved = 0;
  let kept = 0;

  for (const commandId of COMMAND_IDS) {
    const currentPath = adapter.getFilePath(commandId);
    const legacyPath = legacyCommandPath(currentPath, tool.skillsDir, legacyRoot);
    if (!legacyPath) continue;

    const source = path.join(projectPath, legacyPath);
    if (!fs.existsSync(source)) continue;

    const destination = path.join(projectPath, currentPath);
    if (!areProjectArtifacts(projectPath, source, destination)) {
      console.warn(
        `Skipping legacy ${legacyPath} migration because it resolves outside this project.`
      );
      continue;
    }
    const disposition = classifyManagedFile(source, destination);
    if (disposition === 'skip') continue;
    if (disposition === 'keep') {
      kept++;
      continue;
    }
    if (!apply) {
      moved++;
      continue;
    }

    try {
      if (disposition === 'drop') {
        fs.rmSync(source, { force: true });

View on GitHub (pinned to 6926ccb18a)