Add the run loop skeleton

This commit is contained in:
2026-09-27 03:07:21 +00:00
parent 4a72460210
commit 410a601948
+26
View File
@@ -0,0 +1,26 @@
"""Entry point for a single scenario run."""
from dataclasses import dataclass
@dataclass
class Step:
action: str
target: str
note: str = ""
def run(scenario: str, site: str, max_steps: int = 40) -> list[Step]:
"""Walk one scenario against one site and return the steps that were taken."""
steps: list[Step] = []
for _ in range(max_steps):
step = decide(site, steps)
if step is None:
break
steps.append(step)
return steps
def decide(site: str, history: list[Step]) -> Step | None:
"""Pick the next action, or None when the journey is finished."""
raise NotImplementedError