Getting Started with WPL
Learn how to describe wellness plans in a structured, machine-readable format. This guide takes you from zero to a complete plan in four steps.
Understand the hierarchy
Every WPL plan follows the same structure: Plan > Phases > Weeks > Days > Blocks > Activities. This mirrors how real training programs are built, from periodization down to individual exercises.
Create a minimal plan
Start with the simplest valid plan: one phase, one week, one day, one block, one exercise. Every plan needs a schema reference, version, goals, and at least one phase.
{
"$schema": "https://wpl.dev/schemas/wpl/v1.schema.json",
"version": "1.6.0",
"plan": {
"id": "my_first_plan",
"name": "My First Workout",
"type": "workout",
"visibility": "private",
"goals": [{
"id": "goal_1",
"type": "primary",
"category": "strength",
"name": "Build strength"
}],
"phases": [{
"id": "phase_1",
"name": "Week 1",
"order": 1,
"weeks": [{
"id": "week_1",
"order": 1,
"days": [{
"id": "day_1",
"day_of_week": 1,
"name": "Full Body",
"type": "training",
"blocks": [{
"id": "main",
"type": "main",
"order": 1,
"activities": [{
"id": "ex_1",
"type": "exercise",
"exercise_ref": "push_up",
"name": "Push-ups",
"prescription": {
"type": "sets_reps",
"sets": 3,
"reps": { "target": 10 }
}
}]
}]
}]
}]
}]
}
} Add personalization
Define inputs (client data) and rules (conditions and actions). When conditions are met, actions automatically modify the plan. This is how one template serves many clients.
"personalization": {
"inputs": [{
"id": "fitness_level",
"type": "enum",
"options": ["beginner", "intermediate", "advanced"]
}],
"rules": [{
"id": "beginner_adjustment",
"condition": {
"field": "fitness_level",
"op": "==",
"value": "beginner"
},
"actions": [
{ "type": "reduce_sets", "count": 1, "scope": "plan" },
{ "type": "increase_rest", "duration": { "value": 30, "unit": "seconds" }, "scope": "plan" }
]
}]
} Add progress tracking
Define checkpoints for regular check-ins, a points system for motivation, and streaks for habit building. Progress tracking is part of the plan definition, not an afterthought.
"progress": {
"checkpoints": [{
"id": "week_1_check",
"name": "Week 1 Check-in",
"trigger": {
"type": "time",
"value": { "week": 1, "day": 7 }
},
"measurements": [
{ "metric": "weight", "unit": "kg" }
]
}],
"points_system": {
"enabled": true,
"rules": [
{ "action": "complete_workout", "points": 10 },
{ "action": "streak_7_days", "points": 200 }
]
}
} Ready for more?
Dive into the full specification or explore example plans in the playground.