Skip to content

Workflow — Behaviour simulation

Generated from the architecture model

This page is rendered from model/**/*.yaml by tools/docs_model during mkdocs build. Edit the YAML, not this page; hand-written design lives on the linked service, platform and plane pages.

Workflow id behaviour-simulation · version 1 · Draft (Draft → InReview → Published → Deprecated, BC-04)
Coordinator behavior-simulator-coordinator · family Testing & Quality
Owner service WorkflowEngineService (BC-38) under Run Control (BC-03)
Starts on GenerationCompleted from GenerationRecipeService (event)
Steps 4 · gated 0 · agents 2
Budget per run 600000 tokens · cap 60.0 USD · 240 min
Descriptor workflow-definition-v1 · schema
Status target

Runs the acceptance scenarios of a generated product end to end in the sandbox with agents, scores the results into evaluation records and stores the validated results.

Authored design, Draft (D54, D57)

These definitions were authored on 2026-10-14 from the coordinator cards as design assumptions. None is published, evaluated or has run; agents are named by id as design bindings, not as tested integrations.

Definition

flowchart TD
    start(("GenerationCompleted"))
    prepare_sandbox[["tool: Prepare the sandbox"]]
    run_scenarios["Run the scenarios"]
    score["Score the results"]
    store_results["Store the validated results"]
    start --> prepare_sandbox
    prepare_sandbox --> run_scenarios
    run_scenarios --> score
    score --> store_results
    done(("WorkflowRunCompleted"))
    store_results --> done
    classDef gated stroke:#B45309,stroke-width:2px
Hold "Alt" / "Option" to enable pan & zoom

Shapes: rectangle = agent attempt · double rectangle = tool call · stadium = human decision · diamond = condition evaluated by the engine · parallelogram = fan-out or join · circle = timer · cylinder = sub-workflow · flag = compensation. A thick amber border marks a gated step.

Steps

# Step Kind Runs Gate Class Depends on Retry Timeout Compensation What it does
1 Prepare the sandbox
prepare-sandbox
tool shell-sandbox none sandbox — fixed ×1 PT30M — Builds and starts the generated product in the sandbox pool with seeded data.
2 Run the scenarios
run-scenarios
agent e2e-testing none sandbox prepare-sandbox exponential ×2 PT2H — Drives the scenarios through the UI and the APIs; every step leaves a trace.
3 Score the results
score
agent qa-engineer none read run-scenarios exponential ×2 PT30M — Scores task success, regressions and flakiness into evaluation records for QualityScoreService.
4 Store the validated results
store-results
agent qa-engineer none sandbox score exponential ×2 PT30M — Stores results and evaluation records with lineage to the generated outputs.

Gates and approvals

No approval is required: every step runs in the read or sandbox class; the agents' own tool calls still carry their classes (D21). Compensation steps run in reverse order of the succeeded steps on failure after the last checkpoint; a step without a compensation leaves its sandbox output in place and the run ends Failed with the evidence (ADR-0014, recovery not replay).

Inputs, outputs and events

Direction Name Descriptor
in acceptance-scenarios artifact-v1
in generated-outputs change-set-v1
out simulation-results artifact-v1

Starts on GenerationCompleted; emits ArtifactValidated, EvaluationCompleted, plus the engine's WorkflowRunStarted, StepReady, StepRunStateChanged and WorkflowRunCompleted / WorkflowRunFailed and Run Control's run and attempt events (ADR-0014).

Decisions and traceability

FR: FR-08 Validated artifacts with lineageXL: XL-08 Evaluate before promotion · XL-09 Generation yields a usable consumerFUX: FUX-10 Evaluation evidenceADRs: ADR-0014, ADR-0021 · ADR index

Definition authored 2026-10-14 from the coordinator card behavior-simulator-coordinator (D54); Draft until an evaluation gate (ADR-0021) and a review publish it as a BC-04 asset release.