{"record":{"id":"e402d42f61e613bd","repo":"Fission-AI/OpenSpec","slug":"schema-schemaname-not-found","errorCode":null,"errorMessage":"Schema '${schemaName}' not found","messagePattern":"Schema '(.+?)' not found","errorType":"exception","errorClass":"TemplateLoadError","httpStatus":null,"severity":"error","filePath":"src/core/artifact-graph/instruction-loader.ts","lineNumber":214,"sourceCode":"}\n\n/**\n * Loads a template from a schema's templates directory.\n *\n * @param schemaName - Schema name (e.g., \"spec-driven\")\n * @param templatePath - Relative path within the templates directory (e.g., \"proposal.md\")\n * @param projectRoot - Optional project root for project-local schema resolution\n * @returns The template content\n * @throws TemplateLoadError if the template cannot be loaded\n */\nexport function loadTemplate(\n  schemaName: string,\n  templatePath: string,\n  projectRoot?: string\n): string {\n  const schemaDir = getSchemaDir(schemaName, projectRoot);\n  if (!schemaDir) {\n    throw new TemplateLoadError(\n      `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)) {","sourceCodeStart":196,"sourceCodeEnd":232,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/artifact-graph/instruction-loader.ts#L196-L232","documentation":"Error \"Schema '${schemaName}' not found\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/artifact-graph/instruction-loader.ts:214 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"}