2.8 KiB
Domain Scenario Loop - Repo Adapter
Purpose
This repository now supports two outer-loop capture modes:
run-casefor one concrete domain question;run-scenariofor a linked multi-step domain chain that should reuse one assistant session.run-packfor a whole domain question pool grouped into several scenarios.run-pack-loopfor an autonomous analyst/coder loop over a whole domain pack.
run-scenario is the preferred capture mode for domains where the user's next question depends on the previous result set.
run-pack is the preferred capture mode when the user brings a full domain pool that should be kept in one aggregate backlog.
Runtime contract
The scenario runner does not introduce a new product runtime.
It reuses:
POST /api/assistant/messageGET /api/assistant/session/:session_id- current backend LLM/profile configuration
- current address/deep routing inside the product
Artifact contract
Scenario artifacts live under:
artifacts/domain_runs/<scenario_id>/
Top-level artifacts:
scenario_brief.mdscenario_manifest.jsonscenario_state.jsonscenario_summary.mdscenario_output.mdfinal_status.md
Per-step artifacts:
steps/<step_id>/output.mdsteps/<step_id>/debug.jsonsteps/<step_id>/turn.jsonsteps/<step_id>/session.jsonsteps/<step_id>/assistant_response.jsonsteps/<step_id>/step_state.json
Pack artifacts live under:
artifacts/domain_runs/<pack_id>/
pack_manifest.jsonpack_state.jsonpack_summary.mdfinal_status.mdscenarios/<scenario_id>/...
Placeholder contract
Scenario questions can reference earlier step outputs with placeholders such as:
{{step_01_inventory.entries[0].item}}{{semantic_memory.active_result_set_id}}
This keeps carryover explicit and machine-readable.
Status contract
Scenario capture uses four operational statuses:
acceptedpartialblockedneeds_exact_capability
partial means the scenario executed, but one or more steps still need route hardening, evidence hardening, or presentation hardening.
needs_exact_capability means the scenario is valid for the project, but the current contour still lacks the exact route or capability needed to answer it.
In autonomous pack-loop mode, partial and needs_exact_capability are non-terminal by default. The loop should continue domain enablement work until one of these happens:
- analyst quality reaches the configured acceptance gate, normally
>= 80; - the analyst marks
requires_user_decision = truebecause the next step would otherwise require guessing a missing required observation, making an architecture-risky change, accepting a hacky/brittle workaround, or choosing a business-critical tradeoff without enough evidence; - the runtime is truly blocked;
- the loop reaches
max_iterations.