Answer architecture round 6: split rules into ruling, rounds, base and scoring modules, read the fall sequence as one Fall state, and give the plan's reasons and the fall's their own functions
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import re
|
||||
|
||||
CAP = 3
|
||||
PASSES = ("architecture", "full scan", "security", "stability", "product-owner", "prose")
|
||||
ROUND = re.compile(r"^Answer (.+?) round ([0-9]+):")
|
||||
|
||||
|
||||
def round_counts(titles: list[str]) -> dict[str, int]:
|
||||
"""Each pass's highest round among the branch's `Answer <pass> round <n>:` commit titles; a pass with none has 0, and a title naming no known pass adds its name."""
|
||||
counts = dict.fromkeys(PASSES, 0)
|
||||
for title in titles:
|
||||
if named := ROUND.match(title):
|
||||
counts[named.group(1)] = max(counts.get(named.group(1), 0), int(named.group(2)))
|
||||
return counts
|
||||
Reference in New Issue
Block a user