name: extend_scenario
description: >
Extends Oli.Scenarios infrastructure when required feature coverage is not yet supported by current directives. Use for adding new directive capabilities, parser/validator/schema support, handler execution paths, and infrastructure tests so downstream scenario tests can be authored via build_scenario.
Purpose
Implement missing Oli.Scenarios infrastructure so required scenario-based coverage can be delivered in the same feature stream instead of deferred.
Required Resources
Always load before expanding:
references/persona.mdreferences/expansion_triggers.mdreferences/architecture_map.mdreferences/design_principles.mdreferences/workflow.mdreferences/testing_and_validation.mdreferences/output_requirements.md
Use templates/examples as needed:
assets/templates/expansion_execution_checklist.mdassets/templates/directive_design_template.mdassets/examples/expansion_plan_example.md
Hard Guardrails
- Preserve existing scenario DSL style and naming conventions; do not invent a conflicting mini-language.
- Keep directives focused on domain-intent commands/declarations and deterministic execution semantics.
- Add/extend schema, parser, and runtime support together; do not leave partially wired directive support.
- Do not use fixture/mocking shortcuts to simulate infrastructure behavior in end-to-end scenario coverage.
- Backward compatibility is mandatory unless explicit spec-approved breaking change is documented.
- Expand scenario infrastructure at capability/workflow level, not for narrowly scoped one-off feature details.
When to Invoke This Skill
- PRD/FDD/plan marks scenario coverage as
RequiredorSuggested, but current directives cannot represent needed workflows. - Existing directive semantics are insufficient for newly scoped domain operations.
- Feature work would otherwise skip scenario coverage due infrastructure gaps.
Workflow
- Confirm the gap:
- Identify required AC/workflow coverage and show why existing directives cannot express it.
- Record exact unsupported behavior and expected YAML authoring shape.
- Design directive extension:
- Prefer extending an existing directive when semantics align.
- Introduce new directives only when extension would be ambiguous or overloaded.
- Follow
references/design_principles.mdand fillassets/templates/directive_design_template.md. - Ensure proposed expansion represents a reusable high-level action/capability, not a micro-feature toggle.
- Implement infrastructure end-to-end:
lib/oli/scenarios/directive_types.exlib/oli/scenarios/directive_parser.exlib/oli/scenarios/directive_validator.ex(as applicable)lib/oli/scenarios/engine.exlib/oli/scenarios/directives/*_handler.exand related ops modulespriv/schemas/v0-1-0/scenario.schema.jsonlib/oli/scenarios/schema.ex(if validation behavior changes)
- Update docs and discoverability:
test/support/scenarios/README.md- relevant
test/support/scenarios/docs/*.md
- Add infrastructure tests and scenario validation tests:
- parser/validator tests for new attributes and failure modes
- handler/runtime tests for success + error paths
- schema validation expectations where applicable
- Add representative scenario YAML demonstrating new capability (focused and minimal).
- Run required validation/test gates from
references/testing_and_validation.md. - If feature specs changed due expansion decisions, sync PRD/FDD/plan contracts before completion.
Output Contract
Follow references/output_requirements.md exactly when reporting completion.