scenario-refine-loop
Scenario Refine Loop
Overview
Agents fail generation QA in two symmetric ways: accepting the first roll, or rewording the whole prompt and re-rolling until the budget dies. Both skip the same two artifacts, a written rubric and a diagnosis. The loop that converges: rubric before generating, a small batch, a recorded verdict per asset, the cheapest targeted fix per failure, a hard round cap. Connection and the core loop: see the scenario skill. Critic tool contracts: scenario-asset-analysis. Baseline discipline: scenario-consistency. If a sibling skill named here is missing from your available skills, ask the user to install it (npx skills add scenario-labs/skills --skill <name>); unattended, proceed from tool schemas and flag the gap.
Quick reference
| Step | Do |
|---|---|
| 1. Rubric | Before generating, turn the brief into pass/fail lines a viewer can check ("subject centered on a plain field"), never taste words |
| 2. Generate | The smallest batch that tests the recipe; dry_run when cost matters |
| 3. Critique | asset_analyze: up to 10 images per call, one instruction embedding the rubric and a fixed per-image output shape |
| 4. Fix | Route every fail line to the cheapest fix that addresses it (table below) |
| 5. Stop | A clean round ships; three rounds without one, or one line failing twice under different fixes, means report, not respin |
When the bar is the configured brand brief rather than a task rubric, and the team's Quality Gate add-on is enabled, critique images with asset_quality_gate_run instead: its reasons and suggestions feed the fix table directly (scenario-quality-gate; where the gate is missing it degrades to this asset_analyze path).
Fix routing, cheapest first: