Run Your First Slice
This walkthrough shows a slice going from Planned on your Eventmodelers board to a tested, working Cratis vertical slice in your Kotlin project — with no manual coding in between.
Prerequisites
Section titled “Prerequisites”Install the kit and connect it to a board first. The loop needs a running agent (node .build-kit/ralph-claude.js) and valid credentials in .eventmodelers/config.json.
Look at the example slice first
Section titled “Look at the example slice first”Every install ships a working example under SomeModule/SomeFeature/ — a Registration slice (a command and its event) and a Listing slice (a projection and read model). Open them before you build your own; they show every convention the kit’s build skills reproduce:
- One file per slice, with the command/event/reactor together
@Command/@EventType-style artifacts with ahandle()-shaped method that returns the event- The React screen and command wiring in
.tsx/.tsfiles beside them
Start the loop
Section titled “Start the loop”node .build-kit/ralph-claude.jsThe loop polls for two independent triggers — see Understanding the Loop — and idles quietly until one fires.
1. Mark a slice Planned on your board
Section titled “1. Mark a slice Planned on your board”On app.eventmodelers.ai, create or open a slice and set its status to Planned. For example, a “Register Author” slice might look like:
{ "id": "slice-123", "title": "Register Author", "status": "Planned", "contextName": "Authors", "sliceType": "StateChange", "commands": ["RegisterAuthor"], "events": ["AuthorRegistered"], "description": "Register a new author with name and email"}2. The kit fetches and persists the slice
Section titled “2. The kit fetches and persists the slice”The real-time subscription picks up the status change and saves the definition to .build-kit/.slices/Authors/register-author/slice.json.
3. The kit generates the vertical slice
Section titled “3. The kit generates the vertical slice”Because the slice only carries commands/events (no processors, no projections/queries), the loop routes to the build-state-change skill, which generates Authors/Registration/Registration.kt:
@Command@AllowAnonymousdata class RegisterAuthor( @CommandKey val id: String, val name: String) { fun handle(): AuthorRegistered = AuthorRegistered(AuthorName(name))}
@EventTypedata class AuthorRegistered(val name: AuthorName)4. The kit builds and tests the slice
Section titled “4. The kit builds and tests the slice”./gradlew build./gradlew test5. The kit updates the board to Done
Section titled “5. The kit updates the board to Done”Once the build and tests pass, the kit calls back to the platform and marks the slice Done — closing the loop without you touching an editor.
What’s next
Section titled “What’s next”- Try a slice with
projections/readModelset — it routes tobuild-state-viewinstead - Try a slice with
processorsset — it routes tobuild-automation - If a slice gets stuck in
InProgress, check the loop’s terminal output, confirm./gradlew buildsucceeds locally, then re-run the loop