{"record":{"id":"a3e861d9f9b59474","repo":"diegosouzapw/OmniRoute","slug":"unknown-stage-stage","errorCode":null,"errorMessage":"Unknown stage: ${stage}","messagePattern":"Unknown stage: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/domain/prompts.ts","lineNumber":97,"sourceCode":" * @returns Interpolated string\n */\nexport function interpolate(template: string, variables: Record<string, string>): string {\n  return template.replace(/\\{(\\w+)\\}/g, (match, key) => {\n    return key in variables ? variables[key] : match;\n  });\n}\n\n/**\n * Render a stage prompt with the given variables.\n *\n * @param stage - The pipeline stage name\n * @param variables - Variable values for interpolation\n * @returns Rendered system and user prompt strings\n */\nexport function renderPrompt(stage: StageName, variables: Record<string, string>): StagePrompt {\n  const template = STAGE_PROMPTS[stage];\n  if (!template) {\n    throw new Error(`Unknown stage: ${stage}`);\n  }\n  return {\n    system: interpolate(template.system, variables),\n    user: interpolate(template.user, variables),\n  };\n}\n","sourceCodeStart":79,"sourceCodeEnd":104,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/domain/prompts.ts#L79-L104","documentation":"Error \"Unknown stage: ${stage}\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/domain/prompts.ts:97 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":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}