Answer principles round 2: 0 🔴, 0 🟡; name the typed answer's two parts in Typed

This commit is contained in:
2026-10-17 23:41:59 +02:00
parent c4a4f40aa6
commit e7f5443688
3 changed files with 14 additions and 7 deletions
+4 -3
View File
@@ -3,6 +3,7 @@ from model_routing.route import ESCALATION_MARKER, HIGHEST_ESCAPE_AND_IMPACT, Ro
from loop_claude.routing import escalation_rungs
from loop_claude.project.records import HUMAN_RULE_NAMES, RECORD_FILES
from markdown_text import listed, quoted
from claude_code.transcript import Typed
# Where the judge may quote an answer from, named as the human and the worker see them; of README.md the judge sees only the premises.
QUOTE_SOURCES = listed(("README.md's Goals and Audience", *RECORD_FILES, *HUMAN_RULE_NAMES), "or")
@@ -137,13 +138,13 @@ def typed(question: str, answer: str, route: Route, anchor: Rung | None, stepped
TYPED_HERE = "The human answered your question at loop-claude's terminal:"
def typed_answer(prompt: str) -> tuple[str, str] | None:
"""The rest of the prompt typed made, and the answer it put there, so the judge reads the answer as the human's; None for any other prompt."""
def typed_answer(prompt: str) -> Typed | None:
"""The answer typed put in prompt, and the rest of that prompt, so the judge reads the answer as the human's; None for any other prompt."""
opening = f"{TYPED_HERE}\n"
if not prompt.startswith(opening):
return None
answer, _, rest = prompt.removeprefix(opening).partition("\n\n")
return rest, answer
return Typed(rest, answer)
def stepped_to(route: Route, anchor: Rung | None, stepped: bool) -> str: