{"record":{"id":"c54e27ffebafc761","repo":"Fission-AI/OpenSpec","slug":"template-not-found-templatepathondisk","errorCode":null,"errorMessage":"Template not found: ${templatePathOnDisk}","messagePattern":"Template not found: (.+?)","errorType":"exception","errorClass":"TemplateLoadError","httpStatus":null,"severity":"error","filePath":"src/core/artifact-graph/instruction-loader.ts","lineNumber":233,"sourceCode":"      `Schema '${schemaName}' not found`,\n      templatePath\n    );\n  }\n\n  const templatesDir = path.join(schemaDir, 'templates');\n  const templatePathOnDisk = path.join(templatesDir, templatePath);\n\n  try {\n    FileSystemUtils.assertPathWithin(templatesDir, templatePathOnDisk);\n  } catch (error) {\n    throw new TemplateLoadError(\n      error instanceof Error ? error.message : String(error),\n      templatePathOnDisk\n    );\n  }\n\n  if (!fs.existsSync(templatePathOnDisk)) {\n    throw new TemplateLoadError(\n      `Template not found: ${templatePathOnDisk}`,\n      templatePathOnDisk\n    );\n  }\n\n  const fullPath = FileSystemUtils.canonicalizeExistingPath(templatePathOnDisk);\n\n  try {\n    return fs.readFileSync(fullPath, 'utf-8');\n  } catch (err) {\n    const ioError = err instanceof Error ? err : new Error(String(err));\n    throw new TemplateLoadError(\n      `Failed to read template: ${ioError.message}`,\n      fullPath\n    );\n  }\n}\n","sourceCodeStart":215,"sourceCodeEnd":251,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/artifact-graph/instruction-loader.ts#L215-L251","documentation":"Error \"Template not found: ${templatePathOnDisk}\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/artifact-graph/instruction-loader.ts:233 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6926ccb18afa4ff621112813e9968334576ee11a","analyzedAt":"2026-08-25T12:29:45.729Z","schemaVersion":2},"datasetVersion":"2026-08-25T16:17:27.014Z"}