with one click
help
Step-by-step guide for getting started with event-driven development
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Step-by-step guide for getting started with event-driven development
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
builds an automation slice from an event model
builds a state-view slice from an event model
Generate a sample configuration for slices
builds a state-change slice from an event model
analyzes test files and generates slice.json specifications for drift detection
| name | help |
| description | Step-by-step guide for getting started with event-driven development |
Welcome! This guide will walk you through the complete workflow from installation to running your first event-driven application.
This framework helps you build event-sourced applications using event modeling. The workflow is:
Let me guide you through each step:
If you're reading this, congratulations - the skills are already installed and working!
The following skills are now available:
/fetch-config - Receive event model from modeling tool/gen-skeleton - Generate backend skeleton/gen-state-change - Generate command handlers/gen-state-view - Generate read models/gen-automation - Generate automation processors/gen-ui - Generate React UI with shadcn/ui/help - This guideYou have two options:
If you want to try the workflow without modeling, use our demo config:
cp .claude/skills/help/templates/demo-config.json config.json
This includes a simple shopping cart domain with:
Use an Event Modeling Tool (recommended: Miro, Mural, or similar)
Export to config.json
# Start the config receiver server
/fetch-config
This starts a server on http://localhost:3001 that waits for your event modeling tool to POST the config.
Expected config.json structure:
{
"slices": [
{
"id": "unique-id",
"title": "Add Item",
"sliceType": "STATE_CHANGE",
"aggregate": "Cart",
"command": { "name": "AddItem", "fields": [...] },
"events": [{ "name": "ItemAdded", "fields": [...] }],
"specifications": [...]
}
]
}
Once you have a config.json file, generate your application skeleton:
/gen-skeleton
You'll be prompted for:
This generates:
What gets created:
your-app/
├── src/
│ ├── common/ # Shared utilities (event store, DB, etc.)
│ ├── core/ # Core types and patterns
│ ├── slices/ # Your domain slices (generated next)
│ └── events/ # Event definitions
├── supabase/ # Database migrations
├── server.ts # Express server
├── package.json # Dependencies
└── .env # Configuration
After generation:
npm install # Install dependencies
npm run build # Verify TypeScript compiles
State change slices handle commands and emit events:
/gen-state-change
This will:
State view slices build queryable read models from events:
/gen-state-view
This creates:
Automation slices run scheduled tasks:
/gen-automation
This creates:
Ralph is an AI agent that automatically implements your slices. Here's how:
Edit .slices/index.json and change a slice's status to "Planned":
{
"id": "...",
"title": "Add Item",
"status": "Planned", // Change from "Created" to "Planned"
"folder": "additem"
}
./ralph.sh
Ralph will:
.slices/{folder}/.slice.jsonRalph monitors:
.slices/index.json - Tracks which slices to implement.slices/{folder}/.slice.json - Detailed specificationsprogress.txt - Logs each iterationAGENTS.md - Learnings for future iterationsRalph runs until:
<promise>COMPLETE</promise>)<promise>NO_TASKS</promise>)You can watch Ralph work:
tail -f progress.txt # Watch progress in real-time
Once slices are implemented, start your app:
npm run dev
Your application starts on http://localhost:3000 with:
/api/*/api-docs# Health check
curl http://localhost:3000/api/health
# Call a command (requires auth)
curl -X POST http://localhost:3000/api/add-item \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"cartId": "cart-123", "itemId": "item-456"}'
# Query a read model
curl http://localhost:3000/api/carts \
-H "Authorization: Bearer YOUR_TOKEN"
/fetch-config)/gen-state-change or /gen-state-view.slices/index.json./ralph.sh/gen-state-change or /gen-state-view.slices/index.json./ralph.shYou can always implement slices manually:
.slices/{folder}/.slice.jsonCLAUDE.md and AGENTS.mdsrc/slices/{folder}/src/slices/{folder}/*.test.tsnpm run build && npm test.slices/index.jsonAfter backend slices are done:
/gen-ui
This creates a React frontend with:
Commands don't directly mutate state. Instead:
Each slice is self-contained:
src/slices/AddItem/
├── AddItemCommand.ts # decide() + evolve() logic
├── AddItem.test.ts # Given/when/then tests
├── routes.ts # HTTP endpoint
└── .slice.json # Specification
Tests use given/when/then:
given([CartCreated, ItemAdded]) // Precondition events
.when(AddItem) // Command to test
.then([ItemAdded]) // Expected events
Run /fetch-config to start the receiver, or create one manually.
Edit .slices/index.json and change a slice's status to "Planned".
Check progress.txt for Ralph's latest attempt. Review test output:
npm test
npm run build
# Fix TypeScript errors shown
Ralph only works on slices with status "Planned" (case insensitive).
Check .slices/index.json and ensure at least one slice has:
"status": "Planned"
Now you're ready to build event-driven applications! Here are some resources:
CLAUDE.md for project-specific guidelinesAGENTS.md for implementation patternsAsk me anything about:
Happy event-driven development!