Answer the prose pass: name README.md beside the records, one idea per sentence in --help and the judge's rules, date the decision's revision
This commit is contained in:
@@ -2,20 +2,20 @@ import dataclasses
|
||||
|
||||
from loop_claude.cycle.verdicts import AnsweredFromRecords, Finished, Interrupt, Unfinished, Verdict
|
||||
|
||||
# A backstop for what the judge misses, such as a reworded repeat, so the worker cannot loop unattended on the records' answers.
|
||||
# A backstop for what the judge misses, such as a reworded repeat, so the worker cannot loop unattended on answers quoted from README.md or the records.
|
||||
RECORDS_ANSWERS_PER_CYCLE = 3
|
||||
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
class Working:
|
||||
"""The worker runs, resumed with the records' answer when there is one."""
|
||||
"""The worker runs, resumed with an answer quoted from README.md or the records when there is one."""
|
||||
answered: AnsweredFromRecords | None = None
|
||||
records_answers: int = 0
|
||||
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
class Judging:
|
||||
"""The judge rules; records_answers counts the questions the records answered this cycle."""
|
||||
"""The judge rules; records_answers counts the questions README.md or the records answered this cycle."""
|
||||
transcript_path: str
|
||||
records_answers: int = 0
|
||||
|
||||
@@ -72,7 +72,7 @@ def transition(state: State, event: Event) -> State:
|
||||
case Judging(_, records_answers), Ruled(AnsweredFromRecords() as answered) if records_answers < RECORDS_ANSWERS_PER_CYCLE:
|
||||
return Working(answered, records_answers + 1)
|
||||
case Judging(transcript_path, records_answers), Ruled(AnsweredFromRecords(question=question, answer=answer)):
|
||||
return Interrupting(transcript_path, f"{question}\n\nREADME.md or the project's records say:\n{answer}\n\nThe records answered {records_answers} questions this cycle, so this one comes to you.", records_answers)
|
||||
return Interrupting(transcript_path, f"{question}\n\nREADME.md or the project's records say:\n{answer}\n\nREADME.md or the records answered {records_answers} questions this cycle, so this one comes to you.", records_answers)
|
||||
case Judging(transcript_path, records_answers), Ruled(Interrupt(question=question)):
|
||||
return Interrupting(transcript_path, question, records_answers)
|
||||
case Judging(transcript_path, _), Ruled(Finished() | Unfinished() as verdict):
|
||||
|
||||
Reference in New Issue
Block a user