Skip to content

Extraction result

The Interpreter writes one JSON document, extraction-result.json, plus a generated Screenplay .play file describing the same model in Screenplay’s declarative language. This page documents the JSON shape; the .play file is what you’d hand-edit or run.

ExtractionResult

prologueId · systemName

ExtractedModule

name · description

ExtractedFeature

name · description

(features can nest)

ExtractedSlice

name · type · description

ExtractedCommand

name · properties · validations

ExtractedEvent

name · properties

ExtractedReadModel

name · properties

ExtractedProjection

name · sourceEvents

ExtractedConstraint

name · property · onEvent

PropertyTypePurpose
prologueIdguidWhich Prologue these captures belonged to
systemNamestringThe system name — heuristic-derived, or set by LLM refinement
modulesarray of ExtractedModuleThe top-level structure the Interpreter inferred
PropertyTypePurpose
namestringModule name
descriptionstringOptional description
featuresarray of ExtractedFeatureFeatures within the module
PropertyTypePurpose
namestringFeature name
descriptionstringOptional description
subFeaturesarray of ExtractedFeatureNested features, when the evidence groups naturally into sub-areas
slicesarray of ExtractedSliceSlices within the feature
PropertyTypePurpose
namestringSlice name
type"StateChange" | "StateView" | "Automation" | "Translation"Which of the four Cratis slice types the evidence matches
descriptionstringOptional description
commandsarray of ExtractedCommandAt most one, for a StateChange slice
eventsarray of ExtractedEventThe facts the slice produces
readModelsarray of ExtractedReadModelFor a StateView slice
projectionsarray of ExtractedProjectionHow read models are built from events
constraintsarray of ExtractedConstraintUniqueness/invariant rules inferred from rejected requests

commands is a list rather than a nullable single value — a StateView/Automation/Translation slice simply has an empty list, so the shape never carries a null.

ExtractedCommand, ExtractedEvent, ExtractedReadModel

Section titled “ExtractedCommand, ExtractedEvent, ExtractedReadModel”
PropertyTypePurpose
namestringType name
descriptionstringOptional description (commands only)
propertiesarray of ExtractedPropertyThe fields on this type
validationsarray of ExtractedValidationRuleCommand-only — see below

ExtractedProperty: name, type, isRequired (bool), maxLength (int, 0 when not applicable).

ExtractedProjection and ExtractedConstraint

Section titled “ExtractedProjection and ExtractedConstraint”
TypeProperties
ExtractedProjectionname, sourceEvents (array of event type names the projection consumes)
ExtractedConstraintname, property, onEvent (which event’s property the constraint governs)
PropertyTypePurpose
propertystringWhich command property the rule applies to
kind"Required" | "MaxLength" | "MinLength" | "Pattern"The kind of validation the evidence implied
argumentstringThe rule’s argument (a length, a pattern)
messagestringThe message associated with a rejection

The generated .play file is a working starting point, not a finished model — run it directly with cratis run to boot it as a local Stage sandbox, bring it into Studio to keep shaping it visually, or hand-edit the .play file itself, since Screenplay is meant to be authored by hand as much as generated.