Jev Slalom course design
Jev Slalom runs a live course: a line of gates sweeps down a valley and Jev (TypeSafe's System One
model) reads its position and the next gate each tick and steers left/right to thread each gap. The
agent shapes slalom.json: the descent speed, the valley width, and how many gates.
The loop
- Update
slalom.json(title, speed, gates, valleyWidth, optional gateGap, astyleline that tells Jev a line strategy). The viewer watches it and Jev adapts live — no restart, no second server. node "$JEV_DSH/toolchain/check.mjs"verifies the workspace'sslalom.jsonis valid. Run it before you call a run done.- Watch the descent. Does Jev line up on the next gate, commit as it arrives, and thread a clean run — or never fall (dull) or fall even at calm speed (bad)? That observation is the finding.
Reading the run
The viewer shows a top-down course: the skier descends with a snow trail, gates sweep toward it and
light up green as they're threaded, a dashed line marks the target gate, and a finished run shows a
CLEAN RUN or FELL banner plus a run log. Good courses produce a readable loop: Jev carves across the
valley to the next gate, threads it, and builds a rhythm; speed is the difficulty dial — crank it
up and Jev's aim wobbles and it clips a gate and falls.
Verifying a course
node "$JEV_DSH/toolchain/check.mjs" returns non-zero when slalom.json is invalid (no title, a
non-positive speed, out-of-range gates/valleyWidth/gateGap/tickMs). It doesn't replace watching the run:
confirm Jev threads the gates at the speed you set, and that cranking speed up makes it visibly
fall.
Driving Jev yourself
toolchain/jev.mjs exports a small client. Example (from the workspace) — ask Jev's read on a
gate before you commit to it:
node --input-type=module -e '
import { evaluate, jev } from "$JEV_DSH/toolchain/jev.mjs";
const res = await evaluate({
state: "You are skiing the slalom. The skier descends at 3.0 rows/tick. Next gate: x 14.5, gap 6.0. skier x 9.0 gate x 14.5 gate in 1.2. Which way do you steer? LEFT_FAST / LEFT / HOLD / RIGHT / RIGHT_FAST",
questions: {
steer: jev.choice(["LEFT_FAST", "LEFT", "HOLD", "RIGHT", "RIGHT_FAST"], "Which way do you steer this tick?"),
},
});
console.log(JSON.stringify(res.answers, null, 2));
'
Without TYPESAFE_API_KEY this uses the deterministic mock; set the key to hit live Jev.