Answer architecture round 1: give loop-claude's prompt text one home, split larv-review's plan trigger and ruling base out, share todo.md's table and the project key, and name the scoring run, the checkout roots and the test env for what they are
This commit is contained in:
@@ -39,16 +39,20 @@ def place_dimensions(place: str) -> list[str]:
|
||||
return named if all(name in DIMENSIONS for name in named) else []
|
||||
|
||||
|
||||
def ruling(counted: list[str]) -> str | None:
|
||||
"""The vote that leads each other vote by two or more, else same; None when only the first two seats voted and they differ, so two more must vote."""
|
||||
if len(counted) == 2 and counted[0] != counted[1]:
|
||||
return None
|
||||
for vote in VOTES:
|
||||
if all(counted.count(vote) >= counted.count(other) + 2 for other in VOTES if other != vote):
|
||||
return vote
|
||||
return "same"
|
||||
def split(overall: list[str]) -> bool:
|
||||
"""Whether only the first two seats voted overall and they differ, so two more must vote."""
|
||||
return len(overall) == 2 and overall[0] != overall[1]
|
||||
|
||||
|
||||
def ruling(overall: list[str]) -> str:
|
||||
return lead(overall) or "same"
|
||||
|
||||
|
||||
def fallen(counted: dict[str, list[str]]) -> list[str]:
|
||||
"""Each dimension, Overall aside, that the seats rule worse by a lead of two."""
|
||||
return [name for name, column in zip(DIMENSIONS[:-1], zip(*counted.values())) if ruling(list(column)) == "worse"]
|
||||
return [name for name, column in zip(DIMENSIONS[:-1], zip(*counted.values())) if lead(list(column)) == "worse"]
|
||||
|
||||
|
||||
def lead(votes: list[str]) -> str | None:
|
||||
"""The vote that leads each other vote by two or more, if one does."""
|
||||
return next((vote for vote in VOTES if all(votes.count(vote) >= votes.count(other) + 2 for other in VOTES if other != vote)), None)
|
||||
|
||||
Reference in New Issue
Block a user