Standards and schema for a real-time program logistics description markup language.
- Current Version: 0.1.0a1 (Alpha)
- Schema Version: 0.1.0-alpha
- Status: Early development - breaking changes may occur
Rhylthyme is a JSON-based markup language for describing real-time programs that coordinate multiple parallel tracks of work with resource constraints, timing dependencies, and flexible execution patterns. It's designed for scenarios like restaurant kitchens, laboratory workflows, manufacturing processes, and any situation requiring coordinated real-time execution.
This alpha release includes:
- âś… Basic program structure with tracks and steps
- âś… Simplified "on" trigger syntax
- âś… Resource constraints
- âś… Variable and fixed duration types
- âś… Batch processing with staggering
- 🔄 Environment integration (in progress)
- 🔄 Advanced validation rules (in progress)
- ❌ Resource specifications (planned)
- ❌ Environment schemas (planned)
The Rhylthyme schema defines programs as JSON objects with the following key components:
programId(required): Unique identifier for the programname(required): Human-readable namedescription: Detailed descriptionversion: Program version number (should match schema version)environmentType: Type of environment (e.g., 'kitchen', 'laboratory')actors: Number of available workers/operatorstracks(required): Array of parallel execution tracksresourceConstraints(required): Resource usage limitsstartTrigger: How the program begins execution
{
"programId": "restaurant-breakfast",
"name": "Restaurant Breakfast Service",
"description": "Professional restaurant breakfast service workflow with coordinated cooking and plating",
"version": "0.1.0-alpha",
"environmentType": "kitchen",
"actors": 2,
"startTrigger": {
"type": "manual"
},
"tracks": [
{
"trackId": "scrambled-eggs",
"name": "Scrambled Eggs",
"description": "Multiple orders of scrambled eggs",
"batch_size": 3,
"steps": [
{
"stepId": "eggs-crack-whisk",
"name": "Crack and Whisk Eggs",
"description": "Crack eggs into a bowl and whisk with salt and pepper",
"task": "prep-work",
"trigger": {
"type": "programStart"
},
"duration": {
"type": "fixed",
"seconds": 60
}
},
{
"stepId": "eggs-heat-pan",
"name": "Heat Pan",
"description": "Place pan on stove and heat to medium",
"trigger": {
"on": "eggs-crack-whisk"
},
"duration": {
"type": "variable",
"minSeconds": 60,
"maxSeconds": 120,
"defaultSeconds": 90,
"triggerName": "pan-ready"
},
"task": "stove-burner"
}
]
}
],
"resourceConstraints": [
{
"task": "stove-burner",
"maxConcurrent": 4,
"description": "Maximum number of stove burners that can be used simultaneously"
}
]
}Tracks represent parallel workflows within a program. Each track can have multiple steps and can be executed multiple times (batch processing).
trackId(required): Unique identifiername(required): Human-readable namedescription: Detailed descriptionbatch_size: Number of iterations (default: 1)stagger: Time delay between batch instancespriority: Execution priority (lower = higher priority)steps(required): Array of sequential steps
{
"trackId": "bacon",
"name": "Bacon",
"description": "Multiple orders of bacon",
"batch_size": 2,
"steps": [
{
"stepId": "bacon-prep",
"name": "Prepare Bacon",
"description": "Place bacon strips in cold pan",
"task": "prep-work",
"trigger": {
"type": "programStart"
},
"duration": {
"type": "fixed",
"seconds": 60
}
},
{
"stepId": "bacon-cook",
"name": "Cook Bacon",
"description": "Cook bacon, flipping occasionally until crispy",
"trigger": {
"on": "bacon-prep"
},
"duration": {
"type": "variable",
"minSeconds": 480,
"maxSeconds": 720,
"defaultSeconds": 600,
"triggerName": "bacon-done"
},
"task": "stove-burner"
}
]
}Steps are the individual work units within a track. They define what work is done, how long it takes, and when it starts.
stepId(required): Unique identifiername(required): Human-readable namedescription: Detailed descriptiontask: Resource/tool required for this steptrigger(required): When this step beginsduration(required): How long the step takesresources: Array of required resourcesflex: Whether this step can expand to fill available time
{
"type": "programStart"
}Step begins immediately when the program starts.
{
"on": "eggs-crack-whisk"
}Step begins when the specified step completes.
{
"on": "eggs-crack-whisk",
"offsetSeconds": 30
}Step begins 30 seconds after the specified step completes.
{
"on": "eggs-crack-whisk",
"event": "start"
}Step begins when the specified step starts (not when it completes).
{
"type": "manual",
"triggerName": "start-cooking"
}Step begins when manually triggered.
{
"type": "fixed",
"seconds": 60
}Step takes exactly 60 seconds.
{
"type": "variable",
"minSeconds": 480,
"maxSeconds": 720,
"defaultSeconds": 600,
"triggerName": "bacon-done"
}Step duration varies based on conditions, with manual completion trigger.
{
"type": "fixed",
"timeString": "2m30s"
}Duration specified as a human-readable time string.
Resource constraints limit how many instances of a task can run simultaneously.
{
"resourceConstraints": [
{
"task": "stove-burner",
"maxConcurrent": 4,
"description": "Maximum number of stove burners that can be used simultaneously"
},
{
"task": "toaster",
"maxConcurrent": 2,
"description": "Maximum number of toasters that can be used simultaneously"
}
]
}{
"trackId": "toast",
"name": "Toast",
"description": "Multiple orders of toast",
"batch_size": 4,
"stagger": "30s",
"steps": [
{
"stepId": "toast-cook",
"name": "Make Toast",
"description": "Place bread in toaster and toast until golden brown",
"trigger": {
"type": "programStartOffset",
"offsetSeconds": 120
},
"duration": {
"type": "fixed",
"seconds": 210
},
"task": "toaster"
}
]
}This creates 4 toast orders, each starting 30 seconds after the previous one.
{
"stepId": "wait-for-eggs",
"name": "Wait for Eggs",
"description": "Flexible waiting period while eggs cook",
"task": "waiting",
"trigger": {
"on": "eggs-start-cooking"
},
"duration": {
"type": "variable",
"minSeconds": 0,
"maxSeconds": 300,
"defaultSeconds": 180
},
"flex": true
}Flexible steps can expand or contract to fill available time gaps.
Programs can reference environment definitions that specify available resources and their capabilities.
{
"programId": "restaurant-breakfast",
"name": "Restaurant Breakfast Service",
"version": "0.1.0-alpha",
"environmentType": "kitchen",
"environment": "restaurant-standard.json"
}The schema enforces:
- Required fields are present
- Step dependencies are valid
- Resource constraints are reasonable
- Duration values are positive
- Track and step IDs are unique within their scope
{
"programId": "simple-cooking",
"name": "Simple Cooking",
"version": "0.1.0-alpha",
"tracks": [
{
"trackId": "main",
"name": "Main Track",
"steps": [
{
"stepId": "prep",
"name": "Preparation",
"task": "prep-work",
"trigger": {"type": "programStart"},
"duration": {"type": "fixed", "seconds": 60}
},
{
"stepId": "cook",
"name": "Cooking",
"task": "stove-burner",
"trigger": {"on": "prep"},
"duration": {"type": "fixed", "seconds": 300}
}
]
}
],
"resourceConstraints": [
{"task": "stove-burner", "maxConcurrent": 2}
]
}{
"programId": "breakfast-service",
"name": "Breakfast Service",
"version": "0.1.0-alpha",
"actors": 3,
"tracks": [
{
"trackId": "eggs",
"name": "Eggs Station",
"batch_size": 5,
"stagger": "45s",
"steps": [
{
"stepId": "eggs-prep",
"name": "Prepare Eggs",
"task": "prep-work",
"trigger": {"type": "programStart"},
"duration": {"type": "fixed", "seconds": 30}
},
{
"stepId": "eggs-cook",
"name": "Cook Eggs",
"task": "stove-burner",
"trigger": {"on": "eggs-prep"},
"duration": {"type": "variable", "minSeconds": 120, "maxSeconds": 180, "defaultSeconds": 150}
}
]
},
{
"trackId": "bacon",
"name": "Bacon Station",
"batch_size": 3,
"stagger": "60s",
"steps": [
{
"stepId": "bacon-cook",
"name": "Cook Bacon",
"task": "stove-burner",
"trigger": {"type": "programStartOffset", "offsetSeconds": 30},
"duration": {"type": "fixed", "seconds": 600}
}
]
}
],
"resourceConstraints": [
{"task": "stove-burner", "maxConcurrent": 4},
{"task": "prep-work", "maxConcurrent": 2}
]
}{
"stepId": "plate-breakfast",
"name": "Plate Breakfast",
"description": "Plate the complete breakfast when all components are ready",
"task": "plating",
"trigger": {
"on": "eggs-cook",
"on": "bacon-cook",
"on": "toast-cook"
},
"duration": {"type": "fixed", "seconds": 30}
}{
"stepId": "serve-breakfast",
"name": "Serve Breakfast",
"description": "Serve the plated breakfast after a brief rest period",
"task": "service",
"trigger": {
"on": "plate-breakfast",
"offsetSeconds": 15
},
"duration": {"type": "fixed", "seconds": 20}
}{
"stepId": "preheat-oven",
"name": "Preheat Oven",
"description": "Start preheating when cooking begins",
"task": "oven",
"trigger": {
"on": "eggs-cook",
"event": "start"
},
"duration": {"type": "fixed", "seconds": 300}
}schemas/program_schema_0.1.0-alpha.json- Main program schema (Alpha version)schemas/program_schema.json- Latest program schema (symlink to alpha version)schemas/environment_schema.json- Environment definitions (coming soon)schemas/resource_schema.json- Resource specifications (coming soon)
-
Add version field to all programs:
{ "version": "0.1.0-alpha" } -
Update trigger syntax (optional but recommended):
- Old:
{"type": "afterStep", "stepId": "step-id"} - New:
{"on": "step-id"}
- Old:
-
Schema validation now requires version field
- Basic program structure
- Simplified trigger syntax
- Resource constraints
- Environment schemas
- Advanced validation
- Resource specifications
- Template system
- Advanced planning algorithms
- Performance optimizations
- Stable API
- Complete documentation
- Migration tools
- Ecosystem tools
This is an alpha release. We welcome feedback and contributions, but please note that breaking changes may occur. Please:
- Test thoroughly with your use cases
- Report issues with detailed examples
- Suggest improvements with concrete proposals
- Be prepared for schema changes
Apache License 2.0