Repository navigation
Release v4.48.0
Screenplay applications can now be composed from focused files with imports, specifications can say what sets off slices that are not driven by a command, and four sample applications show the whole language in use.
Added
import "<path or glob>"imports.playfiles relative to the importing file, with**,*,?and... At the top level it brings in whole documents; inside amoduleorfeatureit places each imported file there, so a file can hold just aslice. A file matched by several imports is imported once, at the deepest placement. See Imports.screenplay <file>compiles the application that file is the root of, andIPlayFileCompiler.CompileApplication(path)does the same from code. Folder compilation, workspaces and the executable semantic model resolve imports the same way.- Specification actions:
given clockandwhen clock,when trigger,given captureandwhen capture, andwhen querywiththen result [exactly]andthen no result.when querybinds to the executable model today; the others are checked against the application and fail closed until the executable model admits them. - Diagnostics
PLAY0454–PLAY0460for file imports andPLAY0461–PLAY0468for specification actions. - The VS Code extension validates a workspace folder as one application: names declared in other files are not reported as unknown, and a file an import places is checked in its placement. Import paths and specification steps are highlighted, explained on hover and completed in VS Code and Monaco.
- The event model board shows what sets off a specification that is not a command.
- Sample applications in
Samples: Library, Invoicing (every construct in the language), Commerce and TimeTracking (focused files composed with imports). - The
@cratis/screenplay-compilerpackage parses file imports and specification actions, andcompileApplicationassembles an application from a map of documents.
Fixed
- A query written with its key on the header line (
query X => RM? by id Type) no longer crashes the compiler when a command reads that view; the diagnostic says to putbyon its own line in the query body. - Bare enumeration members in
produces whenconditions and in specification values, andDateTimevalues written as ISO 8601 instants such as2026-10-05T08:00:00Z, now bind in the executable semantic model the way the compiler already accepted them.