Scenario generation

From Vrooli/Vrooli · View interactive version

Scenario generation is an AI agent skill from the GitHub repository Vrooli/Vrooli. Reference knowledge for creating and improving Vrooli scenarios. Use this skill when authoring implementation plans for idea-type backlog items so the plan includes the correct operational steps, CLI

How to use this skill

Skill file

Scenario Generation

Purpose

Reference knowledge for creating and improving Vrooli scenarios. Use this skill when authoring implementation plans for idea-type backlog items so the plan includes the correct operational steps, CLI commands, and tool integrations.

This is not an orchestration script — it describes what tools exist and how to use them, so that plans can include the right steps for the specific situation.

Required Reading

Scenario Scaffolding

Listing Templates

vrooli scenario template list

Selecting a Template

| Scenario Characteristic | Recommended Template |

|-------------------------|---------------------|

| Has a web UI | react-vite |

| API-only / backend service | Go or API-focused template |

| CLI tool | CLI-focused template |

When unsure, react-vite is a safe default for anything with a user-facing component.

Generating the Scaffold

vrooli scenario generate <template> --id <name> --display-name "<title>" --description "<one-line purpose>"

Follow the template's post-generation checklist (dependency installs, go mod tidy, etc.).

PRD Workflow (Preserve-First)

Always check for an existing PRD baseline before generating one from scratch. This preserves user-provided or previously refined specifications.

Decision Flow

Does an existing PRD exist (archive/PRD.md, or scenarios/<name>/PRD.md)?
  → Yes → Copy to scenarios/<name>/PRD.md as baseline, then validate/fix
  → No  → Generate from context (fallback path)

Validate and Fix Existing PRD

prd-control-tower prd validate <name> --json
prd-control-tower prd fix <name> --auto --json
prd-control-tower prd validate <name> --json

Generate PRD (Fallback Only)

Only when no viable baseline exists or fix attempts leave it invalid:

prd-control-tower prd generate <name> --context-file /tmp/prd_context_<name>.md --publish --json

The context file should synthesize information from the backlog item's plan, workshop rounds, research findings, and archive materials.

Requirements Workflow (Preserve-First)

Same preserve-first pattern as PRD.

Decision Flow

Does an existing requirements baseline exist (archive/requirements/index.json)?
  → Yes → Copy to scenarios/<name>/requirements/, then validate/fix
  → No  → Generate from PRD (fallback path)

Validate and Fix Existing Requirements

prd-control-tower requirements validate <name> --json
prd-control-tower requirements fix <name> --json
prd-control-tower requirements validate <name> --json

Generate Requirements (Fallback Only)

prd-control-tower requirements generate <name> --context-file /tmp/requirements_context_<name>.md --json
prd-control-tower requirements validate <name> --json

Archive and Staging Material Incorporation

Backlog items may contain refined materials that should be incorporated into the scenario.

Material Sources (Priority Order)

  1. enhance/ staging materials (preferred) — pre-synthesized by the workshop enhance step:
  1. archive/ raw materials (fallback) — user-provided files when staging doesn't exist:

Incorporation Rules

Swarm-Manager Idea Handoff

When you are processing an idea backlog item that originated in swarm-manager, look for an execution handoff package at <item-folder>/handoff/.

Handoff Files

Handoff Rules

Ecosystem-Manager Integration

After initializing or updating a scenario, use ecosystem-manager to create an improvement task that drives iterative agent development.

Creating Tasks from a Swarm-Manager Idea Handoff

When a swarm-manager handoff exists, always pass it through to ecosystem-manager:

HANDOFF_DIR="<absolute path to item-folder>/handoff"
ITEM_FOLDER="<absolute path to item-folder>"

ecosystem-manager task add --steer-profile <profile-id> \
  --handoff-dir "$HANDOFF_DIR" \
  --origin-source swarm-manager \
  --origin-backlog-item idea/<item-name> \
  --origin-item-folder "$ITEM_FOLDER" \
  scenario <name>

For existing scenarios, switch task add to task improve:

ecosystem-manager task improve --steer-profile <profile-id> \
  --handoff-dir "$HANDOFF_DIR" \
  --origin-source swarm-manager \
  --origin-backlog-item idea/<item-name> \
  --origin-item-folder "$ITEM_FOLDER" \
  scenario <name>

--handoff-dir validates the handoff package and auto-loads brief.md into task notes if no explicit --notes or --notes-file was provided. You may still pass --notes-file "$HANDOFF_DIR/brief.md" explicitly when you want the command itself to make that coupling obvious.

Creating Improvement Tasks

# With a steering profile (works for both new and existing scenarios)
ecosystem-manager task improve --steer-profile <profile-id> scenario <name>

# With a single steer mode (improver tasks only)
ecosystem-manager task improve --steer-mode "<mode>" scenario <name>

# With an ordered list of steer modes (improver tasks only)
ecosystem-manager task improve --steer-queue "progress,test,refactor" scenario <name>

Creating Generator Tasks (New Scenarios)

ecosystem-manager task add --steer-profile <profile-id> scenario <name>

Validate Before Creating

ecosystem-manager task improve --dry-run --steer-profile balanced scenario <name>

For swarm-manager idea runs, also verify the created task retained the upstream contract:

ecosystem-manager task show <task-id> --json

Confirm the response includes:

Ensure Queue is Running

ecosystem-manager queue status
ecosystem-manager queue start  # if paused

Steering Strategy Selection

| Scenario Characteristic | Recommended Profile | Reasoning |

|-------------------------|-------------------|-----------|

| Newly initialized, needs broad first pass | balanced or rapid-mvp | Covers all aspects of implementation |

| Quality/stability focus | production-ready | Extra test and refactor passes |

| Heavy UI/UX component | ux-excellence | Dedicated UX iteration modes |

| Test debt or refactoring | refactor-test-focus | Prioritizes code quality |

| Single improvement focus | --steer-mode | Single-pass (e.g., "test") |

| Unique improvement needs | --steer-queue | Tailor mode order to requirements |

Rules:

Validation Tools

After initialization, capture baseline metrics for handoff:

vrooli scenario status <name>
scenario-completeness-scoring score <name>
scenario-auditor audit <name> --timeout 240

Expect low completeness scores and auditor failures for freshly initialized scenarios — this is normal. Capture the results for notes and handoff to the improvement agent.

Scenario Documentation Initialization

Ensure these files exist with baseline content (the template may have created some already):

Use enhance/doc-outlines.md as a guide when available.

Anti-Patterns

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.