48 lines
1.2 KiB
Python
48 lines
1.2 KiB
Python
|
|
"""A scenario binds a use case to concrete actors, a world and a schedule."""
|
||
|
|
|
||
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
from dataclasses import dataclass, field
|
||
|
|
from typing import Sequence
|
||
|
|
|
||
|
|
from .actions import SemanticAction
|
||
|
|
from .intent import UseCase
|
||
|
|
from .observers import Watch
|
||
|
|
|
||
|
|
|
||
|
|
@dataclass(frozen=True, slots=True)
|
||
|
|
class Step:
|
||
|
|
"""One scheduled semantic action, attributed to one actor."""
|
||
|
|
|
||
|
|
id: str
|
||
|
|
actor_id: str
|
||
|
|
action: SemanticAction
|
||
|
|
expect_refusal: bool = False
|
||
|
|
|
||
|
|
|
||
|
|
@dataclass(frozen=True, slots=True)
|
||
|
|
class Scenario:
|
||
|
|
"""UseCase + Actors + World + Schedule + Surfaces + Variant."""
|
||
|
|
|
||
|
|
id: str
|
||
|
|
use_case: UseCase
|
||
|
|
steps: tuple[Step, ...]
|
||
|
|
watches: tuple[Watch, ...] = field(default_factory=tuple)
|
||
|
|
variant: str = "baseline"
|
||
|
|
|
||
|
|
|
||
|
|
@dataclass(slots=True)
|
||
|
|
class VerificationAsset:
|
||
|
|
"""A test as a durable thing with identity, maturity and lineage.
|
||
|
|
|
||
|
|
Maturity is the T0..T5 continuum. The kernel produces T5 assets: fully
|
||
|
|
deterministic, no model involvement. Agentic assets (T1) arrive in T07, and
|
||
|
|
crystallization walks an asset from T1 toward T5 in T09.
|
||
|
|
"""
|
||
|
|
|
||
|
|
id: str
|
||
|
|
scenario: Scenario
|
||
|
|
maturity: str = "T5"
|
||
|
|
parent_id: str | None = None
|
||
|
|
adaptation_history: list[dict] = field(default_factory=list)
|