Scenarios

Scenarios are the core unit of formalization in SpecLogician. Instead of one giant spec, you build a constellation of small, checkable behavior slices.

Why scenarios work well with LLMs

LLM-powered tools are great at:

  • proposing local behaviors
  • making incremental edits
  • emitting structured deltas (add/remove/edit)

They are not great at maintaining one huge globally consistent formal artifact.

Scenarios let an LLM operate on small targets while a reasoning engine handles global consistency.


Creating a scenario

speclogician ch scenario-add scenario_1 \
  --given pred_eq_ten \
  --given pred_ne_ten \
  --when act_gt_x \
  --then step1

Editing a scenario (delta-based)

Token delta format:

speclogician ch scenario-edit scenario_1 --given "+pred_gte_ten,-pred_eq_ten"

or JSON delta:

speclogician ch scenario-edit scenario_1 --given '{"add":["pred_gte_ten"],"remove":["pred_eq_ten"]}'

Removing a scenario

speclogician ch scenario-remove scenario_1

Practical advice

  • Prefer many small scenarios over a few big ones.
  • Let scenarios encode intent; let artifacts encode evidence.
  • Use diffs to measure progress: more matched scenarios, fewer inconsistencies, more artifacts formalized.