Add resumable LLM investigation loop with bounded controller execution

This commit is contained in:
Nico committed 2026-10-14 06:18:52 +02:00
1 parent c03f70e3e1
commit c39b5881d1
23 files changed
+2872 -15

No files matched your search

@@ -0,0 +1,17 @@
import json
from importlib.resources import files
from viano_bug_analysis.lifecycle.storage import json_bytes
PROMPT_VERSION="investigation_v1"
def output_schema():
return json.loads(files("viano_bug_analysis.schemas").joinpath("investigation-output-v1.schema.json").read_text())
def build_prompt(context):
schema=output_schema()
return {"prompt_version":PROMPT_VERSION,"privacy":"configured","output_schema":schema,
"messages":[{"role":"system","content":files("viano_bug_analysis.llm.prompts").joinpath(PROMPT_VERSION+".txt").read_text(encoding="utf-8")},
{"role":"user","content":json_bytes({"task":"investigate_hypothesis","input":context,"output_schema":schema}).decode()}]}