def delegation_behavior_journey() -> Scenario:
"""Exercise success, containment, lineage, depth and tenant scope."""
return Scenario(
"scaffold-delegation-behavior",
(
EvalStep(
RESEARCH_PROMPT,
(
ResponseEquals("Signal books coordinated lighthouse messages."),
ToolSucceeded("run_agent"),
AttributeEquals("lineage_valid", True),
AttributeEquals("child_identity_valid", True),
),
conversation="research",
scope="owner",
),
EvalStep(
PRIVATE_PROMPT,
(
ResponseEquals("The retained manual says cobalt at 2.4 metres."),
ToolCalled("run_agent", times=0),
),
conversation="private",
scope="owner",
),
EvalStep(
CHILD_FAILURE_PROMPT,
(
ResponseEquals("The child failed; the parent continued."),
ToolSucceeded("run_agent"),
AttributeEquals("child_failure_contained", True),
),
conversation="failure",
scope="owner",
),
EvalStep(
DEPTH_PROMPT,
(
ResponseEquals("Nested delegation was bounded."),
ToolSucceeded("run_agent"),
AttributeEquals("depth_ceiling_enforced", True),
),
conversation="depth",
scope="owner",
),
EvalStep(
SCOPE_PROMPT,
(
ResponseEquals("Scoped children remained isolated."),
AttributeEquals("scope_isolated", True),
),
conversation="scope",
scope="owner",
),
),
tags=frozenset({"delegation", "scaffold", "integration"}),
)