Fission-AI/OpenSpec · error · TemplateLoadError
Schema '${schemaName}' not found
Error message
Schema '${schemaName}' not found What it means
Error "Schema '${schemaName}' not found" thrown in Fission-AI/OpenSpec.
Source
Thrown at src/core/artifact-graph/instruction-loader.ts:214
}
/**
* Loads a template from a schema's templates directory.
*
* @param schemaName - Schema name (e.g., "spec-driven")
* @param templatePath - Relative path within the templates directory (e.g., "proposal.md")
* @param projectRoot - Optional project root for project-local schema resolution
* @returns The template content
* @throws TemplateLoadError if the template cannot be loaded
*/
export function loadTemplate(
schemaName: string,
templatePath: string,
projectRoot?: string
): string {
const schemaDir = getSchemaDir(schemaName, projectRoot);
if (!schemaDir) {
throw new TemplateLoadError(
`Schema '${schemaName}' not found`,
templatePath
);
}
const templatesDir = path.join(schemaDir, 'templates');
const templatePathOnDisk = path.join(templatesDir, templatePath);
try {
FileSystemUtils.assertPathWithin(templatesDir, templatePathOnDisk);
} catch (error) {
throw new TemplateLoadError(
error instanceof Error ? error.message : String(error),
templatePathOnDisk
);
}
if (!fs.existsSync(templatePathOnDisk)) {View on GitHub (pinned to 6926ccb18a)
When it happens
Trigger: Thrown at src/core/artifact-graph/instruction-loader.ts:214 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/e402d42f61e613bd.
Report an issue: GitHub.