Fission-AI/OpenSpec · error · Error
Template '${artifact.template}' for artifact '${artifact.id}
Error message
Template '${artifact.template}' for artifact '${artifact.id}' points outside the schema templates directory What it means
Error "Template '${artifact.template}' for artifact '${artifact.id}' points outside the schema templates directory" thrown in Fission-AI/OpenSpec.
Source
Thrown at src/commands/workflow/templates.ts:81
source = 'project';
} else if (isInsideDir(schemaDir, userSchemasDir)) {
source = 'user';
} else {
source = 'package';
}
const templatesDir = path.join(schemaDir, 'templates');
const templates: TemplateInfo[] = graph.getAllArtifacts().map((artifact) => {
const templatePath = path.join(templatesDir, artifact.template);
try {
FileSystemUtils.assertPathWithin(templatesDir, templatePath);
return {
artifactId: artifact.id,
templatePath: FileSystemUtils.canonicalizeExistingPath(templatePath),
source,
};
} catch {
throw new Error(
`Template '${artifact.template}' for artifact '${artifact.id}' points outside the schema templates directory`
);
}
});
spinner?.stop();
if (options.json) {
const output: Record<string, { path: string; source: string }> = {};
for (const t of templates) {
output[t.artifactId] = { path: t.templatePath, source: t.source };
}
console.log(JSON.stringify(output, null, 2));
return;
}
console.log(`Schema: ${schemaName}`);
console.log(`Source: ${source}`);View on GitHub (pinned to 6926ccb18a)
When it happens
Trigger: Thrown at src/commands/workflow/templates.ts:81 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/866f6402c94bceb1.
Report an issue: GitHub.