{"record":{"id":"1fe48bb91e815b95","repo":"NousResearch/hermes-agent","slug":"blueprint-prompt-missing-value-for-e","errorCode":null,"errorMessage":"blueprint prompt missing value for {e}","messagePattern":"blueprint prompt missing value for (.+?)","errorType":"validation","errorClass":"BlueprintFillError","httpStatus":null,"severity":"error","filePath":"cron/blueprint_catalog.py","lineNumber":787,"sourceCode":"    for s in blueprint.slots:\n        raw = values.get(s.name, s.default)\n        if raw in (None, \"\"):\n            if s.optional:\n                continue\n            raise BlueprintFillError(f\"missing required value: {s.name} ({s.label})\")\n        if s.type == \"enum\" and s.strict and s.options and str(raw) not in {str(o) for o in s.options}:\n            raise BlueprintFillError(\n                f\"{s.name}={raw!r} not allowed — one of {', '.join(map(str, s.options))}\"\n            )\n        resolved[s.name] = raw\n\n    schedule = _resolve_schedule(blueprint, resolved)\n\n    # Render the prompt with whatever slots it references.\n    try:\n        prompt = blueprint.prompt_template.format(**resolved)\n    except KeyError as e:\n        raise BlueprintFillError(f\"blueprint prompt missing value for {e}\") from e\n\n    spec: Dict[str, Any] = {\n        \"prompt\": prompt,\n        \"schedule\": schedule,\n        \"name\": blueprint.title,\n        \"deliver\": resolved.get(\"deliver\", blueprint.deliver_default),\n    }\n    if blueprint.skills:\n        spec[\"skills\"] = list(blueprint.skills)\n    if origin is not None:\n        spec[\"origin\"] = origin\n    return spec\n","sourceCodeStart":769,"sourceCodeEnd":800,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/cron/blueprint_catalog.py#L769-L800","documentation":"BlueprintFillError raised while rendering blueprint.prompt_template: str.format(**resolved) raised KeyError because the template references a placeholder name that is not among the resolved slot values. Per the source comment this is a template/slot mismatch — a developer error in the blueprint definition, not a user input error.","triggerScenarios":"A blueprint whose prompt_template contains {city} but defines no slot named 'city' (or the slot is optional and was skipped), so format() hits a missing key. Any fill_blueprint call against that blueprint fails regardless of user input.","commonSituations":"Hand-edited YAML/JSON blueprint where a placeholder was added to the prompt without a matching slot; an optional slot with no default that the prompt still references; renamed slot in template but not in slots list.","solutions":["Fix the blueprint: every {name} in prompt_template must have a corresponding slot (or a default) in blueprint.slots","If the slot is genuinely optional, give it a default so it is always resolved","Catch BlueprintFillError and surface it as a catalog-authoring bug rather than re-asking the user"],"exampleFix":"# before (blueprint definition)\nprompt_template: \"Summarize {city} news\"\nslots: [time, day]           # no 'city' slot\n\n# after\nprompt_template: \"Summarize {city} news\"\nslots: [time, day, city]     # 'city' slot added","handlingStrategy":"try-catch","validationCode":"import re\n\ndef template_slots_covered(bp) -> list[str]:\n    defined = {s.name for s in bp.slots}\n    referenced = set(re.findall(r\"\\{(\\w+)\\}\", bp.prompt_template))\n    return sorted(referenced - defined)","typeGuard":null,"tryCatchPattern":"from cron.blueprint_catalog import BlueprintFillError\n\ntry:\n    spec = fill_blueprint(bp, values)\nexcept BlueprintFillError as e:\n    if str(e).startswith(\"blueprint prompt missing value\"):\n        raise RuntimeError(f\"Blueprint '{bp.title}' is malformed: {e}\") from e\n    raise","preventionTips":["Lint blueprints at load time: every prompt_template placeholder must have a slot","Give optional slots defaults if the prompt references them","Treat this error as a catalog authoring bug — do not retry with user input"],"tags":["cron","blueprint","template","developer-error"],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}