Skip to main content

Module finalize

Module finalize 

Source
Expand description

Finalize — bring a legacy task to a finished shape.

One LLM call reads a task’s full event history and returns a judgment: a human-readable title, a one-sentence outcome, and whether the events clearly show the task was finished (so complete may close it). The model decides — same word in different contexts misleads heuristics, and a title like “пТак обясни…” is natural language yet a useless title, so only a reader of the whole history can call it.

Structs§

FinalizeJudgment
The model’s verdict on a task, distilled from its events.

Functions§

build_prompt
Build the judge prompt from a task’s current title and its event lines (each line pre-formatted as [type] text by the caller).
judge
One judge call: prompt → model → parsed judgment, with the token usage the backend reported for the call.
parse_judgment
Parse the model reply (a JSON object, possibly inside a ```json fence).