AI writes the plan.
WPL keeps it safe.

WPL is an open, JSON-based language for wellness programs — a governance layer that stops AI-generated fitness plans from hallucinating unsafe or invalid content.

Open specification · v1.8.0 wpl.dev
The problem

Raw LLMs prescribe exercises that can hurt people

Benchmarked across 7 OpenAI & Anthropic models: how often did a generated plan include a contraindicated exercise — e.g. loaded squats for a client with a knee injury?

32–51%
of raw LLM plans contained contraindicated exercises
8–17%
when the same models generated through WPL
▲ 3–5× fewer unsafe plans
Raw LLM output 32–51%
With WPL governance 8–17%
0%25%50%plans with a contraindicated exercise →
Each bar starts at 0%. Solid = best model, faded = worst model, across the 7 tested. Shorter is safer.
The remaining 8–17%

Why do some unsafe plans still slip through?

Because validation checks the plan's format, while safety rules only block dangers they've been taught. The leftover 8–17% traces to three known, fixable gaps:

📋 Missing rules

  • The rules engine is an explicit blacklist — it only blocks contraindications someone has encoded
  • Rare conditions or unusual exercise variants can slip past
  • Fix: grow rule coverage

⚠️ Compile failures

  • ~9% of AI outputs were malformed WPL-AI
  • If a plan can't compile, safety rules never run on it
  • Fix: reject & retry instead of passing through

📏 Measurement gaps

  • ~47% of plans came back shorter than requested, so some violations never got a chance to trigger
  • Part of the residual is scoring artifact, not danger
  • Fix: validate completeness

These fixes are not part of the WPL spec — they belong to the orchestration your app builds around it: retry or reject plans that fail to compile, validate completeness before accepting a plan, keep growing the rule set. What WPL provides is the foundation that makes each miss identifiable and fixable — with a raw LLM, safety is an open-ended failure mode you can't patch.

How it works

Two layers: AI writes a compact DSL, users only ever see validated JSON

1

AI generates

The model writes a plan in WPL‑AI, a concise DSL built for LLMs.

2

Compile & validate

The compiler turns it into WPL JSON and checks it against the formal schema.

3

Rules engine

Safety rules filter contraindicated exercises and personalize the plan.

4

Render anywhere

Validated JSON, parseable in any language, on any platform.

PLAN "Upper Body Strength" TYPE workout DIFFICULTY intermediate DURATION 4 weeks ← what the AI writes (WPL-AI DSL)
The structure

Every plan is the same predictable hierarchy

Phases contain weeks, weeks contain days, days contain blocks, blocks contain activities — so any app can parse, render, and track any plan.

PLAN "4-Week Weight Loss"
PHASE "Foundation"
WEEK 1 of 4
DAY "Upper Body" · 45 min
BLOCK main · 3 circuits
bench_press · 4×8 @ RPE 7 row · 4×10 plank · 3×45s
Beyond workouts

One language, six wellness domains

🏋️

Workouts

Sets, reps, RPE, tempo

🏃

Cardio

Zones, intervals, duration

🥗

Nutrition

Meals, macros, timing

🧘

Meditation

Sessions and breathwork

😴

Recovery

Rest, mobility, sleep

Habits

Daily behaviors tracked

Smart personalization

Rules adapt the whole plan automatically

Injuries, equipment, fitness level and preferences are rules, not rewrites — one rule updates every affected activity across the plan.

⚙ RULE: client has a knee injury
Removed

Squats

Contraindicated for knee injuries

Replaced with

Wall sits

Same muscle group, knee-safe

Who it's for

Built for the whole wellness stack

🧑‍🏫 Trainers & coaches

  • Visual plan builder
  • Reusable templates
  • Automatic client personalization

🧑‍💻 Developers

  • Formal JSON schema
  • Validators in TypeScript & Elixir
  • API-ready, platform-agnostic

🏢 Platforms

  • AI governance layer
  • Schema validation at scale
  • Consistent outcome tracking
Open spec (CC-BY-4.0) · code & schema (Apache-2.0) · v1 schema is stable, additive-only
wpl.dev  ·  github.com/gymbile/wpl  ·  a Gymbile project