Repository navigation
Quick start
Start by describing one public operation. You do not need a project implementation to write this contract.
main.expec
type PlayerStateSnapshot {
playerName: Text
}
concept StoreGame {
depends on PlayerStateSnapshot
public save
capability save(snapshot: PlayerStateSnapshot) returns Nothing {
promises "Save the player's snapshot."
}
}PlayerStateSnapshot declares the data. StoreGame declares the contract. public save exposes the declared capability; it does not create one. returns Nothing means the operation produces no value. The promise is human-readable specification text, not a generated save implementation.
Use Node 24.19.0 and npm 11.20.0. Download and install the .tgz from pr-44 as explained in the released README. These are GitHub release assets; an npm-registry installation is not assumed.
Save the source above as main.expec, then save expec.json beside it:
{
"formatVersion": 1,
"version": "0.1.0",
"build": { "entries": ["main.expec"] },
"outputs": []
}From that directory:
node node_modules/executable-specification-language/dist/cli-entry.js checkThis configuration checks the source and requests no generated outputs. Change save to saveGame in the public list only: the name no longer resolves. Fix either the declaration or the public list so they agree.
For a real generated test journey, use Examples and scenarios, then the README's shopping application and driver. For project initialization, installation and output selection, use Project configuration and commands.
Related: Types · Capabilities and contracts · Troubleshooting
Home · Keyword index · Released source 36748015 · pr-44 package
Reference edition: October 7, 2026. Checked language examples do not establish implemented runtime behavior.