Fission-AI/OpenSpec · error
Skipping legacy / migration because the directory resolves…
Error message
Skipping legacy ${legacy.root}/ migration because the directory resolves outside this project. What it means
Safety skip warning in collectLegacyToolMigrations: a legacy tool directory (e.g. an old .claude or .cursor root) resolves, after path canonicalization, to somewhere outside the current project — typically a symlinked checkout. The migration for that root is skipped to avoid moving files across project boundaries.
Solutions
- Replace the symlinked legacy directory with a real directory inside the project
- Move the files manually into the current tool layout
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at src/core/migration.ts:182 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/18ff7cf67465a46d.
Report an issue: GitHub.
Appendix: source
Thrown at src/core/migration.ts:182
if (!tool.skillsDir) continue;
if (toolIds && !toolIds.includes(tool.value)) continue;
for (const legacy of LEGACY_TOOL_ROOTS[tool.value] ?? []) {
const legacyTiming = legacy.timing ?? 'before-generation';
if (legacyTiming !== timing) continue;
if (legacy.root === tool.skillsDir) continue;
// Without an explicit tool list, only moves that need no consent run.
if (apply && !toolIds && legacy.needsConsent) continue;
const legacyRootPath = path.join(projectPath, legacy.root);
if (!fs.existsSync(legacyRootPath)) continue;
try {
FileSystemUtils.assertProjectArtifactPath(projectPath, legacyRootPath);
FileSystemUtils.assertProjectArtifactPath(
projectPath,
path.join(projectPath, tool.skillsDir)
);
} catch {
console.warn(
`Skipping legacy ${legacy.root}/ migration because the directory resolves outside this project.`
);
continue;
}
const skills = migrateSkillDirs(
projectPath,
tool.skillsDir,
legacy.root,
apply,
legacyTiming === 'after-generation'
);
const commands = migrateCommandFiles(projectPath, tool, legacy.root, apply);
if (apply) {
removeDirIfEmpty(path.join(legacyRootPath, 'skills'));
removeDirIfEmpty(path.join(legacyRootPath, 'workflows'));
removeDirIfEmpty(legacyRootPath);View on GitHub (pinned to 6926ccb18a)